@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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { flattenSchema, getNestedValue } from './chunk-4COWCEY7.mjs';
|
|
2
|
+
import { VECTOR_PATTERN } from './chunk-C5G6TJ7A.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 };
|
|
@@ -4,7 +4,7 @@ import { chunksOf } from './chunk-NVVRSRX5.mjs';
|
|
|
4
4
|
import { turnsAreBudgeted, turnIsSpent, yieldTurn } from './chunk-YZW4CHM6.mjs';
|
|
5
5
|
import { MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_IMPORT_REFUSALS_REPORTED } from './chunk-AM7RSBPF.mjs';
|
|
6
6
|
import { requireConfigurationShape } from './chunk-YH7QY657.mjs';
|
|
7
|
-
import { flattenSchema } from './chunk-
|
|
7
|
+
import { flattenSchema } from './chunk-4COWCEY7.mjs';
|
|
8
8
|
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
9
9
|
|
|
10
10
|
// src/engine/export/lines.ts
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { DEFAULT_VECTOR_METRIC, defaultQuantizationFor } from './chunk-HJBJBH26.mjs';
|
|
2
2
|
import { gunzip, gzip } from './chunk-CKNRFDTZ.mjs';
|
|
3
|
-
import { readListedFile, requireListedChecksum, writeSegmentsOf, readSegmentFile, requireListedSize, SEGMENT_PAGE_BYTES, STABLE_HEAD_ATTEMPTS, RECORD_PAGE_BYTES, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-
|
|
4
|
-
import { restoreVectorFields } from './chunk-QUKQNI3H.mjs';
|
|
3
|
+
import { readListedFile, requireListedChecksum, writeSegmentsOf, readSegmentFile, requireListedSize, SEGMENT_PAGE_BYTES, STABLE_HEAD_ATTEMPTS, RECORD_PAGE_BYTES, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-5MSX5FRT.mjs';
|
|
5
4
|
import { DEFAULT_COMPACTION_THRESHOLD, COMPACTION_LARGEST_MERGED_DOCUMENT_COUNT, SEGMENT_FILE_FRAMING_SLACK_BYTES } from './chunk-F753DA54.mjs';
|
|
6
|
-
import { decodeSegmentManifest } from './chunk-
|
|
5
|
+
import { decodeSegmentManifest } from './chunk-BITYFZSZ.mjs';
|
|
7
6
|
import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead } from './chunk-DVDX4SDR.mjs';
|
|
8
|
-
import {
|
|
7
|
+
import { restoreVectorFields } from './chunk-OXM66LO6.mjs';
|
|
8
|
+
import { SEGMENT_MANIFEST_VERSION, MANIFEST_ENVELOPE_VERSION, manifestKey, manifestReferencedKeys, segmentsPrefix, snapshotBundleKey, vectorFileKey, MAX_SEGMENTS_PER_PARTITION, graphPartKey } from './chunk-6OFDUYVX.mjs';
|
|
9
9
|
import { isSyncEpoch } from './chunk-JWUCMVRK.mjs';
|
|
10
|
-
import { storedStateToWire, storedStateFromWire } from './chunk-
|
|
11
|
-
import { VERSION, DEFAULT_BM25_B, DEFAULT_BM25_K1, rulesOfStoredSynonyms, isCompositePartition, packChecksummedEnvelope, reconstructSchemaFromMetadata, engineVersionParts, packEnvelopeWithChecksum,
|
|
12
|
-
import { isQuantizationMode, isStorageMode } from './chunk-GXX3DQXP.mjs';
|
|
10
|
+
import { storedStateToWire, storedStateFromWire } from './chunk-KSBYEMCB.mjs';
|
|
11
|
+
import { VERSION, DEFAULT_BM25_B, DEFAULT_BM25_K1, rulesOfStoredSynonyms, isCompositePartition, packChecksummedEnvelope, reconstructSchemaFromMetadata, engineVersionParts, packEnvelopeWithChecksum, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, decodeEveryStoredDocument, shareSegmentArrays, decodeMapWithoutFields, prepareDocumentVectors } from './chunk-OCSLSH27.mjs';
|
|
13
12
|
import { crc32, readHeader, HEADER_SIZE, writeHeader, openChecksummedEnvelope, checksumOfChunks } from './chunk-YH7QY657.mjs';
|
|
14
|
-
import { flattenSchema, extractVectorFieldsFromSchema, requireValidFieldTypes, partialFieldsOf } from './chunk-
|
|
13
|
+
import { flattenSchema, extractVectorFieldsFromSchema, requireValidFieldTypes, partialFieldsOf, isQuantizationMode, isStorageMode } from './chunk-4COWCEY7.mjs';
|
|
15
14
|
import { VALID_HNSW_METRICS, MAX_FILE_BYTES } from './chunk-6VBXNFLE.mjs';
|
|
16
15
|
import { VECTOR_PATTERN } from './chunk-C5G6TJ7A.mjs';
|
|
17
16
|
import { getLanguage, resolveIndexAnalysis } from './chunk-MJDQU5MW.mjs';
|
|
@@ -1232,7 +1231,7 @@ function holdsEveryHead(ref) {
|
|
|
1232
1231
|
async function loadFieldOnDemand(store, ref, vectorIndex, resolvePartition) {
|
|
1233
1232
|
const { pathOf } = store;
|
|
1234
1233
|
if (pathOf === void 0 || vectorIndex.storage !== "disk" || !holdsEveryHead(ref)) return false;
|
|
1235
|
-
const { loadFilesByParts, openColdVectorField, osqBitsOf, waitBeforeColdLoad } = await import('./cold-module-
|
|
1234
|
+
const { loadFilesByParts, openColdVectorField, osqBitsOf, waitBeforeColdLoad } = await import('./cold-module-N6KFNNZA.mjs');
|
|
1236
1235
|
await Promise.all([
|
|
1237
1236
|
...ref.files.map((file) => requireListedSize(store, file.key, { bytes: file.bytes, what: "vector file" })),
|
|
1238
1237
|
...ref.graphParts.map((part) => requireListedSize(store, part.key, { bytes: part.bytes, what: "graph part" }))
|
|
@@ -2036,7 +2035,7 @@ async function compactPartitionSegments(input) {
|
|
|
2036
2035
|
if (paged) {
|
|
2037
2036
|
const { directory } = input.store;
|
|
2038
2037
|
if (directory === void 0) return { segments, nextSegmentId: input.nextSegmentId };
|
|
2039
|
-
const { mergePagedWindow } = await import('./module-
|
|
2038
|
+
const { mergePagedWindow } = await import('./module-6RP4ZCBW.mjs');
|
|
2040
2039
|
return replacing(
|
|
2041
2040
|
await mergePagedWindow({
|
|
2042
2041
|
store: input.store,
|
|
@@ -2124,7 +2123,7 @@ function pagedSettingsOf(context) {
|
|
|
2124
2123
|
async function tombstonesOfDelta(context, older, selections, deleted) {
|
|
2125
2124
|
const { directory } = context.input.store;
|
|
2126
2125
|
if (context.input.metadata.textStorage !== "disk" || directory === void 0) return deleted;
|
|
2127
|
-
const { pagedTombstonesFor } = await import('./module-
|
|
2126
|
+
const { pagedTombstonesFor } = await import('./module-6RP4ZCBW.mjs');
|
|
2128
2127
|
return pagedTombstonesFor(
|
|
2129
2128
|
directory,
|
|
2130
2129
|
older,
|
|
@@ -2325,23 +2324,50 @@ function removeFromPartition(manager, partitionId, docIds) {
|
|
|
2325
2324
|
}
|
|
2326
2325
|
}
|
|
2327
2326
|
async function attachPagedSegment(directory, ref, partitionId, manager, options) {
|
|
2328
|
-
const { checkPagedSegmentFully, createPagedFrozenSegment, openPagedSnapshot, pagedListingOf } = await import('./module-
|
|
2327
|
+
const { checkPagedSegmentFully, createPagedFrozenSegment, openPagedSnapshot, pagedListingOf } = await import('./module-6RP4ZCBW.mjs');
|
|
2329
2328
|
if (options.decodesEveryDocument) await checkPagedSegmentFully(directory, ref);
|
|
2330
2329
|
const snapshot = openPagedSnapshot(await pagedListingOf(directory, ref));
|
|
2331
2330
|
requireAgreedSchema(options.schema, snapshot.schema, ref.key);
|
|
2332
2331
|
const segment = createPagedFrozenSegment(snapshot);
|
|
2333
2332
|
removeFromPartition(manager, partitionId, snapshot.tombstones);
|
|
2334
2333
|
options.writeRecords?.loadPagedSegment(manager.indexName, partitionId, segment);
|
|
2335
|
-
if (snapshot.documentCount > 0)
|
|
2336
|
-
|
|
2334
|
+
if (snapshot.documentCount > 0) {
|
|
2335
|
+
manager.attachFrozenSegment(partitionId, segment);
|
|
2336
|
+
return segment;
|
|
2337
|
+
}
|
|
2338
|
+
segment.paged?.close();
|
|
2339
|
+
return null;
|
|
2340
|
+
}
|
|
2341
|
+
function documentsHeldBefore(manager, partitionId) {
|
|
2342
|
+
const held = manager.partitionAt(partitionId);
|
|
2343
|
+
return held === void 0 ? [] : [...held.docIds()];
|
|
2344
|
+
}
|
|
2345
|
+
function removeDocumentsMissingFromLoadedSegments(manager, partitionId, heldBefore, loaded) {
|
|
2346
|
+
const absent = heldBefore.filter(
|
|
2347
|
+
(docId) => manager.partitionIdOf(docId) === partitionId && !loaded.some((segment) => segment.hasDocument(docId))
|
|
2348
|
+
);
|
|
2349
|
+
if (absent.length === 0) return;
|
|
2350
|
+
manager.beginBatchRemove();
|
|
2351
|
+
try {
|
|
2352
|
+
for (const docId of absent) manager.remove(docId);
|
|
2353
|
+
} finally {
|
|
2354
|
+
manager.endBatchRemove();
|
|
2355
|
+
}
|
|
2337
2356
|
}
|
|
2338
2357
|
async function loadPartitionSegments(store, partition, manager, options) {
|
|
2358
|
+
const heldBefore = documentsHeldBefore(manager, partition.partitionId);
|
|
2359
|
+
const loaded = await attachPartitionSegments(store, partition, manager, options);
|
|
2360
|
+
removeDocumentsMissingFromLoadedSegments(manager, partition.partitionId, heldBefore, loaded);
|
|
2361
|
+
}
|
|
2362
|
+
async function attachPartitionSegments(store, partition, manager, options) {
|
|
2363
|
+
const loaded = [];
|
|
2339
2364
|
const { directory } = store;
|
|
2340
2365
|
for (const ref of partition.segments) {
|
|
2341
2366
|
if (manager.config.textStorage === "disk" && directory !== void 0) {
|
|
2342
|
-
const { isPagedSegmentFile } = await import('./module-
|
|
2367
|
+
const { isPagedSegmentFile } = await import('./module-6RP4ZCBW.mjs');
|
|
2343
2368
|
if (await isPagedSegmentFile(directory, ref.key)) {
|
|
2344
|
-
await attachPagedSegment(directory, ref, partition.partitionId, manager, options);
|
|
2369
|
+
const paged = await attachPagedSegment(directory, ref, partition.partitionId, manager, options);
|
|
2370
|
+
if (paged !== null) loaded.push(paged);
|
|
2345
2371
|
await yieldToEventLoop();
|
|
2346
2372
|
continue;
|
|
2347
2373
|
}
|
|
@@ -2352,9 +2378,13 @@ async function loadPartitionSegments(store, partition, manager, options) {
|
|
|
2352
2378
|
const segment = createSharedFrozenSegment(shareSegmentArrays(contents.arrays, manager.partialWordAnalysis));
|
|
2353
2379
|
removeWhatTheSegmentReplaces(manager, segment, contents);
|
|
2354
2380
|
options.writeRecords?.loadSegment(manager.indexName, partition.partitionId, segment, contents);
|
|
2355
|
-
if (contents.arrays.documentCount > 0)
|
|
2381
|
+
if (contents.arrays.documentCount > 0) {
|
|
2382
|
+
manager.attachFrozenSegment(partition.partitionId, segment);
|
|
2383
|
+
loaded.push(segment);
|
|
2384
|
+
}
|
|
2356
2385
|
await yieldToEventLoop();
|
|
2357
2386
|
}
|
|
2387
|
+
return loaded;
|
|
2358
2388
|
}
|
|
2359
2389
|
|
|
2360
2390
|
// src/persistence/durability/segment/load.ts
|
|
@@ -2395,7 +2425,7 @@ async function loadSegmentedCheckpoint(store, indexName, manifest, deps, decodes
|
|
|
2395
2425
|
(field) => deps.vectorIndexes.get(field.fieldPath)?.storage === "disk" && field.files.some((file) => file.headOffset !== void 0)
|
|
2396
2426
|
);
|
|
2397
2427
|
if (!decodesEveryDocument && directory !== void 0 && opensVectorsOnDemand) {
|
|
2398
|
-
const { startReadingOpeningSectionsAhead } = await import('./module-
|
|
2428
|
+
const { startReadingOpeningSectionsAhead } = await import('./module-6RP4ZCBW.mjs');
|
|
2399
2429
|
await startReadingOpeningSectionsAhead(directory, manifest);
|
|
2400
2430
|
}
|
|
2401
2431
|
for (const partition of manifest.partitions) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { dayOf, DayStore, RestoredHistory, openCountsFile, sameBytes } from './chunk-
|
|
2
|
-
import { installSuggestionHooks } from './chunk-
|
|
1
|
+
import { dayOf, DayStore, RestoredHistory, openCountsFile, sameBytes } from './chunk-4AV5PPH6.mjs';
|
|
2
|
+
import { installSuggestionHooks } from './chunk-ZVQMBF2H.mjs';
|
|
3
3
|
import { listHistoryFolder, historyFileOf, removeHistoryFolder, historyFilesOf, buildRecordKey, removeRestoreLeftovers } from './chunk-ZZT7CEN7.mjs';
|
|
4
4
|
import { attachedRuntimeOf, attachRuntime } from './chunk-DIYDOIM4.mjs';
|
|
5
5
|
import { SHA256_BLOCK_BYTES, sha256, SHA256_INITIAL_STATE, compressSha256Block, paddedSha256Message, sha256Digest } from './chunk-H3MDVPBO.mjs';
|
|
6
|
-
import { resolveSetting, isPerson, isGroup, acceptedPhrase, parseSchedule, nextMatchAfter, latestMatchAtOrBefore } from './chunk-
|
|
6
|
+
import { resolveSetting, isPerson, isGroup, acceptedPhrase, parseSchedule, nextMatchAfter, latestMatchAtOrBefore } from './chunk-DMIFXZ3Q.mjs';
|
|
7
7
|
import './chunk-PSWKQVVT.mjs';
|
|
8
8
|
import { oneSyncChangeAtATime } from './chunk-Q32DDFKX.mjs';
|
|
9
|
-
import { emitEngineEvent, emitWriteEventAfter, createEngineIndex, packEnvelopeWithChecksum } from './chunk-
|
|
9
|
+
import { emitEngineEvent, emitWriteEventAfter, createEngineIndex, packEnvelopeWithChecksum } from './chunk-OCSLSH27.mjs';
|
|
10
10
|
import { withOpenIndex } from './chunk-JDOEEMEF.mjs';
|
|
11
11
|
import { SUGGESTIONS_INDEX_INFIX, BUILD_WRITE_BATCH, DAY_MS, MS_PER_SECOND, MIN_KEY_BYTES, SCRAMBLED_ID_BYTES, KEY_FINGERPRINT_LABEL, KEY_FINGERPRINT_BYTES, HISTORY_SWEEP_INTERVAL_MS, SCHEDULE_OFF, MAX_TIMER_DELAY_MS, BUILD_LIST_PAGE } from './chunk-PJHAB5ZY.mjs';
|
|
12
12
|
import { crc32, openChecksummedEnvelope } from './chunk-YH7QY657.mjs';
|
|
@@ -1,93 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getNestedValue } from './chunk-GXX3DQXP.mjs';
|
|
3
|
-
import { requireValidFieldTypes } from './chunk-DNXOMPAQ.mjs';
|
|
1
|
+
import { requireValidFieldTypes } from './chunk-4COWCEY7.mjs';
|
|
4
2
|
import { VECTOR_PATTERN } from './chunk-C5G6TJ7A.mjs';
|
|
5
3
|
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
6
4
|
import { decode } from '@msgpack/msgpack';
|
|
7
5
|
|
|
8
|
-
function applyIndexEntry(entry, manager, vectorFieldPaths, vecIndexes, schedulesGraphBuild = true) {
|
|
9
|
-
if (entry.document === null) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const document = decode(entry.document);
|
|
13
|
-
restoreVectorFields(document, vectorFieldPaths);
|
|
14
|
-
const documentId = entry.documentId;
|
|
15
|
-
if (manager.has(documentId)) {
|
|
16
|
-
removeDocumentVectors(documentId, vecIndexes);
|
|
17
|
-
manager.remove(documentId);
|
|
18
|
-
}
|
|
19
|
-
const { partitionDoc, extractedVectors } = prepareDocumentVectors(document, vectorFieldPaths);
|
|
20
|
-
manager.insert(documentId, partitionDoc);
|
|
21
|
-
try {
|
|
22
|
-
insertDocumentVectors(documentId, extractedVectors, vecIndexes, manager.partitionIdOf(documentId));
|
|
23
|
-
} catch (err) {
|
|
24
|
-
manager.remove(documentId);
|
|
25
|
-
throw err;
|
|
26
|
-
}
|
|
27
|
-
if (!schedulesGraphBuild) return;
|
|
28
|
-
for (const fieldPath of extractedVectors.keys()) {
|
|
29
|
-
const vecIndex = vecIndexes.get(fieldPath);
|
|
30
|
-
if (vecIndex) {
|
|
31
|
-
vecIndex.scheduleBuild();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function applyDeleteEntry(entry, manager, vecIndexes, removedSpellings) {
|
|
36
|
-
removeDocumentVectors(entry.documentId, vecIndexes);
|
|
37
|
-
if (!manager.has(entry.documentId)) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
manager.remove(entry.documentId, removedSpellings);
|
|
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 % 4 !== 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 / 4;
|
|
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 * 4, true);
|
|
56
|
-
}
|
|
57
|
-
setNestedValue(document, fieldPath, float32);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
62
|
-
function setNestedValue(obj, path, value) {
|
|
63
|
-
if (!path.includes(".")) {
|
|
64
|
-
if (FORBIDDEN_KEYS.has(path)) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
obj[path] = value;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const segments = path.split(".");
|
|
71
|
-
let current = obj;
|
|
72
|
-
for (let i = 0; i < segments.length - 1; i += 1) {
|
|
73
|
-
const segment = segments[i];
|
|
74
|
-
if (segment === void 0 || FORBIDDEN_KEYS.has(segment)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
let next = current[segment];
|
|
78
|
-
if (next === null || next === void 0 || typeof next !== "object") {
|
|
79
|
-
next = {};
|
|
80
|
-
current[segment] = next;
|
|
81
|
-
}
|
|
82
|
-
current = next;
|
|
83
|
-
}
|
|
84
|
-
const finalSegment = segments.at(-1);
|
|
85
|
-
if (finalSegment === void 0 || FORBIDDEN_KEYS.has(finalSegment)) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
current[finalSegment] = value;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
6
|
// src/serialization/keyword-segment/types.ts
|
|
92
7
|
var KEYWORD_SEGMENT_PAYLOAD_VERSION = 1;
|
|
93
8
|
var KEYWORD_SEGMENT_ENVELOPE_VERSION = 4;
|
|
@@ -644,4 +559,4 @@ function decodeKeywordSegment(payload, shared) {
|
|
|
644
559
|
return writeRecords === null ? { schema, tombstones, arrays } : { schema, tombstones, arrays, writeRecords };
|
|
645
560
|
}
|
|
646
561
|
|
|
647
|
-
export { KEYWORD_SEGMENT_ENVELOPE_VERSION, KEYWORD_SEGMENT_PAYLOAD_VERSION,
|
|
562
|
+
export { KEYWORD_SEGMENT_ENVELOPE_VERSION, KEYWORD_SEGMENT_PAYLOAD_VERSION, decodeBooleanColumns, decodeEnumColumns, decodeFieldLengths, decodeGeopointColumns, decodeKeywordSegment, decodePartialWords, decodePatternColumns, decodeSurfaceForms, decodeValueColumns, littleEndianBytes, requireEntriesAscend, requireOffsets, requireUtf8Entries, uint32sFrom, uint64Bytes };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { attachedRuntimeOf } from './chunk-DIYDOIM4.mjs';
|
|
2
|
-
import { emitWriteEventAfter, dropEngineIndex } from './chunk-
|
|
2
|
+
import { emitWriteEventAfter, dropEngineIndex } from './chunk-OCSLSH27.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.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-ZQJVZ5DN.mjs');
|
|
56
56
|
await localRuntimeOf(core, engine, config);
|
|
57
57
|
} catch (error) {
|
|
58
58
|
await engine.shutdown().catch(() => void 0);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { encodeDocumentJson } from './chunk-WBYQRHDY.mjs';
|
|
2
|
-
import { loadFailed, sectionNamed, PAGED_SEGMENT_ENVELOPE_VERSION, writeSegmentsOf, MessagePackChunks, writeSurfaceForms, writeFieldLengths, writeValueColumns, writeBooleanColumns, writeEnumColumns, writeGeopointColumns, writePatternColumns, writePartialWords, encodePagedSegmentHead, SECTION_ALIGNMENT_BYTES, SEGMENT_PAGE_BYTES, FILE_ASSEMBLY_CHUNK_BYTES, REWRITE_SPILL_BYTES, PAYLOAD_PREFIX_BYTES, decodePagedSegmentHead, BLOCK_SUMMARY_BYTES, SMALLEST_BLOCK_POSTINGS, DOCUMENT_BLOCK_BYTES, LIST_VIEWS_HELD_PER_SEGMENT, TOMBSTONES_BETWEEN_YIELDS, readSegmentFile, decodeSections, READS_AHEAD_AT_ONCE, WRITER_YIELD_INTERVAL_TOKENS, DOCUMENT_BLOCK_MIN_RAW_BYTES, ID_SAMPLE_INTERVAL, LARGEST_CACHED_ENTRY_SHARE, MAX_THREAD_FILE_NUMBER, POSITION_WIDTH_BYTES, POSTING_WIDTH_BYTES, RECORD_PAGE_BYTES, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, SECTION_WRITE_BUFFER_BYTES, MAX_DOCUMENT_BLOCK_RAW_BYTES, READ_AHEAD_CHUNK_BYTES, LARGEST_REMOVAL_BUCKET_COUNT, REMOVAL_BUCKET_TARGET_BYTES, THREAD_READ_CACHE_BYTES, MERGE_READ_CACHE_BYTES } from './chunk-
|
|
3
|
-
import { requireOffsets, requireUtf8Entries, requireEntriesAscend, decodeFieldLengths, decodePartialWords, decodePatternColumns, decodeGeopointColumns, decodeEnumColumns, decodeBooleanColumns, decodeValueColumns,
|
|
2
|
+
import { loadFailed, sectionNamed, PAGED_SEGMENT_ENVELOPE_VERSION, writeSegmentsOf, MessagePackChunks, writeSurfaceForms, writeFieldLengths, writeValueColumns, writeBooleanColumns, writeEnumColumns, writeGeopointColumns, writePatternColumns, writePartialWords, encodePagedSegmentHead, SECTION_ALIGNMENT_BYTES, SEGMENT_PAGE_BYTES, FILE_ASSEMBLY_CHUNK_BYTES, REWRITE_SPILL_BYTES, PAYLOAD_PREFIX_BYTES, decodePagedSegmentHead, BLOCK_SUMMARY_BYTES, SMALLEST_BLOCK_POSTINGS, DOCUMENT_BLOCK_BYTES, LIST_VIEWS_HELD_PER_SEGMENT, TOMBSTONES_BETWEEN_YIELDS, readSegmentFile, decodeSections, READS_AHEAD_AT_ONCE, WRITER_YIELD_INTERVAL_TOKENS, DOCUMENT_BLOCK_MIN_RAW_BYTES, ID_SAMPLE_INTERVAL, LARGEST_CACHED_ENTRY_SHARE, MAX_THREAD_FILE_NUMBER, POSITION_WIDTH_BYTES, POSTING_WIDTH_BYTES, RECORD_PAGE_BYTES, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, SECTION_WRITE_BUFFER_BYTES, MAX_DOCUMENT_BLOCK_RAW_BYTES, READ_AHEAD_CHUNK_BYTES, LARGEST_REMOVAL_BUCKET_COUNT, REMOVAL_BUCKET_TARGET_BYTES, THREAD_READ_CACHE_BYTES, MERGE_READ_CACHE_BYTES } from './chunk-5MSX5FRT.mjs';
|
|
3
|
+
import { requireOffsets, requireUtf8Entries, requireEntriesAscend, decodeFieldLengths, decodePartialWords, decodePatternColumns, decodeGeopointColumns, decodeEnumColumns, decodeBooleanColumns, decodeValueColumns, littleEndianBytes, uint32sFrom, uint64Bytes, decodeSurfaceForms } from './chunk-ZNZ6CPAZ.mjs';
|
|
4
4
|
import { createVectorFileReader } from './chunk-4DII3ZSM.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { setNestedValue } from './chunk-OXM66LO6.mjs';
|
|
6
|
+
import { generateId, wrapFrozenTokenTable, createEncodedDocumentSource, assemblePagedFrozenSegment, decodeStoredDocument, isCompositePartition, mergeFieldLengths, mergeSurfaceForms, encodeSurfaceTable, mergePartialWords, buildPartialWordTableFrom, mergeFieldIndexes, engineVersionParts, resolvePartitionInsertOptions, createPartitionIndex, createCompositePartition, decodeSurfaceTable, mergeDocFrequencies, createSharedFrozenSegment, shareSegmentArrays, selectionKeeps, fieldIndexRemapOf, freezeSegmentShared, createFrozenSegment, scanPostingBlocks, holdsADiscardedField, endOfValue } from './chunk-OCSLSH27.mjs';
|
|
6
7
|
import { reactNativeHost } from './chunk-MVXELMJX.mjs';
|
|
7
|
-
import { parseVectorDimension } from './chunk-GXX3DQXP.mjs';
|
|
8
8
|
import { HEADER_SIZE, requireWithinFileLimit, crc32Init, crc32Update, crc32Final, writeHeader, crc32, readHeader } from './chunk-YH7QY657.mjs';
|
|
9
|
-
import { flattenSchema, encodeDocument } from './chunk-
|
|
9
|
+
import { flattenSchema, parseVectorDimension, encodeDocument } from './chunk-4COWCEY7.mjs';
|
|
10
10
|
import { VECTOR_PATTERN } from './chunk-C5G6TJ7A.mjs';
|
|
11
11
|
import { compareCodePoints } from './chunk-EJ33LCHV.mjs';
|
|
12
12
|
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
@@ -1308,7 +1308,7 @@ async function coldFieldOf(checkpoint, field) {
|
|
|
1308
1308
|
const dimension = fieldType === void 0 ? null : parseVectorDimension(fieldType);
|
|
1309
1309
|
if (dimension === null) return null;
|
|
1310
1310
|
const withPath = async (ref) => ({ ref, path: await directory.pathOf(ref.key) });
|
|
1311
|
-
const { openColdVectorField } = await import('./cold-module-
|
|
1311
|
+
const { openColdVectorField } = await import('./cold-module-N6KFNNZA.mjs');
|
|
1312
1312
|
return openColdVectorField({
|
|
1313
1313
|
fieldPath: field.fieldPath,
|
|
1314
1314
|
dimension,
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-ENLMYKSX.mjs';
|
|
2
2
|
export { createHNSWIndex, osqBitsOf } from './chunk-ENLMYKSX.mjs';
|
|
3
|
-
import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-
|
|
4
|
-
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-
|
|
3
|
+
import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-ZWAIN4GG.mjs';
|
|
4
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-ZWAIN4GG.mjs';
|
|
5
5
|
import './chunk-WBYQRHDY.mjs';
|
|
6
6
|
import './chunk-4J74WHQM.mjs';
|
|
7
|
-
import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES, COLD_WALK_NODES_READ_AHEAD } from './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES, COLD_WALK_NODES_READ_AHEAD } from './chunk-5MSX5FRT.mjs';
|
|
8
|
+
import './chunk-ZNZ6CPAZ.mjs';
|
|
9
9
|
import './chunk-F753DA54.mjs';
|
|
10
10
|
import './chunk-4DII3ZSM.mjs';
|
|
11
11
|
import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors, stageQueryLevels, readTrailer } from './chunk-DVDX4SDR.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
-
import
|
|
12
|
+
import './chunk-OXM66LO6.mjs';
|
|
13
|
+
import './chunk-6OFDUYVX.mjs';
|
|
14
|
+
import { yieldToEventLoop } from './chunk-OCSLSH27.mjs';
|
|
14
15
|
import './chunk-NNE4VDMM.mjs';
|
|
15
16
|
import './chunk-IO2SMUQD.mjs';
|
|
16
17
|
import './chunk-YZW4CHM6.mjs';
|
|
@@ -18,14 +19,14 @@ import './chunk-LU3Y3P63.mjs';
|
|
|
18
19
|
import './chunk-AM7RSBPF.mjs';
|
|
19
20
|
import './chunk-MVXELMJX.mjs';
|
|
20
21
|
import './chunk-RDWG33MM.mjs';
|
|
21
|
-
import './chunk-
|
|
22
|
+
import './chunk-KU646XXT.mjs';
|
|
22
23
|
import './chunk-UNUFZ2QY.mjs';
|
|
23
24
|
import './chunk-3NQOVO3K.mjs';
|
|
24
25
|
import './chunk-JDOEEMEF.mjs';
|
|
25
26
|
import './chunk-2PRHILX3.mjs';
|
|
26
27
|
import { HEADER_SIZE, crc32, readHeader } from './chunk-YH7QY657.mjs';
|
|
27
28
|
import './chunk-CHPTFFJM.mjs';
|
|
28
|
-
import './chunk-
|
|
29
|
+
import './chunk-4COWCEY7.mjs';
|
|
29
30
|
import './chunk-5CQX3XXV.mjs';
|
|
30
31
|
import './chunk-6VBXNFLE.mjs';
|
|
31
32
|
import './chunk-C5G6TJ7A.mjs';
|
package/dist/react-native/chunks/{durability-wiring-34OYO32E.mjs → durability-wiring-RN64S2TL.mjs}
RENAMED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { writeMetadataEnvelope, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readCurrentManifest, readMetadataEnvelope, createSeqOwner, SEGMENT_HEADER_SIZE, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, nextSegmentKey, checkSegmentHeader, RECORD_LENGTH_SIZE, MAX_WAL_RECORD_BYTES, FRAME_CRC_SIZE, decodeWalEntry, readCommitMarker, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, documentsOfPayloadV2, metadataConfigOf, durableMetadataConfigOf, buildEntry, captureWholePartition } from './chunk-
|
|
1
|
+
import { writeMetadataEnvelope, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readCurrentManifest, readMetadataEnvelope, createSeqOwner, SEGMENT_HEADER_SIZE, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, nextSegmentKey, checkSegmentHeader, RECORD_LENGTH_SIZE, MAX_WAL_RECORD_BYTES, FRAME_CRC_SIZE, decodeWalEntry, readCommitMarker, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, documentsOfPayloadV2, metadataConfigOf, durableMetadataConfigOf, buildEntry, captureWholePartition } from './chunk-WVWJNUMN.mjs';
|
|
2
2
|
import { createDirectoryWatch, unrefInterval, LOG_READ_CHUNK_BYTES } from './chunk-SUPXRTMD.mjs';
|
|
3
3
|
import './chunk-HJBJBH26.mjs';
|
|
4
4
|
import './chunk-CKNRFDTZ.mjs';
|
|
5
|
-
import { adapterCheckpointStore, directoryCheckpointStore, readListedFile, readSegmentFile } from './chunk-
|
|
6
|
-
import
|
|
5
|
+
import { adapterCheckpointStore, directoryCheckpointStore, readListedFile, readSegmentFile } from './chunk-5MSX5FRT.mjs';
|
|
6
|
+
import './chunk-ZNZ6CPAZ.mjs';
|
|
7
7
|
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, DIRECTORY_LOCK_ATTEMPTS, PHONE_FILE_CHUNK_BYTES, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_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-F753DA54.mjs';
|
|
8
|
-
import { decodeSegmentManifest, isRecord, invalidManifest, isId, isUint32, isSequenceNumber } from './chunk-
|
|
8
|
+
import { decodeSegmentManifest, isRecord, invalidManifest, isId, isUint32, isSequenceNumber } from './chunk-BITYFZSZ.mjs';
|
|
9
9
|
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-DVDX4SDR.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { restoreVectorFields } from './chunk-OXM66LO6.mjs';
|
|
11
|
+
import { manifestKey, manifestReferencedKeys, snapshotBundleKey, manifestFileRefs, MAX_SEGMENTS_PER_PARTITION, manifestWithinPartitionCount } from './chunk-6OFDUYVX.mjs';
|
|
11
12
|
import './chunk-JWUCMVRK.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
+
import './chunk-KSBYEMCB.mjs';
|
|
13
14
|
import { sha256 } from './chunk-H3MDVPBO.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
+
import './chunk-DMIFXZ3Q.mjs';
|
|
15
16
|
import { nodeThreadId } from './chunk-PSWKQVVT.mjs';
|
|
16
|
-
import { toError, packChecksummedEnvelope, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
17
|
+
import { toError, packChecksummedEnvelope, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment, removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-OCSLSH27.mjs';
|
|
17
18
|
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
18
19
|
import './chunk-IO2SMUQD.mjs';
|
|
19
20
|
import { turnsAreBudgeted, turnIsSpent, yieldTurn, waitOutsideCountedWrite, detectRuntime } from './chunk-YZW4CHM6.mjs';
|
|
@@ -21,7 +22,7 @@ import './chunk-LU3Y3P63.mjs';
|
|
|
21
22
|
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-AM7RSBPF.mjs';
|
|
22
23
|
import { reactNativeHost } from './chunk-MVXELMJX.mjs';
|
|
23
24
|
import './chunk-RDWG33MM.mjs';
|
|
24
|
-
import './chunk-
|
|
25
|
+
import './chunk-KU646XXT.mjs';
|
|
25
26
|
import './chunk-UNUFZ2QY.mjs';
|
|
26
27
|
import './chunk-3NQOVO3K.mjs';
|
|
27
28
|
import './chunk-JDOEEMEF.mjs';
|
|
@@ -29,7 +30,7 @@ import './chunk-2PRHILX3.mjs';
|
|
|
29
30
|
import { QUERY_HISTORY_FOLDER } from './chunk-PJHAB5ZY.mjs';
|
|
30
31
|
import { openChecksummedEnvelope, crc32, HEADER_SIZE } from './chunk-YH7QY657.mjs';
|
|
31
32
|
import { fnv1a } from './chunk-CHPTFFJM.mjs';
|
|
32
|
-
import { encodeDocument, requireValidFieldTypes } from './chunk-
|
|
33
|
+
import { encodeDocument, requireValidFieldTypes } from './chunk-4COWCEY7.mjs';
|
|
33
34
|
import { MIN_M } from './chunk-5CQX3XXV.mjs';
|
|
34
35
|
import { MAX_FILE_BYTES } from './chunk-6VBXNFLE.mjs';
|
|
35
36
|
import './chunk-C5G6TJ7A.mjs';
|
|
@@ -986,6 +987,40 @@ function parseSegmentStartSeqNo(key, prefix) {
|
|
|
986
987
|
function formatSegmentStart(startSeqNo) {
|
|
987
988
|
return startSeqNo.toString().padStart(16, "0");
|
|
988
989
|
}
|
|
990
|
+
function applyIndexEntry(entry, manager, vectorFieldPaths, vecIndexes, schedulesGraphBuild = true) {
|
|
991
|
+
if (entry.document === null) {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
const document = decode(entry.document);
|
|
995
|
+
restoreVectorFields(document, vectorFieldPaths);
|
|
996
|
+
const documentId = entry.documentId;
|
|
997
|
+
if (manager.has(documentId)) {
|
|
998
|
+
removeDocumentVectors(documentId, vecIndexes);
|
|
999
|
+
manager.remove(documentId);
|
|
1000
|
+
}
|
|
1001
|
+
const { partitionDoc, extractedVectors } = prepareDocumentVectors(document, vectorFieldPaths);
|
|
1002
|
+
manager.insert(documentId, partitionDoc);
|
|
1003
|
+
try {
|
|
1004
|
+
insertDocumentVectors(documentId, extractedVectors, vecIndexes, manager.partitionIdOf(documentId));
|
|
1005
|
+
} catch (err) {
|
|
1006
|
+
manager.remove(documentId);
|
|
1007
|
+
throw err;
|
|
1008
|
+
}
|
|
1009
|
+
if (!schedulesGraphBuild) return;
|
|
1010
|
+
for (const fieldPath of extractedVectors.keys()) {
|
|
1011
|
+
const vecIndex = vecIndexes.get(fieldPath);
|
|
1012
|
+
if (vecIndex) {
|
|
1013
|
+
vecIndex.scheduleBuild();
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
function applyDeleteEntry(entry, manager, vecIndexes, removedSpellings) {
|
|
1018
|
+
removeDocumentVectors(entry.documentId, vecIndexes);
|
|
1019
|
+
if (!manager.has(entry.documentId)) {
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
manager.remove(entry.documentId, removedSpellings);
|
|
1023
|
+
}
|
|
989
1024
|
|
|
990
1025
|
// src/persistence/durability/marker-writer.ts
|
|
991
1026
|
function markerKey(indexName, partitionId) {
|
|
@@ -1550,7 +1585,8 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1550
1585
|
const store = directoryCheckpointStore(input.directory);
|
|
1551
1586
|
const writeRecords = input.hooks.writeRecords ?? null;
|
|
1552
1587
|
const { indexName } = input;
|
|
1553
|
-
const
|
|
1588
|
+
const storedManifest = await readCurrentManifest(store, input.indexName);
|
|
1589
|
+
const priorManifest = storedManifest === null ? null : manifestWithinPartitionCount(storedManifest, manager.partitionCount);
|
|
1554
1590
|
const textOnDisk = metadata.textStorage === "disk";
|
|
1555
1591
|
const wholePartitionsOf = wholePartitionsWhereMostChanged(manager, {
|
|
1556
1592
|
priorCheckpoint: priorManifest?.checkpoint ?? [],
|
|
@@ -1587,7 +1623,7 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1587
1623
|
}
|
|
1588
1624
|
async function adoptWrittenSegments(input, manager, partitions, changes) {
|
|
1589
1625
|
const { indexName, indexState, hooks } = input;
|
|
1590
|
-
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-
|
|
1626
|
+
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-6RP4ZCBW.mjs');
|
|
1591
1627
|
const adoption = await prepareDiskAdoption(input.directory, manager, partitions);
|
|
1592
1628
|
if (adoption === null) return [];
|
|
1593
1629
|
const adopted = await whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
@@ -1642,7 +1678,7 @@ async function finishBoundedCheckpoint(input, manager, store, metadata, priorMan
|
|
|
1642
1678
|
const droppedThisCheckpoint = changes !== null && capture2.recordsLeftInLog === 0 ? new Set(await adoptWrittenSegments(input, manager, segments.partitions, changes)) : /* @__PURE__ */ new Set();
|
|
1643
1679
|
if (!input.holdsCheckpointFiles()) {
|
|
1644
1680
|
const removable = await garbageThatNoFieldStillReads(store, vectorIndexes, written.garbage);
|
|
1645
|
-
const stillRead = metadata.textStorage === "disk" ? (await import('./module-
|
|
1681
|
+
const stillRead = metadata.textStorage === "disk" ? (await import('./module-6RP4ZCBW.mjs')).keysThatSegmentsStillRead(manager) : /* @__PURE__ */ new Set();
|
|
1646
1682
|
const keptForSync = await input.keepsCheckpointKey();
|
|
1647
1683
|
await removeCheckpointGarbage(
|
|
1648
1684
|
store,
|
|
@@ -3673,7 +3709,7 @@ var decoder = new TextDecoder();
|
|
|
3673
3709
|
async function countPagedPartition(store, partition) {
|
|
3674
3710
|
const { directory } = store;
|
|
3675
3711
|
if (directory === void 0 || partition.segments.length === 0) return null;
|
|
3676
|
-
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-
|
|
3712
|
+
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-6RP4ZCBW.mjs');
|
|
3677
3713
|
for (const ref of partition.segments) if (!await isPagedSegmentFile(directory, ref.key)) return null;
|
|
3678
3714
|
const scans = [];
|
|
3679
3715
|
try {
|
|
@@ -4416,11 +4452,7 @@ function capture(input, prior) {
|
|
|
4416
4452
|
return { targets, plans, documentCount: input.manager.countDocuments(), contents };
|
|
4417
4453
|
}
|
|
4418
4454
|
async function writeCaptured(input, store, prior, captured) {
|
|
4419
|
-
const
|
|
4420
|
-
const priorWithinCount = prior === null ? null : {
|
|
4421
|
-
checkpoint: prior.checkpoint.filter((entry) => entry.partitionId < partitionCount),
|
|
4422
|
-
partitions: prior.partitions.filter((partition) => partition.partitionId < partitionCount)
|
|
4423
|
-
};
|
|
4455
|
+
const priorWithinCount = prior === null ? null : manifestWithinPartitionCount(prior, input.manager.partitionCount);
|
|
4424
4456
|
const written = await writeCheckpointSegments({
|
|
4425
4457
|
store,
|
|
4426
4458
|
metadata: input.metadata,
|
|
@@ -4934,9 +4966,19 @@ function createDurabilityFromTier(tier, wiring) {
|
|
|
4934
4966
|
keepsSyncHistory: (indexName) => wiring.indexRegistry.get(indexName)?.sync?.active === true,
|
|
4935
4967
|
onHistoryMoved(indexName) {
|
|
4936
4968
|
if (wiring.indexRegistry.get(indexName)?.sync?.active !== true) return;
|
|
4937
|
-
import('./retention-
|
|
4969
|
+
import('./retention-5GTFT3GR.mjs').then((retention) => retention.scheduleSyncRetention(wiring.engineCore(), indexName)).catch((error) => wiring.emitFatalError(error instanceof Error ? error : new Error(String(error))));
|
|
4938
4970
|
}
|
|
4939
4971
|
});
|
|
4940
4972
|
}
|
|
4973
|
+
async function reloadIndexAndCopies(orchestrator, durability, indexName) {
|
|
4974
|
+
const manager = durability?.manager;
|
|
4975
|
+
if (manager?.reloadIndex === void 0) return;
|
|
4976
|
+
const wasScaledOut = orchestrator.desyncIndex(indexName);
|
|
4977
|
+
try {
|
|
4978
|
+
await manager.reloadIndex(indexName);
|
|
4979
|
+
} finally {
|
|
4980
|
+
await orchestrator.resyncIndex(indexName, wasScaledOut);
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4941
4983
|
|
|
4942
|
-
export { createDurabilityFromTier };
|
|
4984
|
+
export { createDurabilityFromTier, reloadIndexAndCopies };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { clearLeftoversOfName, dropSuggestionIndexesOf, installSuggestionHooks, startQuerySuggestions } from './chunk-
|
|
1
|
+
export { clearLeftoversOfName, dropSuggestionIndexesOf, installSuggestionHooks, startQuerySuggestions } from './chunk-ZVQMBF2H.mjs';
|
|
2
2
|
import './chunk-DIYDOIM4.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-OCSLSH27.mjs';
|
|
4
4
|
import './chunk-NNE4VDMM.mjs';
|
|
5
5
|
import './chunk-IO2SMUQD.mjs';
|
|
6
6
|
import './chunk-YZW4CHM6.mjs';
|
|
@@ -8,14 +8,14 @@ import './chunk-LU3Y3P63.mjs';
|
|
|
8
8
|
import './chunk-AM7RSBPF.mjs';
|
|
9
9
|
import './chunk-MVXELMJX.mjs';
|
|
10
10
|
import './chunk-RDWG33MM.mjs';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-KU646XXT.mjs';
|
|
12
12
|
import './chunk-UNUFZ2QY.mjs';
|
|
13
13
|
import './chunk-3NQOVO3K.mjs';
|
|
14
14
|
import './chunk-JDOEEMEF.mjs';
|
|
15
15
|
import './chunk-2PRHILX3.mjs';
|
|
16
16
|
import './chunk-YH7QY657.mjs';
|
|
17
17
|
import './chunk-CHPTFFJM.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-4COWCEY7.mjs';
|
|
19
19
|
import './chunk-5CQX3XXV.mjs';
|
|
20
20
|
import './chunk-6VBXNFLE.mjs';
|
|
21
21
|
import './chunk-C5G6TJ7A.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-TORU2OHQ.mjs';
|
|
2
2
|
import './chunk-LZSLNSUN.mjs';
|
|
3
3
|
import './chunk-4J74WHQM.mjs';
|
|
4
4
|
import './chunk-NVVRSRX5.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-OCSLSH27.mjs';
|
|
6
6
|
import './chunk-NNE4VDMM.mjs';
|
|
7
7
|
import './chunk-IO2SMUQD.mjs';
|
|
8
8
|
import './chunk-YZW4CHM6.mjs';
|
|
@@ -10,14 +10,14 @@ import './chunk-LU3Y3P63.mjs';
|
|
|
10
10
|
import './chunk-AM7RSBPF.mjs';
|
|
11
11
|
import './chunk-MVXELMJX.mjs';
|
|
12
12
|
import './chunk-RDWG33MM.mjs';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-KU646XXT.mjs';
|
|
14
14
|
import './chunk-UNUFZ2QY.mjs';
|
|
15
15
|
import './chunk-3NQOVO3K.mjs';
|
|
16
16
|
import './chunk-JDOEEMEF.mjs';
|
|
17
17
|
import './chunk-2PRHILX3.mjs';
|
|
18
18
|
import './chunk-YH7QY657.mjs';
|
|
19
19
|
import './chunk-CHPTFFJM.mjs';
|
|
20
|
-
import './chunk-
|
|
20
|
+
import './chunk-4COWCEY7.mjs';
|
|
21
21
|
import './chunk-5CQX3XXV.mjs';
|
|
22
22
|
import './chunk-6VBXNFLE.mjs';
|
|
23
23
|
import './chunk-C5G6TJ7A.mjs';
|