@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
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-
|
|
3
|
-
import { decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, VECTOR_FILE_ENVELOPE_VERSION, metadataConfigOf, readCurrentManifest } from './chunk-
|
|
4
|
-
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-
|
|
1
|
+
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-WQYB4TNR.mjs';
|
|
2
|
+
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-CTF6WFTX.mjs';
|
|
3
|
+
import { decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, VECTOR_FILE_ENVELOPE_VERSION, metadataConfigOf, readCurrentManifest } from './chunk-WUIDPBSY.mjs';
|
|
4
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-Y4US5EGH.mjs';
|
|
5
5
|
import './chunk-37CD3OKS.mjs';
|
|
6
|
-
import { createDurableDirectory } from './chunk-
|
|
6
|
+
import { createDurableDirectory } from './chunk-CSSCLRGY.mjs';
|
|
7
7
|
import { spawnNodeWorker } from './chunk-W55X2BYN.mjs';
|
|
8
8
|
import { getFs } from './chunk-HLPRHOSO.mjs';
|
|
9
|
-
import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, readSegmentFile, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, MAX_SEGMENTS_PER_PARTITION, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, SEGMENT_HEADER_SIZE, buildEntry, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, checkpointLastSeqNo, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, readSegmentFile, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, MAX_SEGMENTS_PER_PARTITION, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, SEGMENT_HEADER_SIZE, buildEntry, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, checkpointLastSeqNo, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-37RTD6KD.mjs';
|
|
10
|
+
import './chunk-5LC5VMDQ.mjs';
|
|
11
11
|
import './chunk-P36MUFEJ.mjs';
|
|
12
12
|
import './chunk-YH5OIL7B.mjs';
|
|
13
|
-
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { resolveWorkerEntry } from './chunk-
|
|
13
|
+
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-2YOAGAGF.mjs';
|
|
14
|
+
import './chunk-PCRWCOZC.mjs';
|
|
15
|
+
import './chunk-2HQQ7Y5D.mjs';
|
|
16
|
+
import { resolveWorkerEntry } from './chunk-44TB6AIZ.mjs';
|
|
17
17
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
18
|
-
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
19
|
-
import { fnv1a } from './chunk-
|
|
20
|
-
import './chunk-
|
|
18
|
+
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-RYH3PASD.mjs';
|
|
19
|
+
import { fnv1a } from './chunk-K76F5YYX.mjs';
|
|
20
|
+
import './chunk-M6MBSVIJ.mjs';
|
|
21
21
|
import './chunk-ZATRDAYU.mjs';
|
|
22
22
|
import './chunk-EBIHRL7B.mjs';
|
|
23
23
|
import './chunk-HJSN7UYG.mjs';
|
|
24
|
-
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-
|
|
24
|
+
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-Y4NOHICF.mjs';
|
|
25
25
|
import './chunk-TGP5M5R7.mjs';
|
|
26
26
|
import './chunk-U2BKYEC7.mjs';
|
|
27
27
|
import './chunk-KOKM4PQN.mjs';
|
|
28
28
|
import './chunk-QSK35UC2.mjs';
|
|
29
|
-
import './chunk-
|
|
30
|
-
import './chunk-
|
|
29
|
+
import './chunk-3XHFVYIQ.mjs';
|
|
30
|
+
import './chunk-AN3CUMPZ.mjs';
|
|
31
31
|
import './chunk-WQBCBKY3.mjs';
|
|
32
|
-
import './chunk-
|
|
33
|
-
import { encodeDocument, requireValidFieldTypes } from './chunk-
|
|
32
|
+
import './chunk-F4UKMTKM.mjs';
|
|
33
|
+
import { encodeDocument, requireValidFieldTypes } from './chunk-AFOZR4ZQ.mjs';
|
|
34
34
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
35
|
-
import './chunk-
|
|
35
|
+
import './chunk-DX2FI4LU.mjs';
|
|
36
36
|
import { MIN_M } from './chunk-VJS4JFBQ.mjs';
|
|
37
37
|
import './chunk-GES7U2PM.mjs';
|
|
38
|
-
import './chunk-
|
|
39
|
-
import './chunk-
|
|
38
|
+
import './chunk-4XEVROSP.mjs';
|
|
39
|
+
import './chunk-MGD7XETB.mjs';
|
|
40
40
|
import './chunk-X5CV2E2B.mjs';
|
|
41
41
|
import './chunk-7X5JST5L.mjs';
|
|
42
|
-
import './chunk-
|
|
42
|
+
import './chunk-RC27KF7F.mjs';
|
|
43
43
|
import './chunk-R6A773WK.mjs';
|
|
44
44
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
45
|
-
import './chunk-
|
|
46
|
-
import './chunk-
|
|
45
|
+
import './chunk-UJWGQIXU.mjs';
|
|
46
|
+
import './chunk-XTER67YM.mjs';
|
|
47
47
|
import './chunk-22YPZVMG.mjs';
|
|
48
48
|
import './chunk-RFBLQLLZ.mjs';
|
|
49
49
|
import './chunk-L5ORED7V.mjs';
|
|
50
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
50
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
51
51
|
import { decode } from '@msgpack/msgpack';
|
|
52
52
|
|
|
53
53
|
// src/persistence/durability/sha256.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from '../chunk-
|
|
1
|
+
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-OPO5SE4J.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from '../chunk-WI5Q3L43.mjs';
|
|
3
3
|
|
|
4
4
|
// src/embeddings/constants.ts
|
|
5
5
|
var DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
2
|
-
import { B as
|
|
3
|
-
import {
|
|
2
|
+
import { B as BM25Params, A as AnyDocument, a as InsertOptions, W as WriteOptions, I as IndexConfig, P as PartitionConfig } from './schema-DGAP_8HJ.js';
|
|
3
|
+
import { B as BatchResult, I as IndexInfo, k as IndexStats, l as PartitionStatsResult, L as ListParams, g as ListResult, Q as QueryParams, e as QueryResult, P as PreflightResult, h as SuggestParams, j as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, m as NarsilEventMap } from './events-pM0lna7M.js';
|
|
4
4
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -33,6 +33,36 @@ interface AdapterRegistrationOperations {
|
|
|
33
33
|
registerRerankAdapter(name: string, adapter: RerankAdapter): void;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Changes the BM25 setting of a live index, which
|
|
38
|
+
* {@link IndexConfig.bm25} sets when the index is created.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
interface BM25Operations {
|
|
43
|
+
/**
|
|
44
|
+
* Replaces the BM25 setting of an index, so that every search that starts
|
|
45
|
+
* after the promise resolves scores under the new setting.
|
|
46
|
+
*
|
|
47
|
+
* The call replaces the whole setting, so a value that it leaves out returns
|
|
48
|
+
* to its default, and `{}` clears the setting. The engine rebuilds nothing,
|
|
49
|
+
* because the setting changes no stored token. It saves the setting with the
|
|
50
|
+
* index, so the setting stays in place after a restart, and every snapshot
|
|
51
|
+
* of the index includes it. Where the index has copies on worker threads,
|
|
52
|
+
* the promise resolves only once every copy holds the new setting. A cursor
|
|
53
|
+
* from before the change keeps working, and its next pages can repeat or
|
|
54
|
+
* skip documents, because the scores that order them can change.
|
|
55
|
+
*
|
|
56
|
+
* @param indexName - The index whose setting the engine replaces.
|
|
57
|
+
* @param bm25 - The new setting, in the shape that {@link BM25Params} describes.
|
|
58
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when `k1` is not a number from
|
|
59
|
+
* 0 to 1,000, when `b` is not a number from 0 to 1, or when `fields` holds a
|
|
60
|
+
* name that is not a text field. The index then keeps the setting that it
|
|
61
|
+
* held before the call.
|
|
62
|
+
*/
|
|
63
|
+
updateBM25(indexName: string, bm25: BM25Params): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
|
|
36
66
|
/**
|
|
37
67
|
* The bytes that {@link Narsil.restore} and {@link Narsil.importDocumentExport}
|
|
38
68
|
* accept, as one array, a stream of chunks, or an async iterable of chunks,
|
|
@@ -209,14 +239,14 @@ interface DocumentWriteOperations {
|
|
|
209
239
|
*
|
|
210
240
|
* One instance holds every index you create, so an application usually keeps a
|
|
211
241
|
* single engine for its lifetime and reaches each index by name. Build one
|
|
212
|
-
* with {@link createNarsil}. Its write, open and close, synonym, and
|
|
213
|
-
* registration methods come from {@link DocumentWriteOperations},
|
|
214
|
-
* {@link IndexLifecycleOperations}, {@link SynonymOperations},
|
|
215
|
-
* {@link AdapterRegistrationOperations}.
|
|
242
|
+
* with {@link createNarsil}. Its write, open and close, synonym, BM25, and
|
|
243
|
+
* adapter registration methods come from {@link DocumentWriteOperations},
|
|
244
|
+
* {@link IndexLifecycleOperations}, {@link SynonymOperations},
|
|
245
|
+
* {@link BM25Operations}, and {@link AdapterRegistrationOperations}.
|
|
216
246
|
*
|
|
217
247
|
* @public
|
|
218
248
|
*/
|
|
219
|
-
interface Narsil extends IndexLifecycleOperations, DocumentWriteOperations, SynonymOperations, AdapterRegistrationOperations {
|
|
249
|
+
interface Narsil extends IndexLifecycleOperations, DocumentWriteOperations, SynonymOperations, BM25Operations, AdapterRegistrationOperations {
|
|
220
250
|
/**
|
|
221
251
|
* Creates an index you can insert documents into and query.
|
|
222
252
|
*
|
|
@@ -574,4 +604,4 @@ interface Narsil extends IndexLifecycleOperations, DocumentWriteOperations, Syno
|
|
|
574
604
|
shutdown(): Promise<void>;
|
|
575
605
|
}
|
|
576
606
|
|
|
577
|
-
export type { AdapterRegistrationOperations as A,
|
|
607
|
+
export type { AdapterRegistrationOperations as A, BM25Operations as B, DocumentWriteOperations as D, IndexLifecycleOperations as I, Narsil as N, SynonymOperations as S, ByteSource as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AnyDocument, S as SchemaDefinition,
|
|
1
|
+
import { A as AnyDocument, S as SchemaDefinition, B as BM25Params, e as ScoringMode } from './schema-DGAP_8HJ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Every code a {@link NarsilError} carries, grouped by the part of the engine
|
|
@@ -42,6 +42,7 @@ declare const ErrorCodes: {
|
|
|
42
42
|
readonly SEARCH_INVALID_CURSOR: "SEARCH_INVALID_CURSOR";
|
|
43
43
|
readonly SEARCH_RESULT_WINDOW_EXCEEDED: "SEARCH_RESULT_WINDOW_EXCEEDED";
|
|
44
44
|
readonly SEARCH_WORK_CAP_EXCEEDED: "SEARCH_WORK_CAP_EXCEEDED";
|
|
45
|
+
readonly BM25_NOT_READY: "BM25_NOT_READY";
|
|
45
46
|
readonly LANGUAGE_NOT_SUPPORTED: "LANGUAGE_NOT_SUPPORTED";
|
|
46
47
|
readonly ENVELOPE_VERSION_MISMATCH: "ENVELOPE_VERSION_MISMATCH";
|
|
47
48
|
readonly ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC";
|
|
@@ -1183,6 +1184,16 @@ interface QueryParams {
|
|
|
1183
1184
|
* finite number.
|
|
1184
1185
|
*/
|
|
1185
1186
|
boost?: Record<string, number>;
|
|
1187
|
+
/**
|
|
1188
|
+
* These BM25 parameters score this search alone, and they override the
|
|
1189
|
+
* index's parameters, so a `k1` here also overrides a `k1` that the index
|
|
1190
|
+
* sets for a field. The engine validates them on every search, and it throws
|
|
1191
|
+
* the same errors as {@link IndexConfig.bm25}, except `SEARCH_INVALID_FIELD`
|
|
1192
|
+
* for a name in `fields` that is not a text field. They change no score on a
|
|
1193
|
+
* vector search, and on a hybrid search they apply to the keyword ranking
|
|
1194
|
+
* alone. A cursor pages only a search with the same parameters.
|
|
1195
|
+
*/
|
|
1196
|
+
bm25?: BM25Params;
|
|
1186
1197
|
/** The engine gathers term statistics this way, and follows the index's `defaultScoring` where the query sets none. */
|
|
1187
1198
|
scoring?: ScoringMode;
|
|
1188
1199
|
/**
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
import { S as SchemaDefinition } from './schema-
|
|
1
|
+
import { S as SchemaDefinition } from './schema-DGAP_8HJ.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tells watchers that the stored metadata of an index changed.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
interface IndexMetadataEvent {
|
|
9
|
+
/** This index's metadata changed. */
|
|
10
|
+
indexName: string;
|
|
11
|
+
/** These are the bytes of the new value, and they are `null` when the index was dropped. */
|
|
12
|
+
metadata: Uint8Array | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The coordinator's watch of index metadata.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
interface IndexMetadataWatch {
|
|
20
|
+
/**
|
|
21
|
+
* Watches the stored metadata of every index, under the key that
|
|
22
|
+
* `_narsil/index/{indexName}/config` describes, and under no other key.
|
|
23
|
+
*
|
|
24
|
+
* For each key, the handler receives the values in the order that the store
|
|
25
|
+
* wrote them. After a lost connection, the coordinator lists the current
|
|
26
|
+
* values and delivers each one that changed, so a handler can miss an
|
|
27
|
+
* intermediate value and always receives the last one. A value that was
|
|
28
|
+
* written before the watch started fires nothing, so read what you need
|
|
29
|
+
* after the watch starts.
|
|
30
|
+
*
|
|
31
|
+
* @param handler - Called once per change.
|
|
32
|
+
* @returns A function that ends the watch.
|
|
33
|
+
*/
|
|
34
|
+
watchIndexMetadata(handler: (event: IndexMetadataEvent) => void): Promise<() => void>;
|
|
35
|
+
}
|
|
2
36
|
|
|
3
37
|
/**
|
|
4
38
|
* What a node does in a cluster. A node may hold several roles at once.
|
|
@@ -262,7 +296,7 @@ interface AllocationConstraints {
|
|
|
262
296
|
*
|
|
263
297
|
* @public
|
|
264
298
|
*/
|
|
265
|
-
interface ClusterCoordinator {
|
|
299
|
+
interface ClusterCoordinator extends IndexMetadataWatch {
|
|
266
300
|
/**
|
|
267
301
|
* Publishes a node so that peers find it, and keeps it published while the
|
|
268
302
|
* node heartbeats.
|
|
@@ -482,4 +516,4 @@ interface ClusterCoordinator {
|
|
|
482
516
|
shutdown(): Promise<void>;
|
|
483
517
|
}
|
|
484
518
|
|
|
485
|
-
export type { AllocationTable as A, ClusterCoordinator as C,
|
|
519
|
+
export type { AllocationTable as A, ClusterCoordinator as C, IndexMetadataEvent as I, NodeRole as N, PartitionAssignment as P, RegistrationLease as R, SchemaEvent as S, UnassignedReason as U, NodeRegistration as a, NodeCapacity as b, AllocationConstraints as c, AllocationEvent as d, IndexMetadataWatch as e, IndexPartitionBytes as f, NodeEvent as g, NodeMemoryReport as h, PartitionState as i };
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-
|
|
2
|
-
export { isSimdAvailable } from './browser/chunk-
|
|
1
|
+
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-5D6NJD6C.mjs';
|
|
2
|
+
export { isSimdAvailable } from './browser/chunk-WLD6DDIX.mjs';
|
|
3
3
|
import './browser/chunk-JPTQZWJQ.mjs';
|
|
4
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-
|
|
4
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-3NVZD52E.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { b as StopWordOverride, C as CustomTokenizer } from './schema-
|
|
2
|
-
export { A as AnyDocument, B as BM25Params, E as EmbeddingFieldConfig, F as FieldOptionChain,
|
|
1
|
+
import { b as StopWordOverride, C as CustomTokenizer } from './schema-DGAP_8HJ.js';
|
|
2
|
+
export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, F as FieldOptionChain, d as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, e as ScoringMode, T as TextFieldOption, V as VectorIndexConfig, f as VectorQuantizationMode, g as VectorStorageMode, W as WriteOptions } from './schema-DGAP_8HJ.js';
|
|
3
3
|
import { P as PartialWordSearch } from './partial-words-DTIHO8G4.js';
|
|
4
4
|
import { P as PatternSearch } from './pattern-Cledccbl.js';
|
|
5
5
|
import { S as SynonymSearch } from './synonyms-CpOAHPa-.js';
|
|
6
6
|
export { O as OneWaySynonymRule, a as SynonymRule, T as TwoWaySynonymRule } from './synonyms-CpOAHPa-.js';
|
|
7
7
|
import { L as LanguageModule } from './language-DB8KG1z5.js';
|
|
8
8
|
export { T as TokenizerConfig } from './language-DB8KG1z5.js';
|
|
9
|
-
export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, n as ComparisonFilter, D as DocumentImportResult, o as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, p as FacetResult, q as FieldFilter, r as FilterExpression, G as GeoFilter, s as GeoPolygonFilter, t as GeoRadiusFilter, u as GroupConfig, v as GroupReducer, w as GroupResult, H as HeldCheckpointReport, x as HighlightConfig, y as HighlightMatch, z as Hit, J as HybridConfig, I as IndexInfo, k as IndexStats, L as ListParams, g as ListResult, K as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, f as NarsilEventHandlers, m as NarsilEventMap, l as PartitionStatsResult, P as PreflightResult, O as PresenceFilter, R as ProcessMemoryReport, T as QueryCoverage, Q as QueryParams, e as QueryResult, U as RerankConfig, W as ScoreComponents, X as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, Y as SortField, Z as SortSpec, _ as StringFilter, h as SuggestParams, j as SuggestResult, $ as TermMatchPolicy, V as VectorMaintenanceResult, a0 as VectorQueryConfig, a1 as WorkerCopyReport, i as isNarsilError } from './events-
|
|
10
|
-
import { N as NarsilConfig } from './config-
|
|
11
|
-
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-
|
|
12
|
-
import { N as Narsil } from './engine-
|
|
13
|
-
export { A as AdapterRegistrationOperations, B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-
|
|
9
|
+
export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, n as ComparisonFilter, D as DocumentImportResult, o as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, p as FacetResult, q as FieldFilter, r as FilterExpression, G as GeoFilter, s as GeoPolygonFilter, t as GeoRadiusFilter, u as GroupConfig, v as GroupReducer, w as GroupResult, H as HeldCheckpointReport, x as HighlightConfig, y as HighlightMatch, z as Hit, J as HybridConfig, I as IndexInfo, k as IndexStats, L as ListParams, g as ListResult, K as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, f as NarsilEventHandlers, m as NarsilEventMap, l as PartitionStatsResult, P as PreflightResult, O as PresenceFilter, R as ProcessMemoryReport, T as QueryCoverage, Q as QueryParams, e as QueryResult, U as RerankConfig, W as ScoreComponents, X as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, Y as SortField, Z as SortSpec, _ as StringFilter, h as SuggestParams, j as SuggestResult, $ as TermMatchPolicy, V as VectorMaintenanceResult, a0 as VectorQueryConfig, a1 as WorkerCopyReport, i as isNarsilError } from './events-pM0lna7M.js';
|
|
10
|
+
import { N as NarsilConfig } from './config-C3YXk5Rn.js';
|
|
11
|
+
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-C3YXk5Rn.js';
|
|
12
|
+
import { N as Narsil } from './engine-JjRAXpT3.js';
|
|
13
|
+
export { A as AdapterRegistrationOperations, B as BM25Operations, a as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-JjRAXpT3.js';
|
|
14
14
|
export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
15
15
|
|
|
16
16
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-2YOAGAGF.mjs';
|
|
2
|
+
import './chunk-PCRWCOZC.mjs';
|
|
3
|
+
import './chunk-2HQQ7Y5D.mjs';
|
|
4
|
+
import './chunk-44TB6AIZ.mjs';
|
|
5
5
|
import './chunk-AV4IJKD2.mjs';
|
|
6
|
-
export { registerSynonyms } from './chunk-
|
|
7
|
-
export { registerPartialWordSearch, registerPatternSearch } from './chunk-
|
|
8
|
-
export { getLanguage, registerLanguage } from './chunk-
|
|
6
|
+
export { registerSynonyms } from './chunk-RYH3PASD.mjs';
|
|
7
|
+
export { registerPartialWordSearch, registerPatternSearch } from './chunk-K76F5YYX.mjs';
|
|
8
|
+
export { getLanguage, registerLanguage } from './chunk-M6MBSVIJ.mjs';
|
|
9
9
|
import './chunk-ZATRDAYU.mjs';
|
|
10
10
|
import './chunk-EBIHRL7B.mjs';
|
|
11
11
|
import './chunk-HJSN7UYG.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-Y4NOHICF.mjs';
|
|
13
13
|
import './chunk-TGP5M5R7.mjs';
|
|
14
14
|
import './chunk-U2BKYEC7.mjs';
|
|
15
15
|
export { isSimdAvailable } from './chunk-KOKM4PQN.mjs';
|
|
16
16
|
import './chunk-QSK35UC2.mjs';
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './chunk-
|
|
17
|
+
import './chunk-3XHFVYIQ.mjs';
|
|
18
|
+
import './chunk-AN3CUMPZ.mjs';
|
|
19
19
|
import './chunk-WQBCBKY3.mjs';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-
|
|
20
|
+
import './chunk-F4UKMTKM.mjs';
|
|
21
|
+
import './chunk-AFOZR4ZQ.mjs';
|
|
22
22
|
import './chunk-U476IXKQ.mjs';
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-DX2FI4LU.mjs';
|
|
24
24
|
import './chunk-VJS4JFBQ.mjs';
|
|
25
25
|
import './chunk-GES7U2PM.mjs';
|
|
26
|
-
import './chunk-
|
|
27
|
-
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-
|
|
26
|
+
import './chunk-4XEVROSP.mjs';
|
|
27
|
+
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-MGD7XETB.mjs';
|
|
28
28
|
import './chunk-X5CV2E2B.mjs';
|
|
29
29
|
import './chunk-7X5JST5L.mjs';
|
|
30
|
-
export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-
|
|
30
|
+
export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-RC27KF7F.mjs';
|
|
31
31
|
import './chunk-R6A773WK.mjs';
|
|
32
32
|
import './chunk-YTJCGKM4.mjs';
|
|
33
|
-
import './chunk-
|
|
34
|
-
import './chunk-
|
|
33
|
+
import './chunk-UJWGQIXU.mjs';
|
|
34
|
+
import './chunk-XTER67YM.mjs';
|
|
35
35
|
import './chunk-22YPZVMG.mjs';
|
|
36
36
|
import './chunk-RFBLQLLZ.mjs';
|
|
37
37
|
import './chunk-L5ORED7V.mjs';
|
|
38
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-
|
|
38
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-WI5Q3L43.mjs';
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-
|
|
2
|
-
import { answerRequest } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-EZIGAOUJ.mjs';
|
|
2
|
+
import { answerRequest } from './chunk-3LJVM6XM.mjs';
|
|
3
|
+
import './chunk-TB7YMDD5.mjs';
|
|
4
4
|
import './chunk-KZ3NX2P7.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-PTIJAZWL.mjs';
|
|
6
6
|
import './chunk-IWVEG5CX.mjs';
|
|
7
7
|
import './chunk-DJHHF2L5.mjs';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-PCRWCOZC.mjs';
|
|
9
|
+
import './chunk-K76F5YYX.mjs';
|
|
10
10
|
import './chunk-ZATRDAYU.mjs';
|
|
11
11
|
import './chunk-EBIHRL7B.mjs';
|
|
12
12
|
import './chunk-HJSN7UYG.mjs';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-Y4NOHICF.mjs';
|
|
14
14
|
import './chunk-QSK35UC2.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
15
|
+
import './chunk-3XHFVYIQ.mjs';
|
|
16
|
+
import './chunk-AN3CUMPZ.mjs';
|
|
17
17
|
import './chunk-WQBCBKY3.mjs';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-
|
|
18
|
+
import './chunk-F4UKMTKM.mjs';
|
|
19
|
+
import './chunk-AFOZR4ZQ.mjs';
|
|
20
20
|
import './chunk-U476IXKQ.mjs';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-DX2FI4LU.mjs';
|
|
22
22
|
import './chunk-VJS4JFBQ.mjs';
|
|
23
23
|
import './chunk-GES7U2PM.mjs';
|
|
24
|
-
import './chunk-
|
|
24
|
+
import './chunk-4XEVROSP.mjs';
|
|
25
25
|
import './chunk-X5CV2E2B.mjs';
|
|
26
|
-
import './chunk-
|
|
26
|
+
import './chunk-RC27KF7F.mjs';
|
|
27
27
|
import './chunk-R6A773WK.mjs';
|
|
28
28
|
import './chunk-YTJCGKM4.mjs';
|
|
29
29
|
import './chunk-RIIUZJQ3.mjs';
|
|
30
30
|
import './chunk-22YPZVMG.mjs';
|
|
31
31
|
import './chunk-L5ORED7V.mjs';
|
|
32
|
-
import './chunk-
|
|
32
|
+
import './chunk-WI5Q3L43.mjs';
|
|
33
33
|
|
|
34
34
|
// src/server/request-threads/long-query-thread.ts
|
|
35
35
|
var serving = null;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { noteWaitingForMemory, admitsBackgroundBytes } from './chunk-PELHVTO7.mjs';
|
|
2
2
|
import { chargeHeapBytes } from './chunk-IWVEG5CX.mjs';
|
|
3
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, noBuildHistory, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, WORKER_COPY_MIN_VECTORS, allLiveDocIds, SHUFFLED_REBUILD_MEMORY_RETRY_MS, recalibrateFromStore, signatureOf, adoptGraph, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-
|
|
4
|
-
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-
|
|
5
|
-
import { createVectorStore } from './chunk-
|
|
6
|
-
export { openSharedVectorField } from './chunk-
|
|
7
|
-
import { osqBitsOf, createOsqQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, ordinalFilterValues, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, magnitude, nativeStoreScratchBytes, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy } from './chunk-
|
|
8
|
-
export { releaseLocksHeldBy } from './chunk-
|
|
3
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, noBuildHistory, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, WORKER_COPY_MIN_VECTORS, allLiveDocIds, SHUFFLED_REBUILD_MEMORY_RETRY_MS, recalibrateFromStore, signatureOf, adoptGraph, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-QQS4QZQA.mjs';
|
|
4
|
+
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-Y4US5EGH.mjs';
|
|
5
|
+
import { createVectorStore } from './chunk-5VSTAJET.mjs';
|
|
6
|
+
export { openSharedVectorField } from './chunk-5VSTAJET.mjs';
|
|
7
|
+
import { osqBitsOf, createOsqQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, ordinalFilterValues, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, magnitude, nativeStoreScratchBytes, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy } from './chunk-XRXBCOA4.mjs';
|
|
8
|
+
export { releaseLocksHeldBy } from './chunk-XRXBCOA4.mjs';
|
|
9
9
|
import { noteFallback } from './chunk-DJHHF2L5.mjs';
|
|
10
10
|
import './chunk-37CD3OKS.mjs';
|
|
11
11
|
import { spawnNodeWorker } from './chunk-W55X2BYN.mjs';
|
|
12
|
-
import { resolveWorkerCount, resolveWorkerEntry, workerResourceLimits } from './chunk-
|
|
12
|
+
import { resolveWorkerCount, resolveWorkerEntry, workerResourceLimits } from './chunk-44TB6AIZ.mjs';
|
|
13
13
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
14
14
|
import './chunk-EBIHRL7B.mjs';
|
|
15
|
-
import './chunk-
|
|
15
|
+
import './chunk-Y4NOHICF.mjs';
|
|
16
16
|
import './chunk-KOKM4PQN.mjs';
|
|
17
17
|
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-QSK35UC2.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-3XHFVYIQ.mjs';
|
|
19
19
|
import './chunk-U476IXKQ.mjs';
|
|
20
|
-
import './chunk-
|
|
20
|
+
import './chunk-DX2FI4LU.mjs';
|
|
21
21
|
import './chunk-VJS4JFBQ.mjs';
|
|
22
22
|
import './chunk-R6A773WK.mjs';
|
|
23
23
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
24
24
|
import './chunk-RIIUZJQ3.mjs';
|
|
25
25
|
import './chunk-22YPZVMG.mjs';
|
|
26
26
|
import { noteThreadSlotLive, noteThreadSlotGone } from './chunk-RFBLQLLZ.mjs';
|
|
27
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-
|
|
27
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-WI5Q3L43.mjs';
|
|
28
28
|
|
|
29
29
|
// src/core/heap.ts
|
|
30
30
|
function createMaxHeap(compare) {
|
package/dist/partial-words.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { partialWordSearchModule } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { partialWordSearchModule } from './chunk-F4UKMTKM.mjs';
|
|
2
|
+
import './chunk-AFOZR4ZQ.mjs';
|
|
3
3
|
import './chunk-U476IXKQ.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-DX2FI4LU.mjs';
|
|
5
5
|
import './chunk-VJS4JFBQ.mjs';
|
|
6
6
|
import './chunk-GES7U2PM.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import './chunk-4XEVROSP.mjs';
|
|
8
|
+
import './chunk-RC27KF7F.mjs';
|
|
9
9
|
import './chunk-R6A773WK.mjs';
|
|
10
10
|
import './chunk-YTJCGKM4.mjs';
|
|
11
11
|
import './chunk-L5ORED7V.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-WI5Q3L43.mjs';
|
|
13
13
|
|
|
14
14
|
// src/partial-words/index.ts
|
|
15
15
|
var partialWordSearch = partialWordSearchModule;
|
package/dist/pattern.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { patternSearchModule } from './chunk-
|
|
1
|
+
import { patternSearchModule } from './chunk-AN3CUMPZ.mjs';
|
|
2
2
|
import './chunk-WQBCBKY3.mjs';
|
|
3
3
|
import './chunk-GES7U2PM.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-4XEVROSP.mjs';
|
|
5
5
|
import './chunk-YTJCGKM4.mjs';
|
|
6
6
|
import './chunk-L5ORED7V.mjs';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-WI5Q3L43.mjs';
|
|
8
8
|
|
|
9
9
|
// src/pattern/index.ts
|
|
10
10
|
var patternSearch = patternSearchModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PartitionConfig,
|
|
1
|
+
import { c as BM25FieldParams, P as PartitionConfig, e as ScoringMode, V as VectorIndexConfig } from '../../schema-DGAP_8HJ.js';
|
|
2
2
|
import '../../adapters-BQFQ4PRz.js';
|
|
3
3
|
import '../../synonyms-CpOAHPa-.js';
|
|
4
4
|
|
|
@@ -179,6 +179,7 @@ interface IndexMetadata {
|
|
|
179
179
|
bm25Params: {
|
|
180
180
|
k1: number;
|
|
181
181
|
b: number;
|
|
182
|
+
fields?: Record<string, BM25FieldParams>;
|
|
182
183
|
};
|
|
183
184
|
createdAt: number;
|
|
184
185
|
engineVersion: string;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { createDurableDirectory } from '../../chunk-
|
|
1
|
+
import { createDurableDirectory } from '../../chunk-CSSCLRGY.mjs';
|
|
2
2
|
import '../../chunk-W55X2BYN.mjs';
|
|
3
3
|
import '../../chunk-HLPRHOSO.mjs';
|
|
4
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-37RTD6KD.mjs';
|
|
5
|
+
import '../../chunk-5LC5VMDQ.mjs';
|
|
6
6
|
import '../../chunk-P36MUFEJ.mjs';
|
|
7
7
|
import '../../chunk-YH5OIL7B.mjs';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-2YOAGAGF.mjs';
|
|
9
|
+
import '../../chunk-PCRWCOZC.mjs';
|
|
10
|
+
import '../../chunk-2HQQ7Y5D.mjs';
|
|
11
|
+
import '../../chunk-44TB6AIZ.mjs';
|
|
12
12
|
import '../../chunk-AV4IJKD2.mjs';
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-RYH3PASD.mjs';
|
|
14
|
+
import '../../chunk-K76F5YYX.mjs';
|
|
15
|
+
import '../../chunk-M6MBSVIJ.mjs';
|
|
16
16
|
import '../../chunk-ZATRDAYU.mjs';
|
|
17
17
|
import '../../chunk-EBIHRL7B.mjs';
|
|
18
18
|
import '../../chunk-HJSN7UYG.mjs';
|
|
19
|
-
import '../../chunk-
|
|
19
|
+
import '../../chunk-Y4NOHICF.mjs';
|
|
20
20
|
import '../../chunk-TGP5M5R7.mjs';
|
|
21
21
|
import '../../chunk-U2BKYEC7.mjs';
|
|
22
22
|
import '../../chunk-KOKM4PQN.mjs';
|
|
23
23
|
import '../../chunk-QSK35UC2.mjs';
|
|
24
|
-
import '../../chunk-
|
|
25
|
-
import '../../chunk-
|
|
24
|
+
import '../../chunk-3XHFVYIQ.mjs';
|
|
25
|
+
import '../../chunk-AN3CUMPZ.mjs';
|
|
26
26
|
import '../../chunk-WQBCBKY3.mjs';
|
|
27
|
-
import '../../chunk-
|
|
28
|
-
import '../../chunk-
|
|
27
|
+
import '../../chunk-F4UKMTKM.mjs';
|
|
28
|
+
import '../../chunk-AFOZR4ZQ.mjs';
|
|
29
29
|
import '../../chunk-U476IXKQ.mjs';
|
|
30
|
-
import '../../chunk-
|
|
30
|
+
import '../../chunk-DX2FI4LU.mjs';
|
|
31
31
|
import '../../chunk-VJS4JFBQ.mjs';
|
|
32
32
|
import '../../chunk-GES7U2PM.mjs';
|
|
33
|
-
import '../../chunk-
|
|
34
|
-
import '../../chunk-
|
|
33
|
+
import '../../chunk-4XEVROSP.mjs';
|
|
34
|
+
import '../../chunk-MGD7XETB.mjs';
|
|
35
35
|
import '../../chunk-X5CV2E2B.mjs';
|
|
36
36
|
import '../../chunk-7X5JST5L.mjs';
|
|
37
|
-
import '../../chunk-
|
|
37
|
+
import '../../chunk-RC27KF7F.mjs';
|
|
38
38
|
import '../../chunk-R6A773WK.mjs';
|
|
39
39
|
import '../../chunk-YTJCGKM4.mjs';
|
|
40
|
-
import '../../chunk-
|
|
41
|
-
import '../../chunk-
|
|
40
|
+
import '../../chunk-UJWGQIXU.mjs';
|
|
41
|
+
import '../../chunk-XTER67YM.mjs';
|
|
42
42
|
import '../../chunk-22YPZVMG.mjs';
|
|
43
43
|
import '../../chunk-RFBLQLLZ.mjs';
|
|
44
44
|
import '../../chunk-L5ORED7V.mjs';
|
|
45
|
-
import '../../chunk-
|
|
45
|
+
import '../../chunk-WI5Q3L43.mjs';
|
|
46
46
|
|
|
47
47
|
// src/persistence/durability/rebuild.ts
|
|
48
48
|
async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = [], keepsWriteRecords = false) {
|
package/dist/react.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { N as NarsilError, L as ListParams, g as ListResult, I as IndexInfo, k as IndexStats, Q as QueryParams, P as PreflightResult, e as QueryResult, h as SuggestParams, j as SuggestResult } from './events-
|
|
2
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './events-
|
|
3
|
-
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-
|
|
4
|
-
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-
|
|
1
|
+
import { N as NarsilError, L as ListParams, g as ListResult, I as IndexInfo, k as IndexStats, Q as QueryParams, P as PreflightResult, e as QueryResult, h as SuggestParams, j as SuggestResult } from './events-pM0lna7M.js';
|
|
2
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './events-pM0lna7M.js';
|
|
3
|
+
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-txGvNz6h.js';
|
|
4
|
+
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-txGvNz6h.js';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
import { N as Narsil } from './engine-
|
|
7
|
-
import { N as NarsilClient, I as ImportSource } from './client-
|
|
8
|
-
import { A as AnyDocument } from './schema-
|
|
6
|
+
import { N as Narsil } from './engine-JjRAXpT3.js';
|
|
7
|
+
import { N as NarsilClient, I as ImportSource } from './client-BOcveV7A.js';
|
|
8
|
+
import { A as AnyDocument } from './schema-DGAP_8HJ.js';
|
|
9
9
|
import './synonyms-CpOAHPa-.js';
|
|
10
10
|
import './adapters-BQFQ4PRz.js';
|
|
11
11
|
|
package/dist/react.mjs
CHANGED
|
@@ -34,6 +34,7 @@ var ErrorCodes = {
|
|
|
34
34
|
SEARCH_INVALID_CURSOR: "SEARCH_INVALID_CURSOR",
|
|
35
35
|
SEARCH_RESULT_WINDOW_EXCEEDED: "SEARCH_RESULT_WINDOW_EXCEEDED",
|
|
36
36
|
SEARCH_WORK_CAP_EXCEEDED: "SEARCH_WORK_CAP_EXCEEDED",
|
|
37
|
+
BM25_NOT_READY: "BM25_NOT_READY",
|
|
37
38
|
LANGUAGE_NOT_SUPPORTED: "LANGUAGE_NOT_SUPPORTED",
|
|
38
39
|
ENVELOPE_VERSION_MISMATCH: "ENVELOPE_VERSION_MISMATCH",
|
|
39
40
|
ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC",
|