@delali/narsil 0.3.1-next.127 → 0.3.1-next.129
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/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/browser/{chunk-LJS6PREA.mjs → chunk-3NVZD52E.mjs} +3 -1
- package/dist/browser/{chunk-4Y2EGA3U.mjs → chunk-5D6NJD6C.mjs} +554 -127
- package/dist/browser/{chunk-6POI2KNI.mjs → chunk-II5POT55.mjs} +3 -3
- package/dist/browser/{chunk-2CBQ2PCC.mjs → chunk-WLD6DDIX.mjs} +1 -1
- package/dist/browser/{chunk-V5DCQIOT.mjs → chunk-WZBTVTSU.mjs} +2 -2
- package/dist/browser/{chunk-B65QVTST.mjs → chunk-XTFJZHQP.mjs} +14 -9
- package/dist/browser/{chunk-P7C2S5JX.mjs → chunk-YAGXZU4W.mjs} +2 -2
- package/dist/browser/{durability-wiring-PUC4QSCR.mjs → durability-wiring-HCCC6BJB.mjs} +6 -6
- package/dist/browser/{module-ACWDC7YI.mjs → module-S2VDU2JE.mjs} +5 -5
- package/dist/browser/{restore-queue-MLUEUEAN.mjs → restore-queue-BZ7WWEC4.mjs} +1 -1
- package/dist/browser/{runtime-BX6XRFYR.mjs → runtime-PL4TTFJE.mjs} +1 -1
- package/dist/browser/{snapshot-U5Y346XG.mjs → snapshot-RTUCHI2L.mjs} +7 -7
- package/dist/browser/{write-GZHR6AVG.mjs → write-IMU7G5NU.mjs} +5 -5
- package/dist/{capabilities-9YwwCcqP.d.ts → capabilities-BTjv-tK8.d.ts} +10 -3
- package/dist/{chunk-N57XXGPG.mjs → chunk-2HQQ7Y5D.mjs} +23 -4
- package/dist/{chunk-ENBN5VQ6.mjs → chunk-2YOAGAGF.mjs} +115 -46
- package/dist/{chunk-QSCVJJW5.mjs → chunk-37RTD6KD.mjs} +8 -8
- package/dist/{chunk-N6J6EJW3.mjs → chunk-3LJVM6XM.mjs} +2 -2
- package/dist/{chunk-VK45J47R.mjs → chunk-3XHFVYIQ.mjs} +1 -1
- package/dist/{chunk-LOBYK2FG.mjs → chunk-43Q7HAI2.mjs} +20 -9
- package/dist/{chunk-6PN3U6XW.mjs → chunk-44TB6AIZ.mjs} +1 -1
- package/dist/{chunk-6ODIY6ZB.mjs → chunk-4XEVROSP.mjs} +1 -1
- package/dist/{chunk-4IHMMDRF.mjs → chunk-5LC5VMDQ.mjs} +4 -4
- package/dist/{chunk-MFPJVITN.mjs → chunk-5VSTAJET.mjs} +2 -2
- package/dist/{chunk-DG62H7OD.mjs → chunk-AFOZR4ZQ.mjs} +2 -2
- package/dist/{chunk-P34VZEXB.mjs → chunk-AN3CUMPZ.mjs} +2 -2
- package/dist/{chunk-4PQNDHSA.mjs → chunk-CSSCLRGY.mjs} +2 -2
- package/dist/{chunk-HWQDZB2U.mjs → chunk-CTF6WFTX.mjs} +3 -3
- package/dist/{chunk-E74YLAIG.mjs → chunk-DX2FI4LU.mjs} +2 -1
- package/dist/{chunk-22CK2LQO.mjs → chunk-EZIGAOUJ.mjs} +5 -5
- package/dist/{chunk-KCQG2PJT.mjs → chunk-F4UKMTKM.mjs} +4 -4
- package/dist/{chunk-542TD4BL.mjs → chunk-FRSWYMXH.mjs} +1 -1
- package/dist/{chunk-ANFNYCQG.mjs → chunk-J4LRE5Q7.mjs} +6 -6
- package/dist/{chunk-OGFSUXYY.mjs → chunk-K73PZTBR.mjs} +4 -4
- package/dist/{chunk-IBGMFR5Y.mjs → chunk-K76F5YYX.mjs} +274 -75
- package/dist/{chunk-FUUP45IS.mjs → chunk-M6MBSVIJ.mjs} +1 -1
- package/dist/{chunk-IR4KQ4WB.mjs → chunk-MGD7XETB.mjs} +32 -30
- package/dist/{chunk-7ZZQNOIY.mjs → chunk-OPO5SE4J.mjs} +1 -1
- package/dist/{chunk-UKXMSO5H.mjs → chunk-PCRWCOZC.mjs} +155 -31
- package/dist/{chunk-HFJXEFFV.mjs → chunk-PTIJAZWL.mjs} +3 -3
- package/dist/chunk-Q2AP2FSN.mjs +15 -0
- package/dist/{chunk-SEG4CL6W.mjs → chunk-QQS4QZQA.mjs} +4 -4
- package/dist/{chunk-OFYKBKKV.mjs → chunk-RC27KF7F.mjs} +1 -1
- package/dist/{chunk-JEXJDCQH.mjs → chunk-RYH3PASD.mjs} +17 -12
- package/dist/{chunk-IE43SRL3.mjs → chunk-TB7YMDD5.mjs} +10 -6
- package/dist/{chunk-ZR63OGT2.mjs → chunk-TY64A3ZW.mjs} +2 -2
- package/dist/{chunk-Z4DZ4KK2.mjs → chunk-UJWGQIXU.mjs} +1 -0
- package/dist/{chunk-OBWUWZRA.mjs → chunk-WI5Q3L43.mjs} +1 -0
- package/dist/{chunk-SJEIIR56.mjs → chunk-WQYB4TNR.mjs} +2 -2
- package/dist/{chunk-JIXO442E.mjs → chunk-WUIDPBSY.mjs} +16 -10
- package/dist/{chunk-62IPM62F.mjs → chunk-XRXBCOA4.mjs} +2 -2
- package/dist/{chunk-U6NGTWI3.mjs → chunk-XTER67YM.mjs} +1 -1
- package/dist/{chunk-LXWDQLTW.mjs → chunk-Y4NOHICF.mjs} +1 -1
- package/dist/{chunk-OCB7TMUQ.mjs → chunk-Y4US5EGH.mjs} +1 -1
- package/dist/{client-DyiYkQ8o.d.ts → client-BOcveV7A.d.ts} +34 -11
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +42 -20
- package/dist/{config-DLVnlByZ.d.ts → config-C3YXk5Rn.d.ts} +2 -2
- package/dist/{config-CtTfxbpV.d.ts → config-CPmIY3aH.d.ts} +2 -2
- package/dist/{direct-executor-6KCVVHYT.mjs → direct-executor-ULA6V5HC.mjs} +12 -12
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +18 -1
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +33 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +71 -43
- package/dist/distribution.mjs +359 -115
- package/dist/{durability-wiring-UGGUNATA.mjs → durability-wiring-6R26AJDI.mjs} +26 -26
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-Bq5wz6c1.d.ts → engine-JjRAXpT3.d.ts} +38 -8
- package/dist/{events-x2aVu0_o.d.ts → events-pM0lna7M.d.ts} +12 -1
- package/dist/{index-Cl5qQauj.d.ts → index-DkQ2DlgR.d.ts} +37 -3
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +19 -19
- package/dist/{long-query-thread-5BIPZVS6.mjs → long-query-thread-6VLA6YJI.mjs} +15 -15
- package/dist/{module-7OHZ2OPI.mjs → module-S4WGMFNW.mjs} +11 -11
- package/dist/partial-words.mjs +6 -6
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +22 -22
- package/dist/react.d.ts +7 -7
- package/dist/react.mjs +1 -0
- package/dist/{rerank-NYX5S7OG.mjs → rerank-V4J4MIWR.mjs} +6 -6
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{restore-queue-NVMWJMHI.mjs → restore-queue-PUGWCPCX.mjs} +1 -1
- package/dist/{runtime-XNYW6AWX.mjs → runtime-TBFBQQQO.mjs} +7 -7
- package/dist/{schema-4W_7tk1f.d.ts → schema-DGAP_8HJ.d.ts} +50 -24
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +27 -15
- package/dist/{snapshot-P7IQGNNQ.mjs → snapshot-PUVSMV7E.mjs} +27 -27
- package/dist/synonyms.mjs +3 -3
- package/dist/{tasks-DLQIfXqy.d.ts → tasks-txGvNz6h.d.ts} +4 -6
- package/dist/{thread-QPETQEPK.mjs → thread-TA7QQBWP.mjs} +14 -14
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +8 -8
- package/dist/{write-WZVM7ZL6.mjs → write-TGKYT3C4.mjs} +21 -21
- package/package.json +7 -7
package/dist/distribution.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-
|
|
2
|
-
export { c as ClusterControllerConfig, d as ClusterHealth, e as ClusterHealthStatus, f as ClusterMemoryConfig, g as ClusterMetrics, h as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig, V as VectorRebuildWaitFigure } from './config-
|
|
1
|
+
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-CPmIY3aH.js';
|
|
2
|
+
export { c as ClusterControllerConfig, d as ClusterHealth, e as ClusterHealthStatus, f as ClusterMemoryConfig, g as ClusterMetrics, h as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig, V as VectorRebuildWaitFigure } from './config-CPmIY3aH.js';
|
|
3
3
|
import { R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
4
|
-
import { B as BatchResult, L as ListParams, g as ListResult, h as SuggestParams, j as SuggestResult, Q as QueryParams, P as PreflightResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './events-
|
|
5
|
-
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-
|
|
4
|
+
import { B as BatchResult, L as ListParams, g as ListResult, h as SuggestParams, j as SuggestResult, Q as QueryParams, P as PreflightResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './events-pM0lna7M.js';
|
|
5
|
+
import { B as BM25Params, I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-DGAP_8HJ.js';
|
|
6
|
+
import { b as NodeCapacity, N as NodeRole } from './index-DkQ2DlgR.js';
|
|
7
|
+
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, e as IndexMetadataWatch, f as IndexPartitionBytes, g as NodeEvent, h as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-DkQ2DlgR.js';
|
|
6
8
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
7
|
-
import {
|
|
8
|
-
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexPartitionBytes, e as NodeEvent, f as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, g as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-Cl5qQauj.js';
|
|
9
|
-
import { N as Narsil } from './engine-Bq5wz6c1.js';
|
|
9
|
+
import { N as Narsil } from './engine-JjRAXpT3.js';
|
|
10
10
|
export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-DvncmvuQ.js';
|
|
11
|
-
import './config-
|
|
11
|
+
import './config-C3YXk5Rn.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The cluster splits an index into this many partitions when
|
|
@@ -36,6 +36,67 @@ declare const DEFAULT_REPLICATION_FACTOR = 1;
|
|
|
36
36
|
*/
|
|
37
37
|
declare const DEFAULT_CAPACITY: NodeCapacity;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Changes the search settings of a live index across a cluster.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
interface ClusterNodeSearchSettings {
|
|
45
|
+
/**
|
|
46
|
+
* Replaces the synonym set of an index across the cluster, so that every
|
|
47
|
+
* search that starts after the promise resolves expands its words with the
|
|
48
|
+
* new set.
|
|
49
|
+
*
|
|
50
|
+
* The node stores the set in the coordinator before it asks each node that
|
|
51
|
+
* holds a partition of the index to apply the set. The promise resolves
|
|
52
|
+
* once every one of those nodes answers. Pass an empty list to remove the
|
|
53
|
+
* set.
|
|
54
|
+
*
|
|
55
|
+
* @param indexName - The index whose set the cluster replaces.
|
|
56
|
+
* @param synonyms - The new set, in the shape that {@link SynonymRule}
|
|
57
|
+
* describes.
|
|
58
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when a rule breaks that
|
|
59
|
+
* shape, when a word analyses to no token or to more than one, or when the
|
|
60
|
+
* set passes 100,000 rules, 500,000 words, or 4,194,304 bytes of words in
|
|
61
|
+
* UTF-8. It throws `CLUSTER_WRITE_BLOCKED` when the index metadata changes
|
|
62
|
+
* between the node's read and its write on every one of its tries, and
|
|
63
|
+
* `QUERY_NODE_TIMEOUT` when a node holding a partition gives no answer.
|
|
64
|
+
* After a timeout, the coordinator keeps the new set, so a retry of the
|
|
65
|
+
* same call can finish applying it.
|
|
66
|
+
*/
|
|
67
|
+
updateSynonyms(indexName: string, synonyms: SynonymRule[]): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the synonym set that the coordinator holds for an index, with
|
|
70
|
+
* every word as the caller wrote it, or an empty list when the index holds
|
|
71
|
+
* no set.
|
|
72
|
+
*
|
|
73
|
+
* @param indexName - The index whose set the node returns.
|
|
74
|
+
* @throws A `NarsilError` with `INDEX_NOT_FOUND` when the cluster holds no
|
|
75
|
+
* index under that name.
|
|
76
|
+
*/
|
|
77
|
+
getSynonyms(indexName: string): Promise<SynonymRule[]>;
|
|
78
|
+
/**
|
|
79
|
+
* Replaces the BM25 setting of an index across the cluster, so that this
|
|
80
|
+
* node scores every search that starts after the promise resolves under the
|
|
81
|
+
* new setting.
|
|
82
|
+
*
|
|
83
|
+
* The call replaces the whole setting, and `{}` clears it. The promise
|
|
84
|
+
* resolves once the coordinator stores the setting and this node applies it.
|
|
85
|
+
* Every other node follows through its watch of the index metadata, so a
|
|
86
|
+
* search that another node coordinates can use the old setting for that
|
|
87
|
+
* time.
|
|
88
|
+
*
|
|
89
|
+
* @param indexName - The index whose setting the node replaces.
|
|
90
|
+
* @param bm25 - The new setting, in the shape that {@link BM25Params} describes.
|
|
91
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when a value breaks that
|
|
92
|
+
* shape, with `INDEX_NOT_FOUND` when the cluster holds no index under that
|
|
93
|
+
* name, with `BM25_NOT_READY` while a registered node has a specification
|
|
94
|
+
* version below 1.1, and with `CLUSTER_WRITE_BLOCKED` when other writes keep
|
|
95
|
+
* changing the index metadata.
|
|
96
|
+
*/
|
|
97
|
+
updateBM25(indexName: string, bm25: BM25Params): Promise<void>;
|
|
98
|
+
}
|
|
99
|
+
|
|
39
100
|
/**
|
|
40
101
|
* One node of a cluster, which routes each write to the partition's primary
|
|
41
102
|
* and gathers each search from every partition.
|
|
@@ -46,7 +107,7 @@ declare const DEFAULT_CAPACITY: NodeCapacity;
|
|
|
46
107
|
*
|
|
47
108
|
* @public
|
|
48
109
|
*/
|
|
49
|
-
interface ClusterNode {
|
|
110
|
+
interface ClusterNode extends ClusterNodeSearchSettings {
|
|
50
111
|
/** This identifies the node across the cluster. */
|
|
51
112
|
readonly nodeId: string;
|
|
52
113
|
/** The node holds these roles in the cluster. */
|
|
@@ -149,39 +210,6 @@ interface ClusterNode {
|
|
|
149
210
|
* @param name - The index to drop.
|
|
150
211
|
*/
|
|
151
212
|
dropIndex(name: string): Promise<void>;
|
|
152
|
-
/**
|
|
153
|
-
* Replaces the synonym set of an index across the cluster, so that every
|
|
154
|
-
* search that starts after the promise resolves expands its words with the
|
|
155
|
-
* new set.
|
|
156
|
-
*
|
|
157
|
-
* The node stores the set in the coordinator before it asks each node that
|
|
158
|
-
* holds a partition of the index to apply the set. The promise resolves
|
|
159
|
-
* once every one of those nodes answers. Pass an empty list to remove the
|
|
160
|
-
* set.
|
|
161
|
-
*
|
|
162
|
-
* @param indexName - The index whose set the cluster replaces.
|
|
163
|
-
* @param synonyms - The new set, in the shape that {@link SynonymRule}
|
|
164
|
-
* describes.
|
|
165
|
-
* @throws A `NarsilError` with `CONFIG_INVALID` when a rule breaks that
|
|
166
|
-
* shape, when a word analyses to no token or to more than one, or when the
|
|
167
|
-
* set passes 100,000 rules, 500,000 words, or 4,194,304 bytes of words in
|
|
168
|
-
* UTF-8. It throws `CLUSTER_WRITE_BLOCKED` when the index metadata changes
|
|
169
|
-
* between the node's read and its write on every one of its tries, and
|
|
170
|
-
* `QUERY_NODE_TIMEOUT` when a node holding a partition gives no answer.
|
|
171
|
-
* After a timeout, the coordinator keeps the new set, so a retry of the
|
|
172
|
-
* same call can finish applying it.
|
|
173
|
-
*/
|
|
174
|
-
updateSynonyms(indexName: string, synonyms: SynonymRule[]): Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* Returns the synonym set that the coordinator holds for an index, with
|
|
177
|
-
* every word as the caller wrote it, or an empty list when the index holds
|
|
178
|
-
* no set.
|
|
179
|
-
*
|
|
180
|
-
* @param indexName - The index whose set the node returns.
|
|
181
|
-
* @throws A `NarsilError` with `INDEX_NOT_FOUND` when the cluster holds no
|
|
182
|
-
* index under that name.
|
|
183
|
-
*/
|
|
184
|
-
getSynonyms(indexName: string): Promise<SynonymRule[]>;
|
|
185
213
|
/**
|
|
186
214
|
* Removes every document from an index across the cluster and keeps the
|
|
187
215
|
* index itself, along with its schema and allocation.
|
|
@@ -478,4 +506,4 @@ interface ClusterEngineOptions {
|
|
|
478
506
|
*/
|
|
479
507
|
declare function clusterNodeEngine(node: ClusterNode, options?: ClusterEngineOptions): Narsil;
|
|
480
508
|
|
|
481
|
-
export { type ClusterEngineOptions, ClusterNamespace, type ClusterNode, ClusterNodeConfig, CreateIndexOptions, DEFAULT_CAPACITY, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, NodeCapacity, NodeRole, clusterNodeEngine, createClusterNode };
|
|
509
|
+
export { type ClusterEngineOptions, ClusterNamespace, type ClusterNode, ClusterNodeConfig, type ClusterNodeSearchSettings, CreateIndexOptions, DEFAULT_CAPACITY, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, NodeCapacity, NodeRole, clusterNodeEngine, createClusterNode };
|