@equationalapplications/core-llm-wiki 7.10.0 → 7.10.1
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/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4154,13 +4154,14 @@ var Fts5IndexStrategy = class {
|
|
|
4154
4154
|
const cap = options.preFilterLimit ?? options.limit;
|
|
4155
4155
|
const limit = cap >= Number.MAX_SAFE_INTEGER ? -1 : cap;
|
|
4156
4156
|
const t = `${this.prefix}entries_fts`;
|
|
4157
|
-
const bm25 = `bm25(${t}, 0.0, 0.0, 2.0, 1.0, 1.0)`;
|
|
4158
4157
|
return this.db.getAllAsync(
|
|
4159
|
-
`SELECT id, entity_id, max(0.0,
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4158
|
+
`SELECT id, entity_id, max(0.0, -raw) AS score FROM (
|
|
4159
|
+
SELECT id, entity_id, bm25(${t}, 0.0, 0.0, 2.0, 1.0, 1.0) AS raw
|
|
4160
|
+
FROM ${t}
|
|
4161
|
+
WHERE ${t} MATCH ? AND entity_id IN (SELECT value FROM json_each(?))
|
|
4162
|
+
ORDER BY raw, id
|
|
4163
|
+
LIMIT ?)
|
|
4164
|
+
ORDER BY raw, id`,
|
|
4164
4165
|
[match, JSON.stringify(options.entityIds), limit]
|
|
4165
4166
|
);
|
|
4166
4167
|
}
|