@delali/narsil 0.3.1-next.131 → 0.3.1-next.140
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/analysis-change-JN23AZQP.mjs +43 -0
- package/dist/analysis-change-entry-5JSIMEKG.mjs +1 -0
- package/dist/browser/analysis-change-57MIRJWR.mjs +499 -0
- package/dist/browser/analysis-change-entry-ICGRR3IN.mjs +1 -0
- package/dist/browser/{chunk-UDGB2MWT.mjs → chunk-35B42UFM.mjs} +4 -0
- package/dist/browser/{chunk-VBBLTD7O.mjs → chunk-3EYDURFD.mjs} +39 -27
- package/dist/browser/{chunk-AIIJDWMG.mjs → chunk-4MFH226Q.mjs} +1 -1
- package/dist/browser/{chunk-D7WQF6DV.mjs → chunk-5LYWZJE2.mjs} +2 -2
- package/dist/browser/chunk-67KSBUYR.mjs +173 -0
- package/dist/browser/{chunk-M5UAAXGU.mjs → chunk-6BSB4N6B.mjs} +2 -2
- package/dist/browser/{chunk-NSCSR6MA.mjs → chunk-CGVBGHBX.mjs} +81 -6
- package/dist/browser/chunk-E5SFTOQR.mjs +21 -0
- package/dist/browser/{chunk-VEGHFP2P.mjs → chunk-MZI3TEOW.mjs} +4 -2
- package/dist/browser/chunk-OIZS5KIX.mjs +6 -0
- package/dist/browser/chunk-QHNNULPW.mjs +265 -0
- package/dist/browser/chunk-XVMOQQ34.mjs +384 -0
- package/dist/browser/{chunk-2Y3CO4EQ.mjs → chunk-ZAIZQOTM.mjs} +256 -777
- package/dist/browser/{durability-wiring-FNZSRH4N.mjs → durability-wiring-MTIAN6VT.mjs} +145 -50
- package/dist/browser/import-Q7MXD6BS.mjs +8 -0
- package/dist/browser/{module-4HIMOQM5.mjs → module-5J3PEUEB.mjs} +7 -6
- package/dist/browser/{phrase-module-WESYVU7K.mjs → phrase-module-HGVBO24W.mjs} +1 -1
- package/dist/{restore-queue-JAMNRC6T.mjs → browser/restore-queue-DISFECE4.mjs} +8 -2
- package/dist/browser/{runtime-3X7ZJ5T3.mjs → runtime-VEUH674B.mjs} +2 -2
- package/dist/browser/{snapshot-V7VF6BN6.mjs → snapshot-YBJ5MF2M.mjs} +36 -167
- package/dist/browser/{write-YIC2MKRY.mjs → write-RTWI5MXL.mjs} +8 -6
- package/dist/{capabilities-B6WxrWxt.d.ts → capabilities-DXAmysqJ.d.ts} +10 -3
- package/dist/{chunk-NMXRXFGZ.mjs → chunk-4GCN34JV.mjs} +2 -2
- package/dist/{chunk-SOHMMNCH.mjs → chunk-6VHWXAOI.mjs} +4 -4
- package/dist/{chunk-2C3WXBQS.mjs → chunk-74XB2SXI.mjs} +1 -1
- package/dist/{chunk-OGLV4I3L.mjs → chunk-B5I3IL4H.mjs} +12 -7
- package/dist/chunk-BDIDUW2B.mjs +387 -0
- package/dist/{chunk-5LX6MOIB.mjs → chunk-C3YDYX6C.mjs} +1 -1
- package/dist/{chunk-Y4BVTQ53.mjs → chunk-CCCGEPJM.mjs} +2 -2
- package/dist/{chunk-2JWNJSNE.mjs → chunk-CPCGEIOM.mjs} +11 -8
- package/dist/chunk-CZQ33DLW.mjs +78 -0
- package/dist/{chunk-4GDLFDPZ.mjs → chunk-DD2673TX.mjs} +3 -2
- package/dist/{chunk-RNSC4NFI.mjs → chunk-EEBCDP36.mjs} +3 -1
- package/dist/{chunk-HCGJKDZV.mjs → chunk-FFVLPCLH.mjs} +1 -1
- package/dist/{chunk-WVRDRLIC.mjs → chunk-FKARMUWH.mjs} +6 -6
- package/dist/{chunk-PATMDIMN.mjs → chunk-HJJWY6PT.mjs} +1 -1
- package/dist/chunk-HMDT3I63.mjs +21 -0
- package/dist/{chunk-CZ7ISLXA.mjs → chunk-HNHCNTVG.mjs} +4 -0
- package/dist/{chunk-RWESFSJI.mjs → chunk-IBATGS3J.mjs} +87 -61
- package/dist/{chunk-Y2U5VVWX.mjs → chunk-ICW45TTU.mjs} +1 -1
- package/dist/{chunk-T4OFG4IQ.mjs → chunk-IP4HJOGC.mjs} +90 -16
- package/dist/{chunk-EUCX5K74.mjs → chunk-J3EHATEZ.mjs} +3 -3
- package/dist/{chunk-X5CNUKD5.mjs → chunk-K3AQOZVM.mjs} +37 -20
- package/dist/chunk-LK3MOTXF.mjs +174 -0
- package/dist/{chunk-7OIQ2SIO.mjs → chunk-LLDFIKGP.mjs} +4 -4
- package/dist/{chunk-K77FJXKS.mjs → chunk-MTQTX4BP.mjs} +81 -8
- package/dist/{chunk-ZR4VM4A6.mjs → chunk-N37VMC62.mjs} +1 -18
- package/dist/{chunk-2WBY4Y4M.mjs → chunk-NOT5QOHU.mjs} +1 -1
- package/dist/{chunk-D5TFRB5G.mjs → chunk-NPNK57CA.mjs} +1 -1
- package/dist/{chunk-6SSVIW7Y.mjs → chunk-O4LJQI4G.mjs} +31 -5
- package/dist/{chunk-JJ6EUMXB.mjs → chunk-PNNVTKMT.mjs} +2 -2
- package/dist/{chunk-2SEL6SBS.mjs → chunk-RKAVHNRW.mjs} +2 -2
- package/dist/{chunk-RCMNL7RI.mjs → chunk-SBMAWTRG.mjs} +41 -4
- package/dist/chunk-TCWQJL7O.mjs +188 -0
- package/dist/{chunk-2MKX2SCO.mjs → chunk-U4X4AWKL.mjs} +7 -7
- package/dist/{chunk-PU6SKH7O.mjs → chunk-UBXJQJII.mjs} +2 -2
- package/dist/chunk-UEV53BBO.mjs +480 -0
- package/dist/{chunk-NNO7CO3A.mjs → chunk-UIKN2OTQ.mjs} +1 -1
- package/dist/{chunk-F6AAXI7T.mjs → chunk-VSUYTPME.mjs} +3 -3
- package/dist/{chunk-TGHNXN7W.mjs → chunk-W2XDK66Z.mjs} +180 -541
- package/dist/{chunk-7X5JST5L.mjs → chunk-WNBRW4Q2.mjs} +16 -2
- package/dist/{chunk-6M6SDH3S.mjs → chunk-XMQNOD5V.mjs} +8 -8
- package/dist/{chunk-SZGRYEIC.mjs → chunk-XS2VM7UE.mjs} +3 -3
- package/dist/{chunk-JT3YZGCE.mjs → chunk-XXKWEG53.mjs} +3 -188
- package/dist/{chunk-5W7AEVTH.mjs → chunk-ZMBFWQXN.mjs} +2 -2
- package/dist/{chunk-7XY6VD7B.mjs → chunk-ZSWHPKGM.mjs} +1 -1
- package/dist/{client-gNAfaHcE.d.ts → client-DApBeLbk.d.ts} +17 -2
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +11 -1
- package/dist/{config-D1cDv3sE.d.ts → config-B0H-vp4U.d.ts} +4 -0
- package/dist/{config-CmYJO34X.d.ts → config-Brysl9NO.d.ts} +1 -1
- package/dist/{direct-executor-HQ4QVDX7.mjs → direct-executor-J5UDLPL3.mjs} +14 -14
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +21 -5
- package/dist/distribution.mjs +882 -192
- package/dist/{durability-wiring-S7OX2MAI.mjs → durability-wiring-AYOTAPNQ.mjs} +165 -70
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-m_Ddr1bz.d.ts → engine-CuLMbH1-.d.ts} +63 -6
- package/dist/import-QRZAQ5RH.mjs +43 -0
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +20 -20
- package/dist/{long-query-thread-BSL25PD6.mjs → long-query-thread-U7K5A72G.mjs} +14 -14
- package/dist/{module-2E4XYSGT.mjs → module-L2OZO5PQ.mjs} +11 -11
- package/dist/partial-words.mjs +5 -5
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +11 -0
- package/dist/persistence/durability/checkpoint-worker.mjs +23 -23
- package/dist/{phrase-module-JERF2IDG.mjs → phrase-module-5QHBD2VJ.mjs} +1 -1
- package/dist/react.d.ts +7 -7
- package/dist/react.mjs +4 -0
- package/dist/{rerank-DMMT4FZA.mjs → rerank-KTLC3E6N.mjs} +5 -5
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{browser/restore-queue-GEZ54CA5.mjs → restore-queue-RYSRRFS4.mjs} +8 -2
- package/dist/{runtime-7MLQ7J64.mjs → runtime-DYV75DCB.mjs} +6 -6
- package/dist/server.d.ts +10 -8
- package/dist/server.mjs +51 -19
- package/dist/{snapshot-DOQLGGEX.mjs → snapshot-BTRZ3MZK.mjs} +59 -190
- package/dist/synonyms.mjs +6 -4
- package/dist/{tasks-Co8HfRD7.d.ts → tasks-DjGjK70Y.d.ts} +22 -6
- package/dist/{thread-SKO7CN3R.mjs → thread-USB3GOPY.mjs} +13 -13
- package/dist/vector/search-worker.mjs +5 -5
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-ZKR7SNRT.mjs → write-GHTA56OW.mjs} +25 -22
- package/openapi.json +101 -6
- package/package.json +7 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
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, decodeSegmentManifest, readListedFile, adapterCheckpointStore, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, writeMetadataEnvelope, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, durableMetadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-CGVBGHBX.mjs';
|
|
2
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-6BSB4N6B.mjs';
|
|
1
3
|
import { nodeThreadId, spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-2Y3CO4EQ.mjs';
|
|
4
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-5LYWZJE2.mjs';
|
|
5
|
+
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-ZAIZQOTM.mjs';
|
|
5
6
|
import './chunk-26A5JFT2.mjs';
|
|
6
|
-
import {
|
|
7
|
-
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-AIIJDWMG.mjs';
|
|
7
|
+
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-4MFH226Q.mjs';
|
|
8
8
|
import './chunk-JPTQZWJQ.mjs';
|
|
9
|
-
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-
|
|
10
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
9
|
+
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-MZI3TEOW.mjs';
|
|
10
|
+
import { NarsilError, ErrorCodes } from './chunk-35B42UFM.mjs';
|
|
11
11
|
import { decode } from '@msgpack/msgpack';
|
|
12
12
|
|
|
13
13
|
// src/persistence/durability/node-fs.browser.ts
|
|
@@ -1565,10 +1565,11 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1565
1565
|
if (manager === void 0) {
|
|
1566
1566
|
return 0;
|
|
1567
1567
|
}
|
|
1568
|
-
const metadata = input.hooks.
|
|
1568
|
+
const metadata = input.hooks.buildTermsMetadata(input.indexName);
|
|
1569
1569
|
if (metadata === void 0) {
|
|
1570
1570
|
return 0;
|
|
1571
1571
|
}
|
|
1572
|
+
const fromMemory = input.fromMemory || input.hooks.mustRewriteTerms(input.indexName);
|
|
1572
1573
|
const vectorIndexes = input.hooks.getVectorIndexes(input.indexName);
|
|
1573
1574
|
const store = directoryCheckpointStore(input.directory);
|
|
1574
1575
|
const writeRecords = input.hooks.writeRecords ?? null;
|
|
@@ -1581,13 +1582,13 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1581
1582
|
wholePartitionsWhereMostChanged(manager, {
|
|
1582
1583
|
priorCheckpoint: priorManifest?.checkpoint ?? [],
|
|
1583
1584
|
priorPartitionIds: (priorManifest?.partitions ?? []).map((partition) => partition.partitionId),
|
|
1584
|
-
everyPartition:
|
|
1585
|
+
everyPartition: fromMemory,
|
|
1585
1586
|
aWorkerCanSerialise: input.canOffload && checkpointWorkerIsUsable(),
|
|
1586
1587
|
...writeRecords === null ? {} : {
|
|
1587
1588
|
captureRecords: (partitionId) => (segments2) => writeRecords.captureSegments(indexName, partitionId, segments2)
|
|
1588
1589
|
}
|
|
1589
1590
|
}),
|
|
1590
|
-
|
|
1591
|
+
fromMemory ? void 0 : priorManifest?.checkpoint ?? [],
|
|
1591
1592
|
priorManifest?.vectors ?? [],
|
|
1592
1593
|
writeRecords === null ? void 0 : (partitionId, lastSeqNo) => writeRecords.termHistoryOf(indexName, partitionId, lastSeqNo)
|
|
1593
1594
|
);
|
|
@@ -1595,7 +1596,7 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1595
1596
|
await makeEveryAppliedMutationDurable(input.indexState, input.failPartition);
|
|
1596
1597
|
if (aTargetFailed(input.indexState, targets)) return 0;
|
|
1597
1598
|
const [liveVectors, segments] = await bothOrTheFirstFailure(
|
|
1598
|
-
writeCapturedVectors(store, input.indexName, capture2, priorManifest,
|
|
1599
|
+
writeCapturedVectors(store, input.indexName, capture2, priorManifest, fromMemory),
|
|
1599
1600
|
writeIndexCheckpointSegments({
|
|
1600
1601
|
directory: input.directory,
|
|
1601
1602
|
metadata,
|
|
@@ -1611,6 +1612,7 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1611
1612
|
await makeEveryAppliedMutationDurable(input.indexState, input.failPartition);
|
|
1612
1613
|
if (aTargetFailed(input.indexState, targets)) return 0;
|
|
1613
1614
|
const written = await commitCheckpointManifest(store, metadata, segments, liveVectors.vectors);
|
|
1615
|
+
input.hooks.onManifestCommitted(input.indexName, metadata.analysisGeneration ?? 0);
|
|
1614
1616
|
recordWrittenVectors(vectorIndexes, liveVectors.written);
|
|
1615
1617
|
await adoptVectorLayouts(store, vectorIndexes, liveVectors.layouts);
|
|
1616
1618
|
if (!input.holdsCheckpointFiles()) {
|
|
@@ -1667,6 +1669,19 @@ function createIndexLoads(vectorIndexesOf2) {
|
|
|
1667
1669
|
startGraphRepairs
|
|
1668
1670
|
};
|
|
1669
1671
|
}
|
|
1672
|
+
async function switchInTurn(turns, turn) {
|
|
1673
|
+
let swapped = false;
|
|
1674
|
+
await checkpointInTurn(turns, {
|
|
1675
|
+
joinsInFlight: false,
|
|
1676
|
+
mayStart: turn.mayStart,
|
|
1677
|
+
perform: async () => {
|
|
1678
|
+
swapped = turn.swap();
|
|
1679
|
+
if (swapped) await turn.checkpoint();
|
|
1680
|
+
},
|
|
1681
|
+
afterSettling: turn.afterSettling
|
|
1682
|
+
});
|
|
1683
|
+
return swapped;
|
|
1684
|
+
}
|
|
1670
1685
|
async function checkpointInTurn(turns, turn) {
|
|
1671
1686
|
if (turn.joinsInFlight && turns.checkpointInFlight !== null) return turns.checkpointInFlight;
|
|
1672
1687
|
while (turns.checkpointInFlight !== null) await turns.checkpointInFlight.catch(() => void 0);
|
|
@@ -1988,6 +2003,19 @@ async function commitAppended(partition, address, deps) {
|
|
|
1988
2003
|
}
|
|
1989
2004
|
}
|
|
1990
2005
|
|
|
2006
|
+
// src/persistence/durability/mutation-entry.ts
|
|
2007
|
+
function buildMutationEntry(record, seqNo) {
|
|
2008
|
+
return buildEntry({
|
|
2009
|
+
seqNo,
|
|
2010
|
+
primaryTerm: SINGLE_NODE_PRIMARY_TERM,
|
|
2011
|
+
operation: record.operation,
|
|
2012
|
+
partitionId: record.partitionId,
|
|
2013
|
+
indexName: record.indexName,
|
|
2014
|
+
documentId: record.documentId,
|
|
2015
|
+
document: record.document
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
|
|
1991
2019
|
// src/persistence/durability/partition-failure.ts
|
|
1992
2020
|
function createPartitionFailureRouting() {
|
|
1993
2021
|
let onFailed = null;
|
|
@@ -3025,6 +3053,45 @@ async function recoverCheckpoint(deps) {
|
|
|
3025
3053
|
return { checkpoint: await deps.replay(checkpoint), upgradedDocumentCount: null };
|
|
3026
3054
|
}
|
|
3027
3055
|
|
|
3056
|
+
// src/persistence/durability/stored-analysis.ts
|
|
3057
|
+
function generationOfStoredTerms(store, indexName) {
|
|
3058
|
+
return readSegmentManifest(store, indexName).then((decoded) => {
|
|
3059
|
+
if (decoded === null) return null;
|
|
3060
|
+
return decoded.kind === "current" ? decoded.manifest.analysisGeneration ?? 0 : 0;
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
3063
|
+
function promotePendingAnalysis(metadata) {
|
|
3064
|
+
const pending = metadata.pendingAnalysis;
|
|
3065
|
+
if (pending === void 0) return;
|
|
3066
|
+
metadata.language = pending.language;
|
|
3067
|
+
metadata.analysisGeneration = pending.generation;
|
|
3068
|
+
metadata.analysisRevision = void 0;
|
|
3069
|
+
metadata.tokenizer = pending.tokenizer;
|
|
3070
|
+
metadata.stopWords = pending.stopWords;
|
|
3071
|
+
metadata.stopWordList = pending.stopWordList;
|
|
3072
|
+
metadata.pendingAnalysis = void 0;
|
|
3073
|
+
}
|
|
3074
|
+
async function settleStoredAnalysis(store, metadata, metadataOnly) {
|
|
3075
|
+
if (metadataOnly && metadata.pendingAnalysis === void 0) return false;
|
|
3076
|
+
const stored = await generationOfStoredTerms(store, metadata.indexName);
|
|
3077
|
+
const current = metadata.analysisGeneration ?? 0;
|
|
3078
|
+
if (stored === null || stored === current) return false;
|
|
3079
|
+
if (stored === metadata.pendingAnalysis?.generation) {
|
|
3080
|
+
promotePendingAnalysis(metadata);
|
|
3081
|
+
return true;
|
|
3082
|
+
}
|
|
3083
|
+
throw new NarsilError(
|
|
3084
|
+
ErrorCodes.CONFIG_INVALID,
|
|
3085
|
+
`The saved terms of index "${metadata.indexName}" come from analysis generation ${stored}, which matches no settings that its metadata records`,
|
|
3086
|
+
{
|
|
3087
|
+
indexName: metadata.indexName,
|
|
3088
|
+
storedGeneration: stored,
|
|
3089
|
+
currentGeneration: current,
|
|
3090
|
+
pendingGeneration: metadata.pendingAnalysis?.generation
|
|
3091
|
+
}
|
|
3092
|
+
);
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3028
3095
|
// src/persistence/durability/recover-index.ts
|
|
3029
3096
|
async function writeCountedMetadata(deps, indexName, documentCount) {
|
|
3030
3097
|
await deps.queueMetadataWrite(indexName, async () => {
|
|
@@ -3050,9 +3117,12 @@ async function recoverPersistedIndex(deps, indexName, metadataOnly) {
|
|
|
3050
3117
|
derivedCount = void 0;
|
|
3051
3118
|
}
|
|
3052
3119
|
}
|
|
3120
|
+
const promoted = await settleStoredAnalysis(store, metadata, metadataOnly);
|
|
3053
3121
|
await hooks.createIndexFromMetadata(metadata, !metadataOnly);
|
|
3054
3122
|
if (metadataOnly) {
|
|
3055
|
-
if (derivedCount !== void 0
|
|
3123
|
+
if (derivedCount !== void 0 || promoted) {
|
|
3124
|
+
await writeCountedMetadata(deps, indexName, derivedCount ?? metadata.documentCount ?? 0);
|
|
3125
|
+
}
|
|
3056
3126
|
return;
|
|
3057
3127
|
}
|
|
3058
3128
|
const manager = hooks.getManager(indexName);
|
|
@@ -3109,8 +3179,8 @@ async function recoverPersistedIndex(deps, indexName, metadataOnly) {
|
|
|
3109
3179
|
for (const { partitionId, lastSeqNo, primaryTerm } of recovered.checkpoint) {
|
|
3110
3180
|
deps.registerPartition(indexName, partitionId, lastSeqNo, primaryTerm);
|
|
3111
3181
|
}
|
|
3112
|
-
if (recovered.upgradedDocumentCount !== null) {
|
|
3113
|
-
await writeCountedMetadata(deps, indexName, recovered.upgradedDocumentCount);
|
|
3182
|
+
if (recovered.upgradedDocumentCount !== null || promoted) {
|
|
3183
|
+
await writeCountedMetadata(deps, indexName, recovered.upgradedDocumentCount ?? manager.countDocuments());
|
|
3114
3184
|
}
|
|
3115
3185
|
}
|
|
3116
3186
|
|
|
@@ -3199,17 +3269,6 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3199
3269
|
}
|
|
3200
3270
|
}
|
|
3201
3271
|
}
|
|
3202
|
-
function buildMutationEntry(record, seqNo) {
|
|
3203
|
-
return buildEntry({
|
|
3204
|
-
seqNo,
|
|
3205
|
-
primaryTerm: SINGLE_NODE_PRIMARY_TERM,
|
|
3206
|
-
operation: record.operation,
|
|
3207
|
-
partitionId: record.partitionId,
|
|
3208
|
-
indexName: record.indexName,
|
|
3209
|
-
documentId: record.documentId,
|
|
3210
|
-
document: record.document
|
|
3211
|
-
});
|
|
3212
|
-
}
|
|
3213
3272
|
async function checkpointIndex(indexName, fromMemory = false, afterInFlight = fromMemory) {
|
|
3214
3273
|
const indexState = indexes.get(indexName);
|
|
3215
3274
|
if (indexState === void 0 || indexState.unloading || heldCheckpoints.holds(indexName, indexState)) return;
|
|
@@ -3366,6 +3425,16 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3366
3425
|
checkpointFromMemory(indexName) {
|
|
3367
3426
|
return requestedCheckpoint(indexName, true);
|
|
3368
3427
|
},
|
|
3428
|
+
async checkpointAfterSwitch(indexName, swap) {
|
|
3429
|
+
const indexState = getOrCreateIndexState(indexName);
|
|
3430
|
+
heldCheckpoints.refuse(indexName, indexState);
|
|
3431
|
+
return switchInTurn(indexState, {
|
|
3432
|
+
mayStart: () => !indexState.unloading && !shuttingDown,
|
|
3433
|
+
swap,
|
|
3434
|
+
checkpoint: () => performCheckpoint(indexName, indexState, true),
|
|
3435
|
+
afterSettling: () => releaseStalledWrites(indexState)
|
|
3436
|
+
});
|
|
3437
|
+
},
|
|
3369
3438
|
async checkpointAfterInFlight(indexName) {
|
|
3370
3439
|
await loads.settled(indexName);
|
|
3371
3440
|
await checkpointIndex(indexName, false, true).catch((err) => markFatal(toError5(err)));
|
|
@@ -3478,6 +3547,17 @@ async function writeSnapshotOnlyCheckpoint(input) {
|
|
|
3478
3547
|
return captured.documentCount;
|
|
3479
3548
|
}
|
|
3480
3549
|
|
|
3550
|
+
// src/persistence/durability/snapshot-only/index-state.ts
|
|
3551
|
+
function createSnapshotIndexState() {
|
|
3552
|
+
return {
|
|
3553
|
+
mutationsSinceCheckpoint: 0,
|
|
3554
|
+
checkpointInFlight: null,
|
|
3555
|
+
applyChain: Promise.resolve(),
|
|
3556
|
+
unloading: false,
|
|
3557
|
+
appliedSeqNoByPartition: /* @__PURE__ */ new Map()
|
|
3558
|
+
};
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3481
3561
|
// src/persistence/durability/snapshot-only/restores.ts
|
|
3482
3562
|
function toError4(error) {
|
|
3483
3563
|
return error instanceof Error ? error : new Error(String(error));
|
|
@@ -3535,13 +3615,7 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3535
3615
|
function getOrCreateIndexState(indexName) {
|
|
3536
3616
|
let state = indexes.get(indexName);
|
|
3537
3617
|
if (state === void 0) {
|
|
3538
|
-
state =
|
|
3539
|
-
mutationsSinceCheckpoint: 0,
|
|
3540
|
-
checkpointInFlight: null,
|
|
3541
|
-
applyChain: Promise.resolve(),
|
|
3542
|
-
unloading: false,
|
|
3543
|
-
appliedSeqNoByPartition: /* @__PURE__ */ new Map()
|
|
3544
|
-
};
|
|
3618
|
+
state = createSnapshotIndexState();
|
|
3545
3619
|
indexes.set(indexName, state);
|
|
3546
3620
|
}
|
|
3547
3621
|
return state;
|
|
@@ -3569,7 +3643,7 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3569
3643
|
async function performCheckpoint(indexName, indexState, fromMemory) {
|
|
3570
3644
|
await settleRestore(indexName);
|
|
3571
3645
|
const manager = hooks.getManager(indexName);
|
|
3572
|
-
const metadata = hooks.
|
|
3646
|
+
const metadata = hooks.buildTermsMetadata(indexName);
|
|
3573
3647
|
if (manager === void 0 || metadata === void 0) {
|
|
3574
3648
|
return;
|
|
3575
3649
|
}
|
|
@@ -3580,8 +3654,9 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3580
3654
|
manager,
|
|
3581
3655
|
vectorIndexes: hooks.getVectorIndexes(indexName),
|
|
3582
3656
|
appliedSeqNoByPartition: indexState.appliedSeqNoByPartition,
|
|
3583
|
-
rewritesEveryPartition: fromMemory
|
|
3657
|
+
rewritesEveryPartition: fromMemory || hooks.mustRewriteTerms(indexName)
|
|
3584
3658
|
});
|
|
3659
|
+
hooks.onManifestCommitted(indexName, metadata.analysisGeneration ?? 0);
|
|
3585
3660
|
await queueMetadataWrite(indexName, async () => {
|
|
3586
3661
|
const checkpointMetadata = hooks.buildMetadata(indexName, documentCount);
|
|
3587
3662
|
if (checkpointMetadata === void 0) return;
|
|
@@ -3617,6 +3692,11 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3617
3692
|
);
|
|
3618
3693
|
return queued;
|
|
3619
3694
|
}
|
|
3695
|
+
async function saveMetadata(indexName, documentCount) {
|
|
3696
|
+
const metadata = hooks.buildMetadata(indexName, documentCount);
|
|
3697
|
+
if (metadata === void 0) return;
|
|
3698
|
+
await adapter.save(metadataKey(indexName), await writeMetadataEnvelope(metadata, { checksum: true }));
|
|
3699
|
+
}
|
|
3620
3700
|
function recoverIndex(indexName, metadataOnly = false, startsGraphRepairs = true) {
|
|
3621
3701
|
return loads.track(indexName, loadIndex(indexName, metadataOnly), startsGraphRepairs);
|
|
3622
3702
|
}
|
|
@@ -3627,6 +3707,7 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3627
3707
|
return;
|
|
3628
3708
|
}
|
|
3629
3709
|
const { metadata } = await readMetadataEnvelope(metaBytes);
|
|
3710
|
+
const promoted = await settleStoredAnalysis(adapterCheckpointStore(adapter), metadata, metadataOnly);
|
|
3630
3711
|
let derivedCount;
|
|
3631
3712
|
if (metadataOnly && metadata.documentCount === void 0) {
|
|
3632
3713
|
try {
|
|
@@ -3638,15 +3719,9 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3638
3719
|
}
|
|
3639
3720
|
await hooks.createIndexFromMetadata(metadata, !metadataOnly);
|
|
3640
3721
|
if (metadataOnly) {
|
|
3641
|
-
if (derivedCount !== void 0) {
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
if (upgraded === void 0) {
|
|
3645
|
-
return;
|
|
3646
|
-
}
|
|
3647
|
-
const bytes = await writeMetadataEnvelope(upgraded, { checksum: true });
|
|
3648
|
-
await adapter.save(metadataKey(indexName), bytes);
|
|
3649
|
-
}).catch(() => void 0);
|
|
3722
|
+
if (derivedCount !== void 0 || promoted) {
|
|
3723
|
+
const counted = derivedCount ?? metadata.documentCount;
|
|
3724
|
+
await queueMetadataWrite(indexName, () => saveMetadata(indexName, counted)).catch(() => void 0);
|
|
3650
3725
|
}
|
|
3651
3726
|
return;
|
|
3652
3727
|
}
|
|
@@ -3674,13 +3749,9 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3674
3749
|
indexState.appliedSeqNoByPartition.set(partitionId, persistedSeqNo);
|
|
3675
3750
|
}
|
|
3676
3751
|
}
|
|
3677
|
-
if (recovered.upgradedDocumentCount !== null) {
|
|
3678
|
-
const upgradedCount = recovered.upgradedDocumentCount;
|
|
3679
|
-
await queueMetadataWrite(indexName,
|
|
3680
|
-
const upgraded = hooks.buildMetadata(indexName, upgradedCount);
|
|
3681
|
-
if (upgraded === void 0) return;
|
|
3682
|
-
await adapter.save(metadataKey(indexName), await writeMetadataEnvelope(upgraded, { checksum: true }));
|
|
3683
|
-
}).catch(() => void 0);
|
|
3752
|
+
if (recovered.upgradedDocumentCount !== null || promoted) {
|
|
3753
|
+
const upgradedCount = recovered.upgradedDocumentCount ?? manager.countDocuments();
|
|
3754
|
+
await queueMetadataWrite(indexName, () => saveMetadata(indexName, upgradedCount)).catch(() => void 0);
|
|
3684
3755
|
}
|
|
3685
3756
|
}
|
|
3686
3757
|
function countStoredBundleDocuments(indexName) {
|
|
@@ -3770,6 +3841,15 @@ function createSnapshotOnlyManager(adapter, config, hooks, publisher) {
|
|
|
3770
3841
|
checkpointFromMemory(indexName) {
|
|
3771
3842
|
return checkpointIndex(indexName, true);
|
|
3772
3843
|
},
|
|
3844
|
+
async checkpointAfterSwitch(indexName, swap) {
|
|
3845
|
+
const indexState = getOrCreateIndexState(indexName);
|
|
3846
|
+
return switchInTurn(indexState, {
|
|
3847
|
+
mayStart: () => !indexState.unloading && !shuttingDown,
|
|
3848
|
+
swap,
|
|
3849
|
+
checkpoint: () => performCheckpoint(indexName, indexState, true),
|
|
3850
|
+
afterSettling: () => void 0
|
|
3851
|
+
});
|
|
3852
|
+
},
|
|
3773
3853
|
async checkpointAfterInFlight(indexName) {
|
|
3774
3854
|
await loads.settled(indexName);
|
|
3775
3855
|
await checkpointIndex(indexName, false, true).catch((err) => {
|
|
@@ -3844,6 +3924,12 @@ function createDurabilityIntegration(tier, hooks) {
|
|
|
3844
3924
|
getVectorFieldPaths: hooks.getVectorFieldPaths,
|
|
3845
3925
|
getVectorIndexes: hooks.getVectorIndexes,
|
|
3846
3926
|
buildMetadata: (indexName, documentCount) => buildMetadata(indexName, hooks, documentCount),
|
|
3927
|
+
buildTermsMetadata(indexName) {
|
|
3928
|
+
const config = hooks.getTermsConfig(indexName);
|
|
3929
|
+
return config === void 0 ? void 0 : metadataFromConfig(indexName, config, hooks.getManager(indexName)?.partitionCount);
|
|
3930
|
+
},
|
|
3931
|
+
mustRewriteTerms: hooks.mustRewriteTerms,
|
|
3932
|
+
onManifestCommitted: hooks.onManifestCommitted,
|
|
3847
3933
|
createIndexFromMetadata: hooks.createIndexFromMetadata,
|
|
3848
3934
|
recordCheckpoint: hooks.recordCheckpoint,
|
|
3849
3935
|
onLayoutUpgrade: hooks.onLayoutUpgrade,
|
|
@@ -3914,9 +4000,18 @@ function createDurabilityFromTier(tier, wiring) {
|
|
|
3914
4000
|
getVectorFieldPaths: (indexName) => wiring.indexRegistry.get(indexName)?.vectorFieldPaths ?? /* @__PURE__ */ new Set(),
|
|
3915
4001
|
getVectorIndexes: (indexName) => (wiring.indexRegistry.has(indexName) ? wiring.getManager(indexName)?.getVectorIndexes() : void 0) ?? /* @__PURE__ */ new Map(),
|
|
3916
4002
|
getIndexConfig: (indexName) => {
|
|
4003
|
+
const entry = wiring.indexRegistry.get(indexName);
|
|
4004
|
+
return entry === void 0 ? void 0 : durableMetadataConfigOf(entry);
|
|
4005
|
+
},
|
|
4006
|
+
getTermsConfig: (indexName) => {
|
|
3917
4007
|
const entry = wiring.indexRegistry.get(indexName);
|
|
3918
4008
|
return entry === void 0 ? void 0 : metadataConfigOf(entry);
|
|
3919
4009
|
},
|
|
4010
|
+
mustRewriteTerms: (indexName) => (wiring.indexRegistry.get(indexName)?.durableAnalysis ?? null) !== null,
|
|
4011
|
+
onManifestCommitted(indexName, analysisGeneration) {
|
|
4012
|
+
const entry = wiring.indexRegistry.get(indexName);
|
|
4013
|
+
if (entry !== void 0 && entry.analysisGeneration === analysisGeneration) entry.durableAnalysis = null;
|
|
4014
|
+
},
|
|
3920
4015
|
createIndexFromMetadata: wiring.createIndexFromMetadata,
|
|
3921
4016
|
recordCheckpoint: wiring.recordCheckpoint,
|
|
3922
4017
|
onLayoutUpgrade: wiring.emitLayoutUpgrade,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-XVMOQQ34.mjs';
|
|
2
|
+
import './chunk-QHNNULPW.mjs';
|
|
3
|
+
import './chunk-ZAIZQOTM.mjs';
|
|
4
|
+
import './chunk-26A5JFT2.mjs';
|
|
5
|
+
import './chunk-4MFH226Q.mjs';
|
|
6
|
+
import './chunk-JPTQZWJQ.mjs';
|
|
7
|
+
import './chunk-MZI3TEOW.mjs';
|
|
8
|
+
import './chunk-35B42UFM.mjs';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, osqBitsOf, noBuildHistory, createOsqQuantizer, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, ordinalFilterValues, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, OSQ4_MIN_DIMENSION, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, WORKER_COPY_MIN_VECTORS, allLiveDocIds, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, SHUFFLED_REBUILD_MEMORY_RETRY_MS, recalibrateFromStore, signatureOf, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, grownByteLength, createVectorBlock, ensureBlockSlots, createHNSWIndex, adoptGraph, topLayerInParts, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-3EYDURFD.mjs';
|
|
2
|
+
export { releaseLocksHeldBy } from './chunk-3EYDURFD.mjs';
|
|
3
|
+
import './chunk-OIZS5KIX.mjs';
|
|
1
4
|
import { spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import './chunk-VEGHFP2P.mjs';
|
|
7
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-UDGB2MWT.mjs';
|
|
5
|
+
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-5LYWZJE2.mjs';
|
|
6
|
+
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, compareCodePoints, UNPLACED_FLAG_CHUNK_ORDINALS, MAX_VECTOR_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, resolveWorkerCount, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone, WORKER_YOUNG_GENERATION_MB, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-4MFH226Q.mjs';
|
|
7
|
+
import './chunk-MZI3TEOW.mjs';
|
|
8
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-35B42UFM.mjs';
|
|
8
9
|
|
|
9
10
|
// src/core/heap.ts
|
|
10
11
|
function createMaxHeap(compare) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createBitSet, bitsetIsEmpty, GrowableUint32, PHRASE_ROWS_START, bitsetHas, bitsetSet, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-26A5JFT2.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes, MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes, MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-35B42UFM.mjs';
|
|
3
3
|
|
|
4
4
|
// src/core/partition/phrase-matching.ts
|
|
5
5
|
var UINT32_BITS = 32;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { abandonChangeOf } from './chunk-E5SFTOQR.mjs';
|
|
2
|
+
|
|
1
3
|
// src/narsil/restore-queue.ts
|
|
2
4
|
function restoreDepsOf(core, host) {
|
|
3
5
|
return {
|
|
@@ -9,7 +11,11 @@ function restoreDepsOf(core, host) {
|
|
|
9
11
|
embeddingAdapters: core.embeddingAdapters,
|
|
10
12
|
markAnalysisStale: core.analysisRebuild.markStale,
|
|
11
13
|
clearAnalysisStale: core.analysisRebuild.clearStale,
|
|
12
|
-
abandonAnalysisRebuild:
|
|
14
|
+
abandonAnalysisRebuild: async (indexName) => {
|
|
15
|
+
await core.analysisRebuild.abandon(indexName);
|
|
16
|
+
await abandonChangeOf(core, indexName);
|
|
17
|
+
},
|
|
18
|
+
abandonAnalysisChange: (indexName) => abandonChangeOf(core, indexName),
|
|
13
19
|
indexState: core.indexState,
|
|
14
20
|
copies: core.orchestrator,
|
|
15
21
|
forgetWatermark: core.watermarkNotifier.forget
|
|
@@ -18,7 +24,7 @@ function restoreDepsOf(core, host) {
|
|
|
18
24
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
19
25
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
20
26
|
const restored = previous.then(async () => {
|
|
21
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
27
|
+
const { restoreFromSnapshot } = await import('./snapshot-YBJ5MF2M.mjs');
|
|
22
28
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
29
|
});
|
|
24
30
|
const settled = restored.then(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-JPTQZWJQ.mjs';
|
|
2
|
-
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-
|
|
3
|
-
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-
|
|
2
|
+
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-MZI3TEOW.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-35B42UFM.mjs';
|
|
4
4
|
|
|
5
5
|
// src/search/hybrid-depth.ts
|
|
6
6
|
function fixedHybridDepthOf(hybrid) {
|