@delali/narsil 0.3.1-next.156 → 0.3.1-next.157
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-5BQOQ4BF.mjs → analysis-change-CKEMM2MC.mjs} +9 -9
- package/dist/{react-native/chunks/analysis-change-entry-SCVWK6OU.mjs → analysis-change-entry-SEDMJ6MW.mjs} +1 -1
- package/dist/browser/{analysis-change-435CUEPZ.mjs → analysis-change-ZKGJFENM.mjs} +38 -29
- package/dist/{analysis-change-entry-TXX6JSMX.mjs → browser/analysis-change-entry-5BFUVMHJ.mjs} +1 -1
- package/dist/browser/{chunk-BHFQATSC.mjs → chunk-25MTVDYD.mjs} +1 -1
- package/dist/browser/{chunk-IZXVW2ZJ.mjs → chunk-3NLMB5CC.mjs} +2 -2
- package/dist/browser/{chunk-23XRXIBW.mjs → chunk-5YWB3E2W.mjs} +8 -1
- package/dist/browser/chunk-AI5UI46D.mjs +12 -0
- package/dist/browser/{chunk-2CFI5VVV.mjs → chunk-BLT4RHCJ.mjs} +2 -2
- package/dist/browser/{chunk-4NGKC4H4.mjs → chunk-C26SPCGQ.mjs} +7 -6
- package/dist/browser/{chunk-6LWDPLTB.mjs → chunk-C4FJ3WDY.mjs} +1 -1
- package/dist/browser/{chunk-MGI4BCXC.mjs → chunk-CXNTHHA7.mjs} +2 -2
- package/dist/browser/{chunk-STOWQFT3.mjs → chunk-DUH6QUVU.mjs} +547 -2
- package/dist/browser/chunk-EKMGCRSR.mjs +61 -0
- package/dist/browser/{chunk-SSTPBZZX.mjs → chunk-GFAZPSWK.mjs} +5 -5
- package/dist/browser/{chunk-3SSRJMFN.mjs → chunk-HUCSHDTB.mjs} +1 -1
- package/dist/browser/{chunk-K4Q6KX3R.mjs → chunk-K3IPRX6D.mjs} +48 -17
- package/dist/browser/{chunk-MOG4OVDK.mjs → chunk-MY2XKH22.mjs} +1 -12
- package/dist/browser/{chunk-3V7DNNZL.mjs → chunk-N23GL72Q.mjs} +178 -801
- package/dist/browser/{chunk-NQAME3RK.mjs → chunk-UATIJ4KU.mjs} +2 -2
- package/dist/browser/{chunk-2TI4SSUP.mjs → chunk-UKOWD2K5.mjs} +3 -3
- package/dist/browser/{chunk-7U3WVJUP.mjs → chunk-UTMHUHUV.mjs} +2 -2
- package/dist/browser/{chunk-EA63E3D2.mjs → chunk-V43N6TZO.mjs} +5 -5
- package/dist/browser/{chunk-CRE3G7F3.mjs → chunk-VY5KW3HN.mjs} +3 -3
- package/dist/browser/{chunk-WI4MR75E.mjs → chunk-X7TXYUKO.mjs} +1 -1
- package/dist/browser/{chunk-KZWSX6BH.mjs → chunk-Y6IBAUNO.mjs} +2 -86
- package/dist/browser/{cold-module-2EHCIV4K.mjs → cold-module-YNUUDNOM.mjs} +12 -10
- package/dist/browser/{durability-wiring-A7BVG2DW.mjs → durability-wiring-GVZEE46O.mjs} +64 -21
- package/dist/browser/{engine-hooks-E4UD67JD.mjs → engine-hooks-HBVS6YM4.mjs} +5 -4
- package/dist/browser/{geo-index-HHWGMNIS.mjs → geo-index-OTV7VPIR.mjs} +2 -1
- package/dist/browser/{import-DXYB6756.mjs → import-5ESVMFDJ.mjs} +6 -5
- package/dist/browser/{module-NIYMEA5R.mjs → module-NDSQLPMQ.mjs} +11 -9
- package/dist/{release-BH3DKW3T.mjs → browser/release-HYXPVJVS.mjs} +0 -1
- package/dist/browser/{restore-hooks-YPN4ZFCY.mjs → restore-hooks-IE3GGYHG.mjs} +8 -7
- package/dist/browser/{restore-queue-G3RQGL3Y.mjs → restore-queue-LQBBTODR.mjs} +3 -3
- package/dist/browser/{retention-ZWVMNC3Q.mjs → retention-TY3L3BFN.mjs} +7 -6
- package/dist/browser/{snapshot-VEQNIE6C.mjs → snapshot-5FHPPCNZ.mjs} +16 -14
- package/dist/browser/{start-BM442C6R.mjs → start-2UZTOBG5.mjs} +8 -7
- package/dist/browser/{write-2EVMZWDE.mjs → write-ULXAN5B4.mjs} +10 -8
- package/dist/{capabilities-Da4ywVVl.d.ts → capabilities-D3AoBJoF.d.ts} +2 -2
- package/dist/{chunk-K5QFDYST.mjs → chunk-24FNVRKB.mjs} +1 -1
- package/dist/{chunk-DP5C7YFQ.mjs → chunk-2ROUFMQX.mjs} +2 -2
- package/dist/{chunk-PWC4VB3Q.mjs → chunk-4B7JIGQD.mjs} +2 -2
- package/dist/{chunk-FAKFUDZZ.mjs → chunk-4LMSZAK6.mjs} +14 -3
- package/dist/{chunk-6I6AYAXS.mjs → chunk-4ZTHGTVX.mjs} +2 -2
- package/dist/{chunk-QOW2JPUI.mjs → chunk-BNL5OPRV.mjs} +6 -6
- package/dist/{chunk-3HYC4JRF.mjs → chunk-C7XQYG6U.mjs} +2 -2
- package/dist/{chunk-WX4LAO6M.mjs → chunk-CQZXZ75V.mjs} +3 -97
- package/dist/{chunk-4KKXNJM6.mjs → chunk-CWS55TEX.mjs} +2 -2
- package/dist/{chunk-2UV4QBHW.mjs → chunk-EYD7K3H6.mjs} +5 -5
- package/dist/{chunk-EFBDHH5P.mjs → chunk-FEZVDOWX.mjs} +160 -245
- package/dist/{chunk-XAXKV65G.mjs → chunk-FUD5XSZ5.mjs} +1 -1
- package/dist/{chunk-JDJBQLRO.mjs → chunk-GPWMUPCA.mjs} +10 -10
- package/dist/{chunk-25KDNIZZ.mjs → chunk-IIRIG7H5.mjs} +1 -1
- package/dist/{chunk-TZTRKM33.mjs → chunk-JSV6OQ4C.mjs} +1 -1
- package/dist/{chunk-NF4DT3IH.mjs → chunk-JTYPJF3T.mjs} +8 -1
- package/dist/chunk-KCQYFO4K.mjs +62 -0
- package/dist/{chunk-CSLGFPFQ.mjs → chunk-LDNCLRZU.mjs} +1 -1
- package/dist/{chunk-MQOJIO5B.mjs → chunk-MW6BR4QP.mjs} +2 -2
- package/dist/{react-native/chunks/chunk-MUWD2H2S.mjs → chunk-MWD5VPN7.mjs} +2 -2
- package/dist/{chunk-XXHN7J46.mjs → chunk-ODYKO5TO.mjs} +1 -1
- package/dist/{chunk-RDXO6JST.mjs → chunk-OG7UGJ6F.mjs} +2 -2
- package/dist/{chunk-FYOVBEMM.mjs → chunk-OQLD2BSW.mjs} +2 -2
- package/dist/{chunk-I53G4JAU.mjs → chunk-OYABFKTW.mjs} +2 -2
- package/dist/{chunk-TZ3355VS.mjs → chunk-P5LANSH6.mjs} +1 -1
- package/dist/{chunk-P5ZI2P2W.mjs → chunk-PIH5SJ4N.mjs} +3 -3
- package/dist/{chunk-HFPMMRQT.mjs → chunk-PSZI4O24.mjs} +51 -4
- package/dist/{chunk-L6V6BST3.mjs → chunk-PV2CG7EJ.mjs} +3 -552
- package/dist/{chunk-SA5LOGO3.mjs → chunk-PWGYQXML.mjs} +1 -1
- package/dist/{chunk-BWZ3P4MU.mjs → chunk-QLDABJZM.mjs} +3 -3
- package/dist/{chunk-JWRUUCWD.mjs → chunk-RCX4WNLC.mjs} +2 -2
- package/dist/{chunk-DWEPMFJE.mjs → chunk-RIHIVFIQ.mjs} +5 -5
- package/dist/{chunk-FNGAM5B7.mjs → chunk-RWURUDSP.mjs} +8 -8
- package/dist/{chunk-I2KPOLOZ.mjs → chunk-SMOOSIAW.mjs} +3 -3
- package/dist/{chunk-TGS5UXBE.mjs → chunk-SOI6LTHM.mjs} +3 -3
- package/dist/{chunk-YTWZVGCB.mjs → chunk-UD5HIS4U.mjs} +1 -1
- package/dist/{chunk-46KY2PJD.mjs → chunk-UJDJB3NE.mjs} +37 -29
- package/dist/{chunk-Z2KAFCRT.mjs → chunk-VSLSGASN.mjs} +2 -2
- package/dist/{chunk-VTTRFF2C.mjs → chunk-VZ2ONHEE.mjs} +9 -5
- package/dist/chunk-W5EB5XKI.mjs +741 -0
- package/dist/{chunk-7LXHHCXZ.mjs → chunk-W7OSSKH5.mjs} +46 -16
- package/dist/{chunk-ZKP7G7TV.mjs → chunk-XXJZMTZT.mjs} +1 -1
- package/dist/{chunk-FRBFVQFN.mjs → chunk-ZPZ3YGXV.mjs} +4 -4
- package/dist/{client-DRv7UVeY.d.ts → client-kqSMevVi.d.ts} +15 -3
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +4 -0
- package/dist/{cold-module-6MO2XJF2.mjs → cold-module-VOJXMNZB.mjs} +13 -12
- package/dist/{config-DMwffLKn.d.ts → config-B4v_Htpu.d.ts} +1 -1
- package/dist/{config-CoSig5Ox.d.ts → config-CTP01fns.d.ts} +1 -1
- package/dist/{direct-executor-FTMYY3TI.mjs → direct-executor-V5DRIECI.mjs} +5 -5
- package/dist/distribution.d.ts +4 -4
- package/dist/distribution.mjs +72 -64
- package/dist/{durability-wiring-VIF5MOSY.mjs → durability-wiring-3TD62MBI.mjs} +38 -30
- package/dist/{engine-CFxPYqEk.d.ts → engine-CkPn2PWE.d.ts} +1 -1
- package/dist/{engine-hooks-EGUGNZYE.mjs → engine-hooks-HA3SBOBR.mjs} +8 -8
- package/dist/{import-XKDPJQDP.mjs → import-GPKLTSKA.mjs} +8 -8
- package/dist/index.browser.mjs +4 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +7 -7
- package/dist/index.react-native.mjs +3 -3
- package/dist/{long-query-thread-YA4IAYSY.mjs → long-query-thread-QDFQSJD6.mjs} +13 -13
- package/dist/{module-FQ4JWNQJ.mjs → module-JYHFTVPS.mjs} +12 -11
- package/dist/{paged-partition-archive-PXW5XAYU.mjs → paged-partition-archive-RLRGOXDX.mjs} +14 -14
- package/dist/partial-words.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.mjs +13 -12
- package/dist/query-suggestions/merge-worker.mjs +9 -9
- package/dist/query-suggestions.browser.mjs +9 -8
- package/dist/query-suggestions.d.ts +1 -1
- package/dist/query-suggestions.mjs +17 -17
- package/dist/react-native/chunks/{analysis-change-LT5QBQ3H.mjs → analysis-change-QUVDNABS.mjs} +37 -29
- package/dist/{browser/analysis-change-entry-HZXKPPGV.mjs → react-native/chunks/analysis-change-entry-OC4XASBF.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-KV46CT4D.mjs → chunk-4AV5PPH6.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-GXX3DQXP.mjs → chunk-4COWCEY7.mjs} +188 -163
- package/dist/react-native/chunks/{chunk-G43IPIDG.mjs → chunk-4NWR3NGS.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-3JWDECAZ.mjs → chunk-5MSX5FRT.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-6WA3C3DV.mjs → chunk-6OFDUYVX.mjs} +8 -1
- package/dist/react-native/chunks/{chunk-NB3LP33V.mjs → chunk-6ZELFCK5.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-4JYO3JD2.mjs → chunk-BITYFZSZ.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-ZXZFN7FI.mjs → chunk-DMIFXZ3Q.mjs} +1 -1
- package/dist/{chunk-KF4EXSM4.mjs → react-native/chunks/chunk-IAENKE2D.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-ZLWVW734.mjs → chunk-KSBYEMCB.mjs} +1 -1
- package/dist/react-native/chunks/chunk-KU646XXT.mjs +164 -0
- package/dist/react-native/chunks/{chunk-MIP4SOR6.mjs → chunk-OCSLSH27.mjs} +164 -244
- package/dist/react-native/chunks/chunk-OXM66LO6.mjs +62 -0
- package/dist/react-native/chunks/{chunk-VWUDIOT6.mjs → chunk-TORU2OHQ.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-PDRWWPKV.mjs → chunk-WVWJNUMN.mjs} +48 -18
- package/dist/react-native/chunks/{chunk-UQ4OAXKU.mjs → chunk-WW2X2AEI.mjs} +4 -4
- package/dist/react-native/chunks/{chunk-QUKQNI3H.mjs → chunk-ZNZ6CPAZ.mjs} +2 -87
- package/dist/react-native/chunks/{chunk-TP6KCKER.mjs → chunk-ZVQMBF2H.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-POPDAGH6.mjs → chunk-ZWAIN4GG.mjs} +6 -6
- package/dist/react-native/chunks/{cold-module-KVZYUGRY.mjs → cold-module-N6KFNNZA.mjs} +9 -8
- package/dist/react-native/chunks/{durability-wiring-34OYO32E.mjs → durability-wiring-RN64S2TL.mjs} +63 -21
- package/dist/react-native/chunks/{engine-hooks-M7JV46NH.mjs → engine-hooks-CWA5CKCA.mjs} +4 -4
- package/dist/react-native/chunks/{import-H6AQREWI.mjs → import-5UAWBRJP.mjs} +4 -4
- package/dist/react-native/chunks/{module-LBZPGOWH.mjs → module-6RP4ZCBW.mjs} +8 -7
- package/dist/react-native/chunks/{release-D7ZTIANM.mjs → release-2SIHZWDO.mjs} +0 -1
- package/dist/react-native/chunks/{restore-hooks-IBGIY3DR.mjs → restore-hooks-ENFMDTWC.mjs} +7 -7
- package/dist/react-native/chunks/{restore-queue-ZZX54AH7.mjs → restore-queue-4R6AASE5.mjs} +3 -3
- package/dist/react-native/chunks/{retention-EW4TTDFB.mjs → retention-5GTFT3GR.mjs} +6 -6
- package/dist/react-native/chunks/{snapshot-REYVIN3X.mjs → snapshot-5LGPQXFS.mjs} +15 -14
- package/dist/react-native/chunks/{start-BQK6KN3R.mjs → start-ZQJVZ5DN.mjs} +7 -7
- package/dist/react-native/chunks/{write-FQAYCZF5.mjs → write-6BRYIIZ7.mjs} +7 -6
- package/dist/react-native/partial-words.mjs +2 -2
- package/dist/react-native/query-suggestions.mjs +8 -8
- package/dist/react-native/sync.mjs +44 -10
- package/dist/react.d.ts +7 -7
- package/dist/{browser/release-76MXRPGV.mjs → release-SMR4WJD4.mjs} +0 -1
- package/dist/{restore-hooks-CDERDEF4.mjs → restore-hooks-HXLIEB4A.mjs} +12 -12
- package/dist/{restore-queue-7NNSTROA.mjs → restore-queue-LZH7LMLR.mjs} +3 -3
- package/dist/{retention-QSVBBNRM.mjs → retention-3K7ARGAG.mjs} +12 -12
- package/dist/server.d.ts +10 -8
- package/dist/server.mjs +37 -29
- package/dist/{snapshot-RH4NSKIZ.mjs → snapshot-O7ICP7NJ.mjs} +24 -23
- package/dist/{start-MCKCOGIW.mjs → start-S4PFP6RS.mjs} +14 -14
- package/dist/sync/filesystem.d.ts +2 -2
- package/dist/sync/indexeddb.d.ts +2 -2
- package/dist/sync.browser.mjs +44 -10
- package/dist/sync.d.ts +3 -3
- package/dist/sync.mjs +44 -10
- package/dist/{tasks-qrJojgST.d.ts → tasks-CoNjxbop.d.ts} +2 -2
- package/dist/{thread-O4SBJJJS.mjs → thread-YLJ3ZPQ3.mjs} +12 -12
- package/dist/{types-BZCGjfLn.d.ts → types-DPMjfOr_.d.ts} +1 -1
- package/dist/workers/entry.mjs +5 -5
- package/dist/{write-3FK7NG3Y.mjs → write-2OBJGLFS.mjs} +11 -10
- package/openapi.json +71 -0
- package/package.json +7 -7
- package/dist/chunk-BU4SAIC4.mjs +0 -196
- package/dist/react-native/chunks/chunk-DNXOMPAQ.mjs +0 -191
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { encodeSegmentManifest } from './chunk-
|
|
2
|
-
import { writeSegmentsOf, readSegmentFile, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-
|
|
3
|
-
import { restoreVectorFields } from './chunk-WX4LAO6M.mjs';
|
|
1
|
+
import { encodeSegmentManifest } from './chunk-C7XQYG6U.mjs';
|
|
2
|
+
import { writeSegmentsOf, readSegmentFile, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-BNL5OPRV.mjs';
|
|
4
3
|
import { ReplicationMessageTypes } from './chunk-5FLRXF73.mjs';
|
|
5
4
|
import { WIRE_BATCH_BUDGET } from './chunk-JDDXV6UF.mjs';
|
|
6
|
-
import {
|
|
5
|
+
import { restoreVectorFields } from './chunk-KCQYFO4K.mjs';
|
|
6
|
+
import { SEGMENT_MANIFEST_VERSION, manifestKey, manifestReferencedKeys, segmentsPrefix, snapshotBundleKey, MAX_SEGMENTS_PER_PARTITION } from './chunk-JTYPJF3T.mjs';
|
|
7
7
|
import { DEFAULT_COMPACTION_THRESHOLD, COMPACTION_LARGEST_MERGED_DOCUMENT_COUNT, SEGMENT_FILE_FRAMING_SLACK_BYTES } from './chunk-QDZJM7NI.mjs';
|
|
8
|
-
import { reconstructSchemaFromMetadata, prepareDocumentVectors } from './chunk-
|
|
9
|
-
import { generateId, freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, decodeMapWithoutFields, shareSegmentArrays } from './chunk-
|
|
10
|
-
import { isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-
|
|
8
|
+
import { reconstructSchemaFromMetadata, prepareDocumentVectors } from './chunk-FEZVDOWX.mjs';
|
|
9
|
+
import { generateId, freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, decodeMapWithoutFields, shareSegmentArrays } from './chunk-VZ2ONHEE.mjs';
|
|
10
|
+
import { isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-PIH5SJ4N.mjs';
|
|
11
11
|
import { crc32 } from './chunk-7GXJUJ24.mjs';
|
|
12
|
-
import { extractVectorFieldsFromSchema, partialFieldsOf } from './chunk-
|
|
12
|
+
import { extractVectorFieldsFromSchema, partialFieldsOf } from './chunk-W5EB5XKI.mjs';
|
|
13
13
|
import { getLanguage, resolveIndexAnalysis } from './chunk-RZWWB2XR.mjs';
|
|
14
14
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
15
15
|
import { ErrorCodes, NarsilError } from './chunk-MP7ABPTD.mjs';
|
|
@@ -879,7 +879,7 @@ async function compactPartitionSegments(input) {
|
|
|
879
879
|
if (paged) {
|
|
880
880
|
const { directory } = input.store;
|
|
881
881
|
if (directory === void 0) return { segments, nextSegmentId: input.nextSegmentId };
|
|
882
|
-
const { mergePagedWindow } = await import('./module-
|
|
882
|
+
const { mergePagedWindow } = await import('./module-JYHFTVPS.mjs');
|
|
883
883
|
return replacing(
|
|
884
884
|
await mergePagedWindow({
|
|
885
885
|
store: input.store,
|
|
@@ -967,7 +967,7 @@ function pagedSettingsOf(context) {
|
|
|
967
967
|
async function tombstonesOfDelta(context, older, selections, deleted) {
|
|
968
968
|
const { directory } = context.input.store;
|
|
969
969
|
if (context.input.metadata.textStorage !== "disk" || directory === void 0) return deleted;
|
|
970
|
-
const { pagedTombstonesFor } = await import('./module-
|
|
970
|
+
const { pagedTombstonesFor } = await import('./module-JYHFTVPS.mjs');
|
|
971
971
|
return pagedTombstonesFor(
|
|
972
972
|
directory,
|
|
973
973
|
older,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-
|
|
1
|
+
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-OYABFKTW.mjs';
|
|
2
2
|
import { collectGarbageBeforeAnswerRefusal, collectYoungGenerationBeforeRefusal, reservedHeapBytes, admitHeapBytes } from './chunk-XIHUI4KB.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd, ARCHIVE_ENTRY_ESTIMATE_BYTES, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-
|
|
1
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd, ARCHIVE_ENTRY_ESTIMATE_BYTES, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-MW6BR4QP.mjs';
|
|
2
2
|
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
3
3
|
|
|
4
4
|
// src/persistence/archive/range-layout.ts
|
|
@@ -62,6 +62,13 @@ var EARLIER_SEGMENT_MANIFEST_VERSION = 6;
|
|
|
62
62
|
var MANIFEST_ENVELOPE_VERSION = 2;
|
|
63
63
|
var MAX_SEGMENTS_PER_PARTITION = 65536;
|
|
64
64
|
var MAX_SEGMENT_ID = 281474976710655;
|
|
65
|
+
function manifestWithinPartitionCount(manifest, partitionCount) {
|
|
66
|
+
return {
|
|
67
|
+
...manifest,
|
|
68
|
+
checkpoint: manifest.checkpoint.filter((entry) => entry.partitionId < partitionCount),
|
|
69
|
+
partitions: manifest.partitions.filter((partition) => partition.partitionId < partitionCount)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
65
72
|
function manifestReferencedKeys(manifest) {
|
|
66
73
|
const keys = /* @__PURE__ */ new Set();
|
|
67
74
|
for (const partition of manifest.partitions) {
|
|
@@ -82,4 +89,4 @@ function manifestFileRefs(manifest) {
|
|
|
82
89
|
return refs;
|
|
83
90
|
}
|
|
84
91
|
|
|
85
|
-
export { EARLIER_SEGMENT_MANIFEST_VERSION, MANIFEST_ENVELOPE_VERSION, MAX_SEGMENTS_PER_PARTITION, MAX_SEGMENT_ID, SEGMENT_MANIFEST_VERSION, graphPartKey, manifestFileRefs, manifestKey, manifestReferencedKeys, segmentKey, segmentsPrefix, snapshotBundleKey, vectorFileKey };
|
|
92
|
+
export { EARLIER_SEGMENT_MANIFEST_VERSION, MANIFEST_ENVELOPE_VERSION, MAX_SEGMENTS_PER_PARTITION, MAX_SEGMENT_ID, SEGMENT_MANIFEST_VERSION, graphPartKey, manifestFileRefs, manifestKey, manifestReferencedKeys, manifestWithinPartitionCount, segmentKey, segmentsPrefix, snapshotBundleKey, vectorFileKey };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { flattenSchema, getNestedValue } from './chunk-W5EB5XKI.mjs';
|
|
2
|
+
import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
3
|
+
|
|
4
|
+
// src/serialization/vector-field-bytes.ts
|
|
5
|
+
var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
6
|
+
var FLOAT32_BYTES = 4;
|
|
7
|
+
function vectorFieldPathsOfSchema(schema) {
|
|
8
|
+
const paths = /* @__PURE__ */ new Set();
|
|
9
|
+
for (const [fieldPath, fieldType] of Object.entries(flattenSchema(schema))) {
|
|
10
|
+
if (typeof fieldType === "string" && VECTOR_PATTERN.test(fieldType)) paths.add(fieldPath);
|
|
11
|
+
}
|
|
12
|
+
return paths;
|
|
13
|
+
}
|
|
14
|
+
function setNestedValue(obj, path, value) {
|
|
15
|
+
if (!path.includes(".")) {
|
|
16
|
+
if (FORBIDDEN_KEYS.has(path)) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
obj[path] = value;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const segments = path.split(".");
|
|
23
|
+
let current = obj;
|
|
24
|
+
for (let i = 0; i < segments.length - 1; i += 1) {
|
|
25
|
+
const segment = segments[i];
|
|
26
|
+
if (segment === void 0 || FORBIDDEN_KEYS.has(segment)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let next = current[segment];
|
|
30
|
+
if (next === null || next === void 0 || typeof next !== "object") {
|
|
31
|
+
next = {};
|
|
32
|
+
current[segment] = next;
|
|
33
|
+
}
|
|
34
|
+
current = next;
|
|
35
|
+
}
|
|
36
|
+
const finalSegment = segments.at(-1);
|
|
37
|
+
if (finalSegment === void 0 || FORBIDDEN_KEYS.has(finalSegment)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
current[finalSegment] = value;
|
|
41
|
+
}
|
|
42
|
+
function restoreVectorFields(document, vectorFieldPaths) {
|
|
43
|
+
for (const fieldPath of vectorFieldPaths) {
|
|
44
|
+
const value = getNestedValue(document, fieldPath);
|
|
45
|
+
if (value instanceof Uint8Array && !(value instanceof Float32Array)) {
|
|
46
|
+
if (value.byteLength % FLOAT32_BYTES !== 0) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
`Vector field "${fieldPath}" has invalid byte length ${value.byteLength} (must be divisible by 4)`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
const elementCount = value.byteLength / FLOAT32_BYTES;
|
|
52
|
+
const float32 = new Float32Array(elementCount);
|
|
53
|
+
const dataView = new DataView(value.buffer, value.byteOffset, value.byteLength);
|
|
54
|
+
for (let i = 0; i < elementCount; i += 1) {
|
|
55
|
+
float32[i] = dataView.getFloat32(i * FLOAT32_BYTES, true);
|
|
56
|
+
}
|
|
57
|
+
setNestedValue(document, fieldPath, float32);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { restoreVectorFields, setNestedValue, vectorFieldPathsOfSchema };
|
|
@@ -3,7 +3,7 @@ import { restoredConfigFields, restoredEmbedding } from './chunk-INJYO3BU.mjs';
|
|
|
3
3
|
import { chunksOf } from './chunk-CZQ33DLW.mjs';
|
|
4
4
|
import { MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_IMPORT_REFUSALS_REPORTED } from './chunk-EEBCDP36.mjs';
|
|
5
5
|
import { requireConfigurationShape } from './chunk-GH4WQ22V.mjs';
|
|
6
|
-
import { flattenSchema } from './chunk-
|
|
6
|
+
import { flattenSchema } from './chunk-W5EB5XKI.mjs';
|
|
7
7
|
import { turnsAreBudgeted, turnIsSpent, yieldTurn } from './chunk-LQG5G2LY.mjs';
|
|
8
8
|
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openManifestPayload, listedKeysOf, decodeManifestPayload } from './chunk-
|
|
2
|
-
import { manifestFileRefs } from './chunk-
|
|
1
|
+
import { openManifestPayload, listedKeysOf, decodeManifestPayload } from './chunk-CWS55TEX.mjs';
|
|
2
|
+
import { manifestFileRefs } from './chunk-JTYPJF3T.mjs';
|
|
3
3
|
import { QUERY_HISTORY_ARCHIVE_PREFIX, MAX_HISTORY_FILE_BYTES } from './chunk-5YNRKI2C.mjs';
|
|
4
4
|
import { HEADER_SIZE } from './chunk-3OH67G7R.mjs';
|
|
5
5
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
@@ -4,14 +4,14 @@ function holdsChangeWork(entry) {
|
|
|
4
4
|
}
|
|
5
5
|
async function abandonChangeOf(core, indexName) {
|
|
6
6
|
if (!holdsChangeWork(core.indexRegistry.get(indexName))) return;
|
|
7
|
-
const { abandonAnalysisChange } = await import('./analysis-change-
|
|
7
|
+
const { abandonAnalysisChange } = await import('./analysis-change-CKEMM2MC.mjs');
|
|
8
8
|
await abandonAnalysisChange(core, indexName);
|
|
9
9
|
}
|
|
10
10
|
async function resumeChangeOf(core, indexName) {
|
|
11
11
|
if ((core.indexRegistry.get(indexName)?.pendingAnalysis ?? null) === null) return;
|
|
12
12
|
if (core.mutationCtx.capacityScope === "partition") return;
|
|
13
13
|
if (core.executor.getManager(indexName) === void 0) return;
|
|
14
|
-
const { resumeAnalysisChange } = await import('./analysis-change-
|
|
14
|
+
const { resumeAnalysisChange } = await import('./analysis-change-CKEMM2MC.mjs');
|
|
15
15
|
void resumeAnalysisChange(core, indexName).catch(() => void 0);
|
|
16
16
|
}
|
|
17
17
|
async function resumeEveryChange(core) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { invalidSetting, validateSetting, validateSource, settingToWire, settingFromWire } from './chunk-
|
|
1
|
+
import { invalidSetting, validateSetting, validateSource, settingToWire, settingFromWire } from './chunk-UD5HIS4U.mjs';
|
|
2
2
|
import { acceptedPhrase, isNormalPhrase } from './chunk-GQPTDQCL.mjs';
|
|
3
3
|
import { MAX_BANNED_PHRASE_CODE_POINTS, MAX_BANNED_PHRASES, MAX_BAN_LIST_BYTES } from './chunk-5YNRKI2C.mjs';
|
|
4
4
|
import { encode } from '@msgpack/msgpack';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { attachedRuntimeOf } from './chunk-S5LN746F.mjs';
|
|
2
|
-
import { emitWriteEventAfter, dropEngineIndex } from './chunk-
|
|
2
|
+
import { emitWriteEventAfter, dropEngineIndex } from './chunk-FEZVDOWX.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
4
4
|
|
|
5
5
|
// src/query-suggestions/engine-hooks.ts
|
|
@@ -52,7 +52,7 @@ async function startQuerySuggestions(core, engine, config) {
|
|
|
52
52
|
installSuggestionHooks(core);
|
|
53
53
|
if (config?.querySuggestions === void 0 && !holdsEnabledSetting(core)) return;
|
|
54
54
|
try {
|
|
55
|
-
const { localRuntimeOf } = await import('./start-
|
|
55
|
+
const { localRuntimeOf } = await import('./start-S4PFP6RS.mjs');
|
|
56
56
|
await localRuntimeOf(core, engine, config);
|
|
57
57
|
} catch (error) {
|
|
58
58
|
await engine.shutdown().catch(() => void 0);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isValidInteger, isRecord } from './chunk-
|
|
1
|
+
import { isValidInteger, isRecord } from './chunk-4ZTHGTVX.mjs';
|
|
2
2
|
import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
3
3
|
import { MAX_REPLICATION_FACTOR, MAX_PARTITION_COUNT } from './chunk-JDDXV6UF.mjs';
|
|
4
4
|
import { MAX_HISTORY_FILE_BYTES } from './chunk-5YNRKI2C.mjs';
|
|
5
|
-
import { packChecksummedEnvelope } from './chunk-
|
|
5
|
+
import { packChecksummedEnvelope } from './chunk-FEZVDOWX.mjs';
|
|
6
6
|
import { openChecksummedEnvelope } from './chunk-3OH67G7R.mjs';
|
|
7
7
|
import { joinChunks } from './chunk-3C7MTCCI.mjs';
|
|
8
8
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { admittedHeapBytes } from './chunk-XIHUI4KB.mjs';
|
|
2
2
|
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, MAX_DOC_ID_LENGTH, DEFAULT_LIMIT, DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, DEFAULT_OFFSET } from './chunk-EEBCDP36.mjs';
|
|
3
|
-
import { normalizeSort, requireMatchingCursor, encodePageCursor, decodePageCursor, projectionKeepsField, resolveProjection, clampRowCount, sortSignatureOf, requireSortableFields, fanOutQuery, requireWithinResultWindow, sortModesOf, applySorting, applyPagination, countsWithoutScores, fanOutMatchCount, validatedFilterOf, createPatternWorkMeter, partialWordsToHighlight, partialWordHighlighter, pruneStatsToQueryTerms, everyValueFacetConfig, fulltextMatches, mergeFacets, applyPartitionFiltersBitset, readResidentMemory, partitionsIn, undeclaredFieldOnStrictIndex } from './chunk-
|
|
3
|
+
import { normalizeSort, requireMatchingCursor, encodePageCursor, decodePageCursor, projectionKeepsField, resolveProjection, clampRowCount, sortSignatureOf, requireSortableFields, fanOutQuery, requireWithinResultWindow, sortModesOf, applySorting, applyPagination, countsWithoutScores, fanOutMatchCount, validatedFilterOf, createPatternWorkMeter, partialWordsToHighlight, partialWordHighlighter, pruneStatsToQueryTerms, everyValueFacetConfig, fulltextMatches, mergeFacets, applyPartitionFiltersBitset, readResidentMemory, partitionsIn, undeclaredFieldOnStrictIndex } from './chunk-PIH5SJ4N.mjs';
|
|
4
4
|
import { readOldGenerationStatistics } from './chunk-IPN7S4KX.mjs';
|
|
5
5
|
import { FNV_OFFSET_BASIS, fnv1aContinue, fnv1aContinueTaggedNumbers } from './chunk-KAKQ74LS.mjs';
|
|
6
6
|
import { engineThreadYoungGenerationBytes } from './chunk-Q2UL2TPC.mjs';
|
|
7
7
|
import { DEFAULT_MAX_PER_GROUP, DEFAULT_FUZZY_PREFIX_LENGTH, BM25_DISPLAYED_NAME_LENGTH, DEFAULT_LINEAR_ALPHA, MIN_LINEAR_ALPHA, MAX_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT, MIN_RANK_CONSTANT, RESULT_WINDOW, MAX_TOLERANCE, MAX_PREFIX_LENGTH } from './chunk-FQBFZAWG.mjs';
|
|
8
|
-
import { flattenSchema, partialFieldsOf } from './chunk-
|
|
8
|
+
import { flattenSchema, partialFieldsOf } from './chunk-W5EB5XKI.mjs';
|
|
9
9
|
import { fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
10
10
|
import { isStringValuedBase, parsedTypeOf, isWordIndexedFieldType } from './chunk-I54T6CQP.mjs';
|
|
11
11
|
import { bm25SetsValue, analyseQueryPhrases, requireLoadedPhraseCode, loadPhraseCodeFor, mergeBM25Levels, MAX_BM25_K1, MAX_BM25_B } from './chunk-FB6463IN.mjs';
|
|
@@ -64,7 +64,7 @@ function holdsEveryHead(ref) {
|
|
|
64
64
|
async function loadFieldOnDemand(store, ref, vectorIndex, resolvePartition) {
|
|
65
65
|
const { pathOf } = store;
|
|
66
66
|
if (pathOf === void 0 || vectorIndex.storage !== "disk" || !holdsEveryHead(ref)) return false;
|
|
67
|
-
const { loadFilesByParts, openColdVectorField, osqBitsOf, waitBeforeColdLoad } = await import('./cold-module-
|
|
67
|
+
const { loadFilesByParts, openColdVectorField, osqBitsOf, waitBeforeColdLoad } = await import('./cold-module-VOJXMNZB.mjs');
|
|
68
68
|
await Promise.all([
|
|
69
69
|
...ref.files.map((file) => requireListedSize(store, file.key, { bytes: file.bytes, what: "vector file" })),
|
|
70
70
|
...ref.graphParts.map((part) => requireListedSize(store, part.key, { bytes: part.bytes, what: "graph part" }))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, GEO_UNIT_METRES, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, TYPO_CLAIM_SLOTS_PER_WORD, FILTER_OPERAND_COPY_DEPTH, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-CITFCZKF.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import { MAX_LATITUDE_DEGREES, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS } from './chunk-SQJWAIF4.mjs';
|
|
2
|
+
import { expandTermPrefix, suggestDisplayTerms, partialWordSearchModule, partitionDocumentFrequency } from './chunk-PV2CG7EJ.mjs';
|
|
4
3
|
import { MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, RESULT_WINDOW, DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_PAGE_SIZE, PREFIX_MAX_EXPANSIONS } from './chunk-FQBFZAWG.mjs';
|
|
5
|
-
import { partialFieldsOf, schemaFieldsOf, flattenSchema } from './chunk-
|
|
4
|
+
import { isLatitude, isLongitude, partialFieldsOf, schemaFieldsOf, flattenSchema, getNestedValue, validateDocument, validateDocumentStrict, textFieldsChanged, getFlatSchema, tokenizeOptions, getOrCreateFieldNameIndex } from './chunk-W5EB5XKI.mjs';
|
|
5
|
+
import { MAX_LATITUDE_DEGREES, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS } from './chunk-SQJWAIF4.mjs';
|
|
6
6
|
import { fuzzyPrefixOf, boundedLevenshtein, fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
7
7
|
import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedBase, isWordIndexedFieldType, isListBase } from './chunk-I54T6CQP.mjs';
|
|
8
8
|
import { PENDING_REMOVAL_MERGE_FLOOR, PENDING_REMOVAL_MERGE_DIVISOR, searchFulltext, analyseQueryPhrases, requireLoadedPhraseCode, MAX_TERM_FREQUENCY, createLoadedGeoIndex, partialFieldMarks, termGroupOf, typoMatchesFor, POSTING_LIST_COMPACTION_THRESHOLD, postingColumns, ARRAY_POSITION_GAP } from './chunk-FB6463IN.mjs';
|
|
@@ -1,7 +1,54 @@
|
|
|
1
|
-
import { readMetadataEnvelope } from './chunk-
|
|
2
|
-
import { readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, nextSegmentKey, readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { readMetadataEnvelope } from './chunk-W7OSSKH5.mjs';
|
|
2
|
+
import { readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, nextSegmentKey, readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-GPWMUPCA.mjs';
|
|
3
|
+
import { restoreVectorFields } from './chunk-KCQYFO4K.mjs';
|
|
4
|
+
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-FEZVDOWX.mjs';
|
|
4
5
|
import { turnIsSpent, yieldTurn } from './chunk-LQG5G2LY.mjs';
|
|
6
|
+
import { ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
7
|
+
import { decode } from '@msgpack/msgpack';
|
|
8
|
+
|
|
9
|
+
function validateReplicationEntry(entry, localPrimaryTerm, log) {
|
|
10
|
+
if (!log.verifyChecksum(entry)) {
|
|
11
|
+
return { valid: false, error: ErrorCodes.REPLICATION_ENTRY_CORRUPT };
|
|
12
|
+
}
|
|
13
|
+
if (entry.primaryTerm < localPrimaryTerm) {
|
|
14
|
+
return { valid: false, error: ErrorCodes.REPLICATION_TERM_MISMATCH };
|
|
15
|
+
}
|
|
16
|
+
return { valid: true };
|
|
17
|
+
}
|
|
18
|
+
function applyIndexEntry(entry, manager, vectorFieldPaths, vecIndexes, schedulesGraphBuild = true) {
|
|
19
|
+
if (entry.document === null) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const document = decode(entry.document);
|
|
23
|
+
restoreVectorFields(document, vectorFieldPaths);
|
|
24
|
+
const documentId = entry.documentId;
|
|
25
|
+
if (manager.has(documentId)) {
|
|
26
|
+
removeDocumentVectors(documentId, vecIndexes);
|
|
27
|
+
manager.remove(documentId);
|
|
28
|
+
}
|
|
29
|
+
const { partitionDoc, extractedVectors } = prepareDocumentVectors(document, vectorFieldPaths);
|
|
30
|
+
manager.insert(documentId, partitionDoc);
|
|
31
|
+
try {
|
|
32
|
+
insertDocumentVectors(documentId, extractedVectors, vecIndexes, manager.partitionIdOf(documentId));
|
|
33
|
+
} catch (err) {
|
|
34
|
+
manager.remove(documentId);
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
if (!schedulesGraphBuild) return;
|
|
38
|
+
for (const fieldPath of extractedVectors.keys()) {
|
|
39
|
+
const vecIndex = vecIndexes.get(fieldPath);
|
|
40
|
+
if (vecIndex) {
|
|
41
|
+
vecIndex.scheduleBuild();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function applyDeleteEntry(entry, manager, vecIndexes, removedSpellings) {
|
|
46
|
+
removeDocumentVectors(entry.documentId, vecIndexes);
|
|
47
|
+
if (!manager.has(entry.documentId)) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
manager.remove(entry.documentId, removedSpellings);
|
|
51
|
+
}
|
|
5
52
|
|
|
6
53
|
// src/persistence/durability/marker-writer.ts
|
|
7
54
|
function markerKey(indexName, partitionId) {
|
|
@@ -203,4 +250,4 @@ async function drainIndexStateForUnload(indexState, pendingMetadataWrite, closeW
|
|
|
203
250
|
}
|
|
204
251
|
}
|
|
205
252
|
|
|
206
|
-
export { closePartitionWriter, createMarkerWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, removeLeftoverRewriteFiles, replaySyncedWal, replayWal, snapshotCheckpointFor };
|
|
253
|
+
export { applyDeleteEntry, applyIndexEntry, closePartitionWriter, createMarkerWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, removeLeftoverRewriteFiles, replaySyncedWal, replayWal, snapshotCheckpointFor, validateReplicationEntry };
|