@delali/narsil 0.3.1-next.140 → 0.3.1-next.141
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/{analysis-change-JN23AZQP.mjs → analysis-change-HQUT2Z3I.mjs} +13 -13
- package/dist/{analysis-change-entry-5JSIMEKG.mjs → analysis-change-entry-TZTG4AZB.mjs} +1 -1
- package/dist/browser/{analysis-change-57MIRJWR.mjs → analysis-change-JPV775LR.mjs} +407 -6
- package/dist/browser/{analysis-change-entry-ICGRR3IN.mjs → analysis-change-entry-7HR4LWL3.mjs} +1 -1
- package/dist/browser/chunk-3ZBJYAS4.mjs +19 -0
- package/dist/browser/{chunk-ZAIZQOTM.mjs → chunk-5DB2VDGI.mjs} +951 -1134
- package/dist/browser/chunk-6RHTAVZX.mjs +656 -0
- package/dist/browser/chunk-CCOAOO73.mjs +86 -0
- package/dist/browser/{chunk-3EYDURFD.mjs → chunk-HKX2G6WH.mjs} +1615 -2266
- package/dist/browser/{chunk-CGVBGHBX.mjs → chunk-KTOK275N.mjs} +531 -830
- package/dist/browser/{chunk-5LYWZJE2.mjs → chunk-LVY2LI35.mjs} +1 -1
- package/dist/browser/chunk-MVM33ZUL.mjs +993 -0
- package/dist/browser/chunk-MWUK3DA5.mjs +2634 -0
- package/dist/browser/{chunk-67KSBUYR.mjs → chunk-R4WUDZQV.mjs} +8 -5
- package/dist/browser/{chunk-6BSB4N6B.mjs → chunk-TCLEOZ4P.mjs} +2 -2
- package/dist/browser/chunk-VFYMPCOV.mjs +212 -0
- package/dist/browser/chunk-WCFCHIBB.mjs +177 -0
- package/dist/browser/{chunk-E5SFTOQR.mjs → chunk-XNWPP5NS.mjs} +2 -2
- package/dist/browser/{chunk-QHNNULPW.mjs → chunk-ZEV26AQ6.mjs} +5 -0
- package/dist/browser/cold-module-MJMKNUYJ.mjs +745 -0
- package/dist/browser/{durability-wiring-MTIAN6VT.mjs → durability-wiring-SNOWIT6Z.mjs} +231 -51
- package/dist/browser/{import-Q7MXD6BS.mjs → import-TLB2A5LJ.mjs} +6 -5
- package/dist/browser/module-BUFNZMEU.mjs +12 -0
- package/dist/browser/{module-5J3PEUEB.mjs → module-BVP4TKZU.mjs} +395 -108
- package/dist/{restore-queue-RYSRRFS4.mjs → browser/restore-queue-ONYNYUDE.mjs} +2 -2
- package/dist/browser/{snapshot-YBJ5MF2M.mjs → snapshot-QXBKHJAG.mjs} +108 -25
- package/dist/browser/{write-RTWI5MXL.mjs → write-WHFBDWQS.mjs} +63 -91
- package/dist/{capabilities-DXAmysqJ.d.ts → capabilities-BCdUwK_L.d.ts} +2 -2
- package/dist/{chunk-HMDT3I63.mjs → chunk-46NZOPHS.mjs} +2 -2
- package/dist/{chunk-XXKWEG53.mjs → chunk-5WYVUPGD.mjs} +1 -1
- package/dist/chunk-6SNBQESJ.mjs +214 -0
- package/dist/chunk-7AUASRE7.mjs +653 -0
- package/dist/{chunk-4GCN34JV.mjs → chunk-AST3SHFA.mjs} +26 -24
- package/dist/chunk-BOJZGUS6.mjs +177 -0
- package/dist/{chunk-IP4HJOGC.mjs → chunk-BRUUBXCB.mjs} +4 -3
- package/dist/{chunk-J3EHATEZ.mjs → chunk-DQNKVOJ2.mjs} +63 -63
- package/dist/chunk-FOCV4CBZ.mjs +87 -0
- package/dist/{chunk-FFVLPCLH.mjs → chunk-GLZHNSGB.mjs} +1 -1
- package/dist/chunk-GWOS5DYC.mjs +2637 -0
- package/dist/{chunk-W2XDK66Z.mjs → chunk-IO5F7ZBE.mjs} +112 -438
- package/dist/{chunk-P36MUFEJ.mjs → chunk-JDDXV6UF.mjs} +2 -1
- package/dist/{chunk-LLDFIKGP.mjs → chunk-KEIYVZUX.mjs} +4 -4
- package/dist/{chunk-UBXJQJII.mjs → chunk-KGOXHLLZ.mjs} +5 -1
- package/dist/{chunk-FKARMUWH.mjs → chunk-KZL72VTC.mjs} +68 -16
- package/dist/{chunk-TCWQJL7O.mjs → chunk-L76W3IZJ.mjs} +5 -0
- package/dist/{chunk-CPCGEIOM.mjs → chunk-LA4WNDHL.mjs} +83 -799
- package/dist/{chunk-PNNVTKMT.mjs → chunk-NJJCPFXN.mjs} +2 -2
- package/dist/chunk-NN33CZRE.mjs +86 -0
- package/dist/chunk-NRUXBYPH.mjs +121 -0
- package/dist/{chunk-UJWGQIXU.mjs → chunk-QHPYS427.mjs} +1 -0
- package/dist/{chunk-VSUYTPME.mjs → chunk-RHKRTYGO.mjs} +13 -4
- package/dist/{chunk-UEV53BBO.mjs → chunk-SRJBFG2T.mjs} +406 -5
- package/dist/{chunk-K3AQOZVM.mjs → chunk-TNBIK2LQ.mjs} +1638 -1644
- package/dist/chunk-UUZCQQG2.mjs +209 -0
- package/dist/{chunk-XMQNOD5V.mjs → chunk-VEFN6X6Q.mjs} +2 -2
- package/dist/{chunk-LK3MOTXF.mjs → chunk-VJEGOELZ.mjs} +8 -5
- package/dist/chunk-W2COJ5AH.mjs +148 -0
- package/dist/{chunk-IBATGS3J.mjs → chunk-WJGO5PGV.mjs} +241 -124
- package/dist/{chunk-CCCGEPJM.mjs → chunk-XZ3SRNDJ.mjs} +24 -63
- package/dist/{chunk-MTQTX4BP.mjs → chunk-YHUTF6EA.mjs} +400 -92
- package/dist/{chunk-B5I3IL4H.mjs → chunk-YLNSJQLX.mjs} +4 -4
- package/dist/{chunk-6VHWXAOI.mjs → chunk-Z4HFMYNX.mjs} +29 -24
- package/dist/{chunk-U4X4AWKL.mjs → chunk-ZPWS2SKJ.mjs} +293 -270
- package/dist/{client-DApBeLbk.d.ts → client-B12YFALP.d.ts} +3 -3
- package/dist/client.d.ts +7 -7
- package/dist/cold-module-4X7WJCFM.mjs +783 -0
- package/dist/{config-B0H-vp4U.d.ts → config-BhZxIeb1.d.ts} +6 -1
- package/dist/{config-Brysl9NO.d.ts → config-CIG5yDyg.d.ts} +2 -2
- package/dist/{direct-executor-J5UDLPL3.mjs → direct-executor-7XOQ7VQP.mjs} +5 -5
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution.d.ts +7 -7
- package/dist/distribution.mjs +123 -42
- package/dist/{durability-wiring-AYOTAPNQ.mjs → durability-wiring-324D2DDD.mjs} +213 -40
- package/dist/{engine-CuLMbH1-.d.ts → engine-CtzbHOmG.d.ts} +2 -2
- package/dist/{import-QRZAQ5RH.mjs → import-OOBUW3RR.mjs} +14 -13
- package/dist/{index-HYnqS1SE.d.ts → index-DsEurhSl.d.ts} +1 -1
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +11 -11
- package/dist/{long-query-thread-U7K5A72G.mjs → long-query-thread-4SW7RWDE.mjs} +8 -8
- package/dist/{module-L2OZO5PQ.mjs → module-DXSJ5LT2.mjs} +374 -83
- package/dist/module-IYPLWHGC.mjs +48 -0
- package/dist/paged-partition-archive-HFP45PLU.mjs +269 -0
- package/dist/partial-words.mjs +2 -2
- package/dist/persistence/durability/checkpoint-worker.d.ts +5 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +17 -15
- package/dist/react.d.ts +9 -9
- package/dist/{browser/restore-queue-DISFECE4.mjs → restore-queue-FEYAC4SB.mjs} +2 -2
- package/dist/{schema-BTXbHCqA.d.ts → schema-B-Runv0n.d.ts} +7 -0
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +8 -7
- package/dist/{snapshot-BTRZ3MZK.mjs → snapshot-CGM65VCD.mjs} +60 -25
- package/dist/{tasks-DjGjK70Y.d.ts → tasks-CjRJRGTb.d.ts} +6 -4
- package/dist/{thread-USB3GOPY.mjs → thread-KGNAIKPD.mjs} +8 -8
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +3 -2
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-GHTA56OW.mjs → write-2DZPEQL2.mjs} +70 -98
- package/openapi.json +13 -0
- package/package.json +12 -8
- package/dist/browser/chunk-XVMOQQ34.mjs +0 -384
- package/dist/chunk-BDIDUW2B.mjs +0 -387
- package/dist/browser/{chunk-4MFH226Q.mjs → chunk-D33A5VMU.mjs} +15 -15
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-
|
|
3
|
-
import { decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest, writeMetadataEnvelope, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo,
|
|
1
|
+
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-NJJCPFXN.mjs';
|
|
2
|
+
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, removeLeftoverRewriteFiles, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-RHKRTYGO.mjs';
|
|
3
|
+
import { decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest, writeMetadataEnvelope, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, metadataConfigOf, durableMetadataConfigOf, readCurrentManifest } from './chunk-YHUTF6EA.mjs';
|
|
4
|
+
import { VECTOR_FILE_ENVELOPE_VERSION } from './chunk-NRUXBYPH.mjs';
|
|
5
|
+
import './chunk-W2COJ5AH.mjs';
|
|
4
6
|
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-ICW45TTU.mjs';
|
|
5
7
|
import './chunk-37CD3OKS.mjs';
|
|
6
|
-
import { createDurableDirectory } from './chunk-
|
|
8
|
+
import { createDurableDirectory } from './chunk-AST3SHFA.mjs';
|
|
7
9
|
import { spawnNodeWorker } from './chunk-W55X2BYN.mjs';
|
|
8
10
|
import { getFs } from './chunk-HLPRHOSO.mjs';
|
|
9
|
-
import {
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
11
|
+
import { nextSegmentKey, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, SEGMENT_HEADER_SIZE, buildEntry, captureWholePartition, checkpointLastSeqNo } from './chunk-LA4WNDHL.mjs';
|
|
12
|
+
import './chunk-JDDXV6UF.mjs';
|
|
13
|
+
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, readSegmentFile, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-7AUASRE7.mjs';
|
|
14
|
+
import { directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, MAX_SEGMENTS_PER_PARTITION } from './chunk-UUZCQQG2.mjs';
|
|
15
|
+
import './chunk-KEIYVZUX.mjs';
|
|
12
16
|
import './chunk-YH5OIL7B.mjs';
|
|
13
|
-
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
17
|
+
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-IO5F7ZBE.mjs';
|
|
18
|
+
import './chunk-VEFN6X6Q.mjs';
|
|
19
|
+
import './chunk-5WYVUPGD.mjs';
|
|
20
|
+
import './chunk-HJSN7UYG.mjs';
|
|
16
21
|
import { resolveWorkerEntry } from './chunk-UIKN2OTQ.mjs';
|
|
17
22
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
23
|
+
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-EEBCDP36.mjs';
|
|
24
|
+
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-WJGO5PGV.mjs';
|
|
25
|
+
import { fnv1a } from './chunk-ZPWS2SKJ.mjs';
|
|
20
26
|
import './chunk-N37VMC62.mjs';
|
|
21
27
|
import './chunk-ZATRDAYU.mjs';
|
|
22
28
|
import './chunk-EBIHRL7B.mjs';
|
|
23
|
-
import './chunk-HJSN7UYG.mjs';
|
|
24
|
-
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-EEBCDP36.mjs';
|
|
25
29
|
import './chunk-KOKM4PQN.mjs';
|
|
26
30
|
import './chunk-QSK35UC2.mjs';
|
|
27
31
|
import './chunk-74XB2SXI.mjs';
|
|
28
32
|
import './chunk-RKAVHNRW.mjs';
|
|
29
33
|
import './chunk-WQBCBKY3.mjs';
|
|
30
34
|
import './chunk-JUKYYXSP.mjs';
|
|
31
|
-
import './chunk-
|
|
32
|
-
import { encodeDocument, requireValidFieldTypes } from './chunk-
|
|
35
|
+
import './chunk-DQNKVOJ2.mjs';
|
|
36
|
+
import { encodeDocument, requireValidFieldTypes } from './chunk-KGOXHLLZ.mjs';
|
|
33
37
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
34
38
|
import './chunk-FQBFZAWG.mjs';
|
|
35
39
|
import { MIN_M } from './chunk-VJS4JFBQ.mjs';
|
|
@@ -44,8 +48,8 @@ import './chunk-NPNK57CA.mjs';
|
|
|
44
48
|
import './chunk-4UMZ7KQL.mjs';
|
|
45
49
|
import './chunk-R6A773WK.mjs';
|
|
46
50
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
47
|
-
import './chunk-
|
|
48
|
-
import './chunk-
|
|
51
|
+
import { createRequestId } from './chunk-QHPYS427.mjs';
|
|
52
|
+
import './chunk-GLZHNSGB.mjs';
|
|
49
53
|
import './chunk-22YPZVMG.mjs';
|
|
50
54
|
import './chunk-RFBLQLLZ.mjs';
|
|
51
55
|
import './chunk-L5ORED7V.mjs';
|
|
@@ -319,6 +323,7 @@ function storageFailed(code, message, key, error) {
|
|
|
319
323
|
}
|
|
320
324
|
function directoryRestoreStorage(directory) {
|
|
321
325
|
return {
|
|
326
|
+
directory,
|
|
322
327
|
read: (key) => directory.read(key),
|
|
323
328
|
write: (key, chunks) => directory.atomicWrite(key, chunks),
|
|
324
329
|
writeJournal: (key, bytes) => directory.atomicWrite(key, bytes),
|
|
@@ -363,6 +368,25 @@ function pathUnder(path, root) {
|
|
|
363
368
|
const next = path.charAt(root.length);
|
|
364
369
|
return next === "" || next === "/" || next === "\\";
|
|
365
370
|
}
|
|
371
|
+
function stagedDirectory(directory, staged, unstaged) {
|
|
372
|
+
const { readRange, byteLength } = directory;
|
|
373
|
+
return {
|
|
374
|
+
root: directory.root,
|
|
375
|
+
appendHandle: (key) => directory.appendHandle(staged(key)),
|
|
376
|
+
markerHandle: (key) => directory.markerHandle(staged(key)),
|
|
377
|
+
atomicWrite: (key, data) => directory.atomicWrite(staged(key), data),
|
|
378
|
+
syncDirectoryOf: (key) => directory.syncDirectoryOf(staged(key)),
|
|
379
|
+
read: (key) => directory.read(staged(key)),
|
|
380
|
+
remove: (key) => directory.remove(staged(key)),
|
|
381
|
+
move: (from, to) => directory.move(staged(from), staged(to)),
|
|
382
|
+
list: async (prefix) => (await directory.list(staged(prefix))).map(unstaged),
|
|
383
|
+
pathOf: (key) => directory.pathOf(staged(key)),
|
|
384
|
+
...readRange === void 0 ? {} : {
|
|
385
|
+
readRange: (key, offset, length) => readRange.call(directory, staged(key), offset, length)
|
|
386
|
+
},
|
|
387
|
+
...byteLength === void 0 ? {} : { byteLength: (key) => byteLength.call(directory, staged(key)) }
|
|
388
|
+
};
|
|
389
|
+
}
|
|
366
390
|
function createRestoreStaging(storage, indexName, options = {}) {
|
|
367
391
|
const stagingPrefix = newStagingPrefix();
|
|
368
392
|
const indexRoot = `${indexName}/`;
|
|
@@ -384,6 +408,7 @@ function createRestoreStaging(storage, indexName, options = {}) {
|
|
|
384
408
|
};
|
|
385
409
|
const pathOf = storage.pathOf;
|
|
386
410
|
if (pathOf !== void 0) store.pathOf = (key) => pathOf.call(storage, staged(key));
|
|
411
|
+
if (storage.directory !== void 0) store.directory = stagedDirectory(storage.directory, staged, unstaged);
|
|
387
412
|
let retiredPrefix = null;
|
|
388
413
|
async function finishOnStorage() {
|
|
389
414
|
retiredPrefix = await finishJournal(storage, indexName, stagingPrefix);
|
|
@@ -503,7 +528,8 @@ function createArchiveCheckpointAccess(deps) {
|
|
|
503
528
|
const whole = await readListedFile(store, ref.key, { bytes: ref.bytes, what: "checkpoint file" });
|
|
504
529
|
return whole.slice(offset, offset + length);
|
|
505
530
|
},
|
|
506
|
-
release
|
|
531
|
+
release,
|
|
532
|
+
directory: deps.directory
|
|
507
533
|
};
|
|
508
534
|
} catch (error) {
|
|
509
535
|
release();
|
|
@@ -636,6 +662,22 @@ async function makeEveryAppliedMutationDurable(indexState, failPartition2) {
|
|
|
636
662
|
}
|
|
637
663
|
}
|
|
638
664
|
}
|
|
665
|
+
async function openNewLogSegments(indexState, failPartition2) {
|
|
666
|
+
const rolls = [...indexState.partitions].map(async ([partitionId, partition]) => {
|
|
667
|
+
try {
|
|
668
|
+
if (partition.failed === null) await partition.walWriter.prepareCheckpointRoll();
|
|
669
|
+
} catch (error) {
|
|
670
|
+
failPartition2(partitionId, partition, error);
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
const rolled = partition.appendChain.then(() => partition.failed === null ? partition.walWriter.rollForCheckpoint() : void 0).catch((error) => {
|
|
674
|
+
failPartition2(partitionId, partition, error);
|
|
675
|
+
});
|
|
676
|
+
partition.appendChain = rolled;
|
|
677
|
+
await rolled;
|
|
678
|
+
});
|
|
679
|
+
await Promise.all(rolls);
|
|
680
|
+
}
|
|
639
681
|
function aTargetFailed(indexState, targets) {
|
|
640
682
|
return targets.some((target) => (indexState.partitions.get(target.partitionId)?.failed ?? null) !== null);
|
|
641
683
|
}
|
|
@@ -668,9 +710,10 @@ function wholePartitionsWhereMostChanged(manager, rules) {
|
|
|
668
710
|
return whole;
|
|
669
711
|
};
|
|
670
712
|
}
|
|
671
|
-
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf) {
|
|
713
|
+
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf, onCaptured) {
|
|
672
714
|
for (const vectorIndex of vectorIndexes.values()) await vectorIndex.completeGraph();
|
|
673
715
|
return whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
716
|
+
onCaptured?.();
|
|
674
717
|
const documentCount = manager.countDocuments();
|
|
675
718
|
const targets = [];
|
|
676
719
|
let recordsLeftInLog = 0;
|
|
@@ -1026,23 +1069,68 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1026
1069
|
const writeRecords = input.hooks.writeRecords ?? null;
|
|
1027
1070
|
const { indexName } = input;
|
|
1028
1071
|
const priorManifest = await readCurrentManifest(store, input.indexName);
|
|
1072
|
+
const textOnDisk = metadata.textStorage === "disk";
|
|
1073
|
+
const wholePartitionsOf = wholePartitionsWhereMostChanged(manager, {
|
|
1074
|
+
priorCheckpoint: priorManifest?.checkpoint ?? [],
|
|
1075
|
+
priorPartitionIds: (priorManifest?.partitions ?? []).map((partition) => partition.partitionId),
|
|
1076
|
+
everyPartition: fromMemory,
|
|
1077
|
+
aWorkerCanSerialise: input.canOffload && !textOnDisk && checkpointWorkerIsUsable(),
|
|
1078
|
+
...writeRecords === null ? {} : {
|
|
1079
|
+
captureRecords: (partitionId) => (segments) => writeRecords.captureSegments(indexName, partitionId, segments)
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
let changesSinceCapture = null;
|
|
1029
1083
|
const capture2 = await captureCheckpoint(
|
|
1030
1084
|
input.indexState,
|
|
1031
1085
|
manager,
|
|
1032
1086
|
vectorIndexes,
|
|
1033
|
-
|
|
1034
|
-
priorCheckpoint: priorManifest?.checkpoint ?? [],
|
|
1035
|
-
priorPartitionIds: (priorManifest?.partitions ?? []).map((partition) => partition.partitionId),
|
|
1036
|
-
everyPartition: fromMemory,
|
|
1037
|
-
aWorkerCanSerialise: input.canOffload && checkpointWorkerIsUsable(),
|
|
1038
|
-
...writeRecords === null ? {} : {
|
|
1039
|
-
captureRecords: (partitionId) => (segments2) => writeRecords.captureSegments(indexName, partitionId, segments2)
|
|
1040
|
-
}
|
|
1041
|
-
}),
|
|
1087
|
+
textOnDisk && !fromMemory ? void 0 : wholePartitionsOf,
|
|
1042
1088
|
fromMemory ? void 0 : priorManifest?.checkpoint ?? [],
|
|
1043
1089
|
priorManifest?.vectors ?? [],
|
|
1044
|
-
writeRecords === null ? void 0 : (partitionId, lastSeqNo) => writeRecords.termHistoryOf(indexName, partitionId, lastSeqNo)
|
|
1090
|
+
writeRecords === null ? void 0 : (partitionId, lastSeqNo) => writeRecords.termHistoryOf(indexName, partitionId, lastSeqNo),
|
|
1091
|
+
textOnDisk ? () => {
|
|
1092
|
+
changesSinceCapture = manager.openCheckpointChangeLog();
|
|
1093
|
+
} : void 0
|
|
1045
1094
|
);
|
|
1095
|
+
try {
|
|
1096
|
+
await openNewLogSegments(input.indexState, input.failPartition);
|
|
1097
|
+
return await finishBoundedCheckpoint(input, manager, store, metadata, priorManifest, capture2, fromMemory, () => {
|
|
1098
|
+
return changesSinceCapture;
|
|
1099
|
+
});
|
|
1100
|
+
} finally {
|
|
1101
|
+
changesSinceCapture?.close();
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
async function adoptWrittenSegments(input, manager, partitions, changes) {
|
|
1105
|
+
const { indexName, indexState, hooks } = input;
|
|
1106
|
+
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-IYPLWHGC.mjs');
|
|
1107
|
+
const adoption = await prepareDiskAdoption(input.directory, manager, partitions);
|
|
1108
|
+
if (adoption === null) return [];
|
|
1109
|
+
const adopted = await whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
1110
|
+
if (changes.partitionsReplaced) return false;
|
|
1111
|
+
const changed = changes.takeWrittenDocIds();
|
|
1112
|
+
swapPreparedPartitions(manager, adoption.partitions, changed, (partitionId, segments) => {
|
|
1113
|
+
hooks.writeRecords?.adoptPagedSegments(indexName, partitionId, segments, changed);
|
|
1114
|
+
});
|
|
1115
|
+
hooks.queueDiskAdoption?.({
|
|
1116
|
+
type: "adoptDiskSegments",
|
|
1117
|
+
indexName,
|
|
1118
|
+
partitions: actionPartitionsOf(adoption),
|
|
1119
|
+
changed: [...changed],
|
|
1120
|
+
requestId: createRequestId()
|
|
1121
|
+
});
|
|
1122
|
+
return true;
|
|
1123
|
+
});
|
|
1124
|
+
if (!adopted) {
|
|
1125
|
+
closeUnusedSegments(adoption);
|
|
1126
|
+
return [];
|
|
1127
|
+
}
|
|
1128
|
+
await hooks.awaitCopiesOfIndex?.(indexName);
|
|
1129
|
+
return adoption.droppedKeys;
|
|
1130
|
+
}
|
|
1131
|
+
async function finishBoundedCheckpoint(input, manager, store, metadata, priorManifest, capture2, fromMemory, changesSinceCapture) {
|
|
1132
|
+
const vectorIndexes = input.hooks.getVectorIndexes(input.indexName);
|
|
1133
|
+
const writeRecords = input.hooks.writeRecords ?? null;
|
|
1046
1134
|
const { targets, documentCount } = capture2;
|
|
1047
1135
|
await makeEveryAppliedMutationDurable(input.indexState, input.failPartition);
|
|
1048
1136
|
if (aTargetFailed(input.indexState, targets)) return 0;
|
|
@@ -1066,8 +1154,15 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1066
1154
|
input.hooks.onManifestCommitted(input.indexName, metadata.analysisGeneration ?? 0);
|
|
1067
1155
|
recordWrittenVectors(vectorIndexes, liveVectors.written);
|
|
1068
1156
|
await adoptVectorLayouts(store, vectorIndexes, liveVectors.layouts);
|
|
1157
|
+
const changes = changesSinceCapture();
|
|
1158
|
+
const droppedThisCheckpoint = changes !== null && capture2.recordsLeftInLog === 0 ? new Set(await adoptWrittenSegments(input, manager, segments.partitions, changes)) : /* @__PURE__ */ new Set();
|
|
1069
1159
|
if (!input.holdsCheckpointFiles()) {
|
|
1070
|
-
|
|
1160
|
+
const removable = await garbageThatNoFieldStillReads(store, vectorIndexes, written.garbage);
|
|
1161
|
+
const stillRead = metadata.textStorage === "disk" ? (await import('./module-IYPLWHGC.mjs')).keysThatSegmentsStillRead(manager) : /* @__PURE__ */ new Set();
|
|
1162
|
+
await removeCheckpointGarbage(
|
|
1163
|
+
store,
|
|
1164
|
+
removable.filter((key) => !droppedThisCheckpoint.has(key) && !stillRead.has(key))
|
|
1165
|
+
);
|
|
1071
1166
|
}
|
|
1072
1167
|
const checkpointDocumentCount = documentCount;
|
|
1073
1168
|
await input.queueMetadataWrite(input.indexName, async () => {
|
|
@@ -1562,6 +1657,8 @@ function parseSegmentStartSeqNo2(key) {
|
|
|
1562
1657
|
function createWalWriter(directory, config) {
|
|
1563
1658
|
const segmentMaxBytes = config.segmentMaxBytes ?? DEFAULT_SEGMENT_MAX_BYTES;
|
|
1564
1659
|
const commitKey = `${config.indexName}/wal/${config.partitionId}/commit`;
|
|
1660
|
+
const preparedKey = nextSegmentKey(config.indexName, config.partitionId);
|
|
1661
|
+
let nextSegmentPrepared = false;
|
|
1565
1662
|
let handle = null;
|
|
1566
1663
|
let activeKey = null;
|
|
1567
1664
|
let activeStartSeqNo = 0;
|
|
@@ -1640,16 +1737,49 @@ function createWalWriter(directory, config) {
|
|
|
1640
1737
|
await withDurabilityLock(flushActiveSegment);
|
|
1641
1738
|
}
|
|
1642
1739
|
}
|
|
1643
|
-
async function
|
|
1644
|
-
|
|
1645
|
-
if (handle !== null) {
|
|
1646
|
-
await flushActiveSegment();
|
|
1647
|
-
await handle.close();
|
|
1648
|
-
handle = null;
|
|
1649
|
-
}
|
|
1650
|
-
await openSegmentByKey(segmentKey(config.indexName, config.partitionId, startSeqNo));
|
|
1740
|
+
async function rollUnderLock(startSeqNo) {
|
|
1741
|
+
if (handle !== null) {
|
|
1651
1742
|
await flushActiveSegment();
|
|
1743
|
+
await handle.close();
|
|
1744
|
+
handle = null;
|
|
1745
|
+
}
|
|
1746
|
+
await openSegmentByKey(segmentKey(config.indexName, config.partitionId, startSeqNo));
|
|
1747
|
+
await flushActiveSegment();
|
|
1748
|
+
}
|
|
1749
|
+
async function rollToNewSegment(startSeqNo) {
|
|
1750
|
+
await withDurabilityLock(() => rollUnderLock(startSeqNo));
|
|
1751
|
+
}
|
|
1752
|
+
function activeSegmentHoldsRecords() {
|
|
1753
|
+
return handle !== null && activeBytes > SEGMENT_HEADER_SIZE && highestAppendedSeqNo >= activeStartSeqNo;
|
|
1754
|
+
}
|
|
1755
|
+
async function prepareNextSegment() {
|
|
1756
|
+
const prepared = await directory.appendHandle(preparedKey);
|
|
1757
|
+
try {
|
|
1758
|
+
if (await prepared.size() > 0) await prepared.truncate(0);
|
|
1759
|
+
await prepared.append(writeSegmentHeader());
|
|
1760
|
+
await prepared.sync();
|
|
1761
|
+
nextSegmentPrepared = true;
|
|
1762
|
+
} finally {
|
|
1763
|
+
await prepared.close();
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
async function swapToPreparedSegment(sealed) {
|
|
1767
|
+
const writer = await getMarkerWriter();
|
|
1768
|
+
const startSeqNo = highestAppendedSeqNo + 1;
|
|
1769
|
+
const durableSeqNo = Math.max(highestAppendedSeqNo, highestDurableSeqNo);
|
|
1770
|
+
const key = segmentKey(config.indexName, config.partitionId, startSeqNo);
|
|
1771
|
+
await Promise.all([sealed.sync(), directory.move(preparedKey, key)]);
|
|
1772
|
+
handle = await directory.appendHandle(key);
|
|
1773
|
+
activeKey = key;
|
|
1774
|
+
activeStartSeqNo = startSeqNo;
|
|
1775
|
+
activeBytes = SEGMENT_HEADER_SIZE;
|
|
1776
|
+
await writer.commit({
|
|
1777
|
+
activeSegmentSeqNo: startSeqNo,
|
|
1778
|
+
durableByteLength: SEGMENT_HEADER_SIZE,
|
|
1779
|
+
highestDurableSeqNo: durableSeqNo
|
|
1652
1780
|
});
|
|
1781
|
+
highestDurableSeqNo = durableSeqNo;
|
|
1782
|
+
await sealed.close();
|
|
1653
1783
|
}
|
|
1654
1784
|
async function maybeRoll(nextSeqNo, appendedBytes) {
|
|
1655
1785
|
if (handle === null || activeBytes <= SEGMENT_HEADER_SIZE) {
|
|
@@ -1735,6 +1865,19 @@ function createWalWriter(directory, config) {
|
|
|
1735
1865
|
await coordinator.commit();
|
|
1736
1866
|
},
|
|
1737
1867
|
rollToNewSegment,
|
|
1868
|
+
async prepareCheckpointRoll() {
|
|
1869
|
+
if (activeSegmentHoldsRecords()) await prepareNextSegment();
|
|
1870
|
+
},
|
|
1871
|
+
async rollForCheckpoint() {
|
|
1872
|
+
await withDurabilityLock(async () => {
|
|
1873
|
+
const sealed = handle;
|
|
1874
|
+
const prepared = nextSegmentPrepared;
|
|
1875
|
+
nextSegmentPrepared = false;
|
|
1876
|
+
if (sealed === null || !activeSegmentHoldsRecords()) return;
|
|
1877
|
+
if (prepared) await swapToPreparedSegment(sealed);
|
|
1878
|
+
else await rollUnderLock(highestAppendedSeqNo + 1);
|
|
1879
|
+
});
|
|
1880
|
+
},
|
|
1738
1881
|
async close() {
|
|
1739
1882
|
await withDurabilityLock(async () => {
|
|
1740
1883
|
if (handle !== null) {
|
|
@@ -2209,9 +2352,33 @@ async function readEarlierSegmentDocuments(store, key) {
|
|
|
2209
2352
|
|
|
2210
2353
|
// src/persistence/durability/checkpoint-count.ts
|
|
2211
2354
|
var decoder = new TextDecoder();
|
|
2355
|
+
async function countPagedPartition(store, partition) {
|
|
2356
|
+
const { directory } = store;
|
|
2357
|
+
if (directory === void 0 || partition.segments.length === 0) return null;
|
|
2358
|
+
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-IYPLWHGC.mjs');
|
|
2359
|
+
for (const ref of partition.segments) if (!await isPagedSegmentFile(directory, ref.key)) return null;
|
|
2360
|
+
const scans = [];
|
|
2361
|
+
try {
|
|
2362
|
+
for (const ref of partition.segments) scans.push(await openPagedSegmentScan(directory, ref));
|
|
2363
|
+
let live = 0;
|
|
2364
|
+
for (let at = 0; at < scans.length; at++) {
|
|
2365
|
+
for (let ordinal = 0; ordinal < scans[at].count; ordinal++) {
|
|
2366
|
+
if (countsAsLatestHolder(scans, at, scans[at].idAt(ordinal))) live += 1;
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
return live;
|
|
2370
|
+
} finally {
|
|
2371
|
+
for (const scan of scans) scan.close();
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2212
2374
|
async function countCurrentLayout(store, manifest) {
|
|
2213
2375
|
let total = 0;
|
|
2214
2376
|
for (const partition of manifest.partitions) {
|
|
2377
|
+
const paged = await countPagedPartition(store, partition);
|
|
2378
|
+
if (paged !== null) {
|
|
2379
|
+
total += paged;
|
|
2380
|
+
continue;
|
|
2381
|
+
}
|
|
2215
2382
|
const live = /* @__PURE__ */ new Set();
|
|
2216
2383
|
for (const ref of partition.segments) {
|
|
2217
2384
|
const contents = await readSegmentFile(store, ref);
|
|
@@ -2619,7 +2786,7 @@ async function recoverPersistedIndex(deps, indexName, metadataOnly) {
|
|
|
2619
2786
|
|
|
2620
2787
|
// src/persistence/durability/manager.ts
|
|
2621
2788
|
function createDurabilityManager(config, hooks, directoryOverride) {
|
|
2622
|
-
const directory = createDurableDirectory(config.directory ?? "");
|
|
2789
|
+
const directory = directoryOverride ?? createDurableDirectory(config.directory ?? "");
|
|
2623
2790
|
const canOffloadCheckpoint = directoryOverride === void 0;
|
|
2624
2791
|
const segmentMaxBytes = config.segmentMaxBytes ?? DEFAULT_SEGMENT_MAX_BYTES;
|
|
2625
2792
|
const checkpointIntervalMs = config.checkpointIntervalMs ?? DEFAULT_CHECKPOINT_INTERVAL_MS;
|
|
@@ -2802,6 +2969,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2802
2969
|
await directoryWatch.claim();
|
|
2803
2970
|
await recoverDirectoryRestores(directory);
|
|
2804
2971
|
const names = await listPersistedIndexes(directory);
|
|
2972
|
+
await removeLeftoverRewriteFiles(directory, names);
|
|
2805
2973
|
for (const indexName of names) {
|
|
2806
2974
|
await recoverIndex(indexName, metadataOnly, false);
|
|
2807
2975
|
}
|
|
@@ -2825,6 +2993,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2825
2993
|
keepWriteRecordsWith(keeper) {
|
|
2826
2994
|
hooks.writeRecords = keeper;
|
|
2827
2995
|
},
|
|
2996
|
+
rewriteStorage: () => ({ directory, writeRecords: hooks.writeRecords ?? null }),
|
|
2828
2997
|
heldCheckpoints: () => heldCheckpoints.report(indexes),
|
|
2829
2998
|
async commitPartition(indexName, partitionId) {
|
|
2830
2999
|
const partition = indexes.get(indexName)?.partitions.get(partitionId);
|
|
@@ -3363,6 +3532,8 @@ function createDurabilityIntegration(tier, hooks) {
|
|
|
3363
3532
|
},
|
|
3364
3533
|
mustRewriteTerms: hooks.mustRewriteTerms,
|
|
3365
3534
|
onManifestCommitted: hooks.onManifestCommitted,
|
|
3535
|
+
...hooks.queueDiskAdoption === void 0 ? {} : { queueDiskAdoption: hooks.queueDiskAdoption },
|
|
3536
|
+
...hooks.awaitCopiesOfIndex === void 0 ? {} : { awaitCopiesOfIndex: hooks.awaitCopiesOfIndex },
|
|
3366
3537
|
createIndexFromMetadata: hooks.createIndexFromMetadata,
|
|
3367
3538
|
recordCheckpoint: hooks.recordCheckpoint,
|
|
3368
3539
|
onLayoutUpgrade: hooks.onLayoutUpgrade,
|
|
@@ -3445,6 +3616,8 @@ function createDurabilityFromTier(tier, wiring) {
|
|
|
3445
3616
|
const entry = wiring.indexRegistry.get(indexName);
|
|
3446
3617
|
if (entry !== void 0 && entry.analysisGeneration === analysisGeneration) entry.durableAnalysis = null;
|
|
3447
3618
|
},
|
|
3619
|
+
queueDiskAdoption: wiring.queueDiskAdoption,
|
|
3620
|
+
awaitCopiesOfIndex: wiring.awaitCopiesOfIndex,
|
|
3448
3621
|
createIndexFromMetadata: wiring.createIndexFromMetadata,
|
|
3449
3622
|
recordCheckpoint: wiring.recordCheckpoint,
|
|
3450
3623
|
onLayoutUpgrade: wiring.emitLayoutUpgrade,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
2
|
-
import { B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions, a as IndexConfig, P as PartitionConfig } from './schema-
|
|
3
|
-
import { B as BatchResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, L as ListParams, f as ListResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, l as NarsilEventMap } from './config-
|
|
2
|
+
import { B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions, a as IndexConfig, P as PartitionConfig } from './schema-B-Runv0n.js';
|
|
3
|
+
import { B as BatchResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, L as ListParams, f as ListResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, l as NarsilEventMap } from './config-BhZxIeb1.js';
|
|
4
4
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-6SNBQESJ.mjs';
|
|
2
|
+
import './chunk-BOJZGUS6.mjs';
|
|
2
3
|
import './chunk-CZQ33DLW.mjs';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
4
|
+
import './chunk-L76W3IZJ.mjs';
|
|
5
|
+
import './chunk-IO5F7ZBE.mjs';
|
|
6
|
+
import './chunk-VEFN6X6Q.mjs';
|
|
7
|
+
import './chunk-5WYVUPGD.mjs';
|
|
8
|
+
import './chunk-HJSN7UYG.mjs';
|
|
7
9
|
import './chunk-UIKN2OTQ.mjs';
|
|
8
10
|
import './chunk-AV4IJKD2.mjs';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
+
import './chunk-EEBCDP36.mjs';
|
|
12
|
+
import './chunk-WJGO5PGV.mjs';
|
|
13
|
+
import './chunk-ZPWS2SKJ.mjs';
|
|
11
14
|
import './chunk-N37VMC62.mjs';
|
|
12
15
|
import './chunk-ZATRDAYU.mjs';
|
|
13
16
|
import './chunk-EBIHRL7B.mjs';
|
|
14
|
-
import './chunk-HJSN7UYG.mjs';
|
|
15
|
-
import './chunk-EEBCDP36.mjs';
|
|
16
17
|
import './chunk-KOKM4PQN.mjs';
|
|
17
18
|
import './chunk-QSK35UC2.mjs';
|
|
18
19
|
import './chunk-74XB2SXI.mjs';
|
|
19
20
|
import './chunk-RKAVHNRW.mjs';
|
|
20
21
|
import './chunk-WQBCBKY3.mjs';
|
|
21
22
|
import './chunk-JUKYYXSP.mjs';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-DQNKVOJ2.mjs';
|
|
24
|
+
import './chunk-KGOXHLLZ.mjs';
|
|
24
25
|
import './chunk-U476IXKQ.mjs';
|
|
25
26
|
import './chunk-FQBFZAWG.mjs';
|
|
26
27
|
import './chunk-VJS4JFBQ.mjs';
|
|
@@ -35,8 +36,8 @@ import './chunk-NPNK57CA.mjs';
|
|
|
35
36
|
import './chunk-4UMZ7KQL.mjs';
|
|
36
37
|
import './chunk-R6A773WK.mjs';
|
|
37
38
|
import './chunk-YTJCGKM4.mjs';
|
|
38
|
-
import './chunk-
|
|
39
|
-
import './chunk-
|
|
39
|
+
import './chunk-QHPYS427.mjs';
|
|
40
|
+
import './chunk-GLZHNSGB.mjs';
|
|
40
41
|
import './chunk-22YPZVMG.mjs';
|
|
41
42
|
import './chunk-RFBLQLLZ.mjs';
|
|
42
43
|
import './chunk-L5ORED7V.mjs';
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-
|
|
2
|
-
import './browser/chunk-26A5JFT2.mjs';
|
|
3
|
-
export { isSimdAvailable } from './browser/chunk-4MFH226Q.mjs';
|
|
1
|
+
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-5DB2VDGI.mjs';
|
|
4
2
|
import './browser/chunk-JPTQZWJQ.mjs';
|
|
3
|
+
import './browser/chunk-26A5JFT2.mjs';
|
|
4
|
+
export { isSimdAvailable } from './browser/chunk-D33A5VMU.mjs';
|
|
5
5
|
import './browser/chunk-MZI3TEOW.mjs';
|
|
6
6
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-35B42UFM.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { b as StopWordOverride, C as CustomTokenizer } from './schema-
|
|
2
|
-
export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, d as FieldOptionChain, F as FieldType, a as IndexConfig, I 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-
|
|
1
|
+
import { b as StopWordOverride, C as CustomTokenizer } from './schema-B-Runv0n.js';
|
|
2
|
+
export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, d as FieldOptionChain, F as FieldType, a as IndexConfig, I 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-B-Runv0n.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
|
-
import { e as NarsilConfig } from './config-
|
|
10
|
-
export { A as AnalysisConfig, o as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, p as ComparisonFilter, D as DocumentImportResult, q as DocumentProjection, r as DurabilityConfig, E as ErrorCode, b as ErrorCodes, F as FacetConfig, s as FacetResult, t as FieldFilter, u as FilterExpression, v as GeoFilter, w as GeoPolygonFilter, x as GeoRadiusFilter, n as GroupConfig, y as GroupReducer, G as GroupResult, H as HeldCheckpointReport, z as HighlightConfig, J as HighlightMatch, K as Hit, O as HybridConfig, R as IndexContext, I as IndexInfo, T as IndexLifecycleConfig, k as IndexStats, U as InsertContext, L as ListParams, f as ListResult, W as ListedDocument, X as MainCopyQueries, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, Y as NarsilEventHandlers, l as NarsilEventMap, Z as NarsilPlugin, _ as PartitionContext, P as PartitionStatsResult, j as PreflightResult, $ as PresenceFilter, a0 as ProcessMemoryReport, a1 as QueryCoverage, Q as QueryParams, m as QueryResult, a2 as RemoveContext, a3 as RerankConfig, a4 as ScoreComponents, a5 as SearchContext, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, a7 as SortField, a8 as SortSpec, a9 as StaleAnalysis, aa as StringFilter, g as SuggestParams, h as SuggestResult, ab as TermMatchPolicy, ac as UpdateContext, V as VectorMaintenanceResult, ad as VectorQueryConfig, ae as WorkerConfig, af as WorkerContext, ag as WorkerCopyReport, i as isNarsilError } from './config-
|
|
11
|
-
import { N as Narsil } from './engine-
|
|
12
|
-
export { a as AdapterRegistrationOperations, A as AnalysisChange, b as AnalysisOperations, B as BM25Operations, c as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-
|
|
9
|
+
import { e as NarsilConfig } from './config-BhZxIeb1.js';
|
|
10
|
+
export { A as AnalysisConfig, o as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, p as ComparisonFilter, D as DocumentImportResult, q as DocumentProjection, r as DurabilityConfig, E as ErrorCode, b as ErrorCodes, F as FacetConfig, s as FacetResult, t as FieldFilter, u as FilterExpression, v as GeoFilter, w as GeoPolygonFilter, x as GeoRadiusFilter, n as GroupConfig, y as GroupReducer, G as GroupResult, H as HeldCheckpointReport, z as HighlightConfig, J as HighlightMatch, K as Hit, O as HybridConfig, R as IndexContext, I as IndexInfo, T as IndexLifecycleConfig, k as IndexStats, U as InsertContext, L as ListParams, f as ListResult, W as ListedDocument, X as MainCopyQueries, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, Y as NarsilEventHandlers, l as NarsilEventMap, Z as NarsilPlugin, _ as PartitionContext, P as PartitionStatsResult, j as PreflightResult, $ as PresenceFilter, a0 as ProcessMemoryReport, a1 as QueryCoverage, Q as QueryParams, m as QueryResult, a2 as RemoveContext, a3 as RerankConfig, a4 as ScoreComponents, a5 as SearchContext, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, a7 as SortField, a8 as SortSpec, a9 as StaleAnalysis, aa as StringFilter, g as SuggestParams, h as SuggestResult, ab as TermMatchPolicy, ac as UpdateContext, V as VectorMaintenanceResult, ad as VectorQueryConfig, ae as WorkerConfig, af as WorkerContext, ag as WorkerCopyReport, i as isNarsilError } from './config-BhZxIeb1.js';
|
|
11
|
+
import { N as Narsil } from './engine-CtzbHOmG.js';
|
|
12
|
+
export { a as AdapterRegistrationOperations, A as AnalysisChange, b as AnalysisOperations, B as BM25Operations, c as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-CtzbHOmG.js';
|
|
13
13
|
export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
14
14
|
|
|
15
15
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-IO5F7ZBE.mjs';
|
|
2
|
+
import './chunk-VEFN6X6Q.mjs';
|
|
3
|
+
import './chunk-5WYVUPGD.mjs';
|
|
4
|
+
import './chunk-HJSN7UYG.mjs';
|
|
4
5
|
import './chunk-UIKN2OTQ.mjs';
|
|
5
6
|
import './chunk-AV4IJKD2.mjs';
|
|
6
|
-
|
|
7
|
-
export {
|
|
7
|
+
import './chunk-EEBCDP36.mjs';
|
|
8
|
+
export { registerSynonyms } from './chunk-WJGO5PGV.mjs';
|
|
9
|
+
export { registerPartialWordSearch, registerPatternSearch } from './chunk-ZPWS2SKJ.mjs';
|
|
8
10
|
import './chunk-N37VMC62.mjs';
|
|
9
11
|
import './chunk-ZATRDAYU.mjs';
|
|
10
12
|
import './chunk-EBIHRL7B.mjs';
|
|
11
|
-
import './chunk-HJSN7UYG.mjs';
|
|
12
|
-
import './chunk-EEBCDP36.mjs';
|
|
13
13
|
export { isSimdAvailable } from './chunk-KOKM4PQN.mjs';
|
|
14
14
|
import './chunk-QSK35UC2.mjs';
|
|
15
15
|
import './chunk-74XB2SXI.mjs';
|
|
16
16
|
import './chunk-RKAVHNRW.mjs';
|
|
17
17
|
import './chunk-WQBCBKY3.mjs';
|
|
18
18
|
import './chunk-JUKYYXSP.mjs';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-DQNKVOJ2.mjs';
|
|
20
|
+
import './chunk-KGOXHLLZ.mjs';
|
|
21
21
|
import './chunk-U476IXKQ.mjs';
|
|
22
22
|
import './chunk-FQBFZAWG.mjs';
|
|
23
23
|
import './chunk-VJS4JFBQ.mjs';
|
|
@@ -32,8 +32,8 @@ export { clearNormalizationCache, configureNormalizationCache, getNormalizationC
|
|
|
32
32
|
import './chunk-4UMZ7KQL.mjs';
|
|
33
33
|
import './chunk-R6A773WK.mjs';
|
|
34
34
|
import './chunk-YTJCGKM4.mjs';
|
|
35
|
-
import './chunk-
|
|
36
|
-
import './chunk-
|
|
35
|
+
import './chunk-QHPYS427.mjs';
|
|
36
|
+
import './chunk-GLZHNSGB.mjs';
|
|
37
37
|
import './chunk-22YPZVMG.mjs';
|
|
38
38
|
import './chunk-RFBLQLLZ.mjs';
|
|
39
39
|
import './chunk-L5ORED7V.mjs';
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-
|
|
1
|
+
import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-YLNSJQLX.mjs';
|
|
2
|
+
import './chunk-KZ3NX2P7.mjs';
|
|
2
3
|
import { answerRequest } from './chunk-ZMBFWQXN.mjs';
|
|
3
4
|
import './chunk-SBMAWTRG.mjs';
|
|
4
|
-
import './chunk-KZ3NX2P7.mjs';
|
|
5
5
|
import './chunk-DD2673TX.mjs';
|
|
6
6
|
import './chunk-IWVEG5CX.mjs';
|
|
7
7
|
import './chunk-DJHHF2L5.mjs';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-U4X4AWKL.mjs';
|
|
10
|
-
import './chunk-ZATRDAYU.mjs';
|
|
11
|
-
import './chunk-EBIHRL7B.mjs';
|
|
8
|
+
import './chunk-VEFN6X6Q.mjs';
|
|
12
9
|
import './chunk-HJSN7UYG.mjs';
|
|
13
10
|
import './chunk-EEBCDP36.mjs';
|
|
11
|
+
import './chunk-ZPWS2SKJ.mjs';
|
|
12
|
+
import './chunk-ZATRDAYU.mjs';
|
|
13
|
+
import './chunk-EBIHRL7B.mjs';
|
|
14
14
|
import './chunk-QSK35UC2.mjs';
|
|
15
15
|
import './chunk-74XB2SXI.mjs';
|
|
16
16
|
import './chunk-RKAVHNRW.mjs';
|
|
17
17
|
import './chunk-WQBCBKY3.mjs';
|
|
18
18
|
import './chunk-JUKYYXSP.mjs';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-DQNKVOJ2.mjs';
|
|
20
|
+
import './chunk-KGOXHLLZ.mjs';
|
|
21
21
|
import './chunk-U476IXKQ.mjs';
|
|
22
22
|
import './chunk-FQBFZAWG.mjs';
|
|
23
23
|
import './chunk-VJS4JFBQ.mjs';
|