@quatrain/searchengine-qmd 1.0.1 → 1.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/searchengine-qmd",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-beta.0",
4
4
  "description": "QMD (Query Markup Documents) Search Engine Adapter for the @quatrain/searchengine namespace",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/Quatrain/Core.git",
17
+ "url": "git+https://git.qtrn.io/Quatrain/Core.git",
18
18
  "directory": "packages/searchengine-qmd"
19
19
  },
20
20
  "author": "Quatrain Développement SAS <developers@quatrain.com>",
@@ -25,7 +25,7 @@
25
25
  "typescript": "^5.2.2"
26
26
  },
27
27
  "dependencies": {
28
- "@quatrain/core": "^1.2.17",
28
+ "@quatrain/core": "^1.2.21-beta.5",
29
29
  "@quatrain/searchengine": "^1.0.1"
30
30
  },
31
31
  "scripts": {
@@ -40,10 +40,10 @@ describe('QmdSearchEngineAdapter Package', () => {
40
40
  });
41
41
 
42
42
  await adapter.indexDocument({
43
- id: 'doc-agri-guide',
44
- title: 'AgTech Soil Sensor Guide',
45
- content: 'IoT sensors measure soil moisture and temperature in smart farming.',
46
- category: 'agriculture'
43
+ id: 'doc-sensor-guide',
44
+ title: 'IoT Sensor Guide',
45
+ content: 'IoT sensors measure humidity and temperature in smart buildings.',
46
+ category: 'iot'
47
47
  });
48
48
 
49
49
  // Query 1: Search for Markdown
@@ -53,9 +53,9 @@ describe('QmdSearchEngineAdapter Package', () => {
53
53
  expect(results1[0].score).toBeGreaterThan(0);
54
54
 
55
55
  // Query 2: Search with category scope
56
- const results2 = await adapter.search('sensors', { category: 'agriculture' });
56
+ const results2 = await adapter.search('sensors', { category: 'iot' });
57
57
  expect(results2.length).toBe(1);
58
- expect(results2[0].id).toBe('doc-agri-guide');
58
+ expect(results2[0].id).toBe('doc-sensor-guide');
59
59
 
60
60
  // Query 3: Search outside category
61
61
  const results3 = await adapter.search('sensors', { category: 'technology' });