lucivy 2.0.0 → 2.0.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/index.d.ts +8 -0
- package/index.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -27,6 +27,14 @@ export interface SearchOptions {
|
|
|
27
27
|
allowedIds?: Array<number>
|
|
28
28
|
fields?: boolean
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Merge BM25 stats from multiple nodes into global stats (for distributed search).
|
|
32
|
+
*
|
|
33
|
+
* @param statsList - Array of JSON strings, one per node (from `exportStats()`).
|
|
34
|
+
* @returns JSON string of merged `ExportableStats` ready for `searchWithGlobalStats()`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function mergeStats(statsList: Array<string>): string
|
|
37
|
+
|
|
30
38
|
export declare class Index {
|
|
31
39
|
/**
|
|
32
40
|
* Create a new index at the given path.
|
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const { Index } = require('./lucivy.node');
|
|
1
|
+
const { Index, mergeStats } = require('./lucivy.node');
|
|
2
2
|
|
|
3
|
-
module.exports = { Index };
|
|
3
|
+
module.exports = { Index, mergeStats };
|