@delali/narsil 0.3.1-next.180 → 0.3.1-next.183
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/browser/{chunk-JHFBQKUF.mjs → chunk-ZZUXMJIK.mjs} +12 -14
- package/dist/browser/{durability-config-SGB5ZP5K.mjs → durability-config-75NSFCQN.mjs} +6 -3
- package/dist/browser/{optional-writes-TB34FYUW.mjs → optional-writes-IQFTXANH.mjs} +2 -0
- package/dist/browser/{storage-leaf-QFXIWDFK.mjs → storage-leaf-2CO6SQ7R.mjs} +859 -250
- package/dist/{capabilities-BQIdsaWy.d.ts → capabilities-DAHXphRn.d.ts} +2 -2
- package/dist/{chunk-QFJMRB7D.mjs → chunk-2DK74OQL.mjs} +1 -1
- package/dist/{chunk-F3FDHXCJ.mjs → chunk-3OEXOSWI.mjs} +251 -50
- package/dist/{chunk-GO6TRSJ6.mjs → chunk-632ABEIR.mjs} +1 -1
- package/dist/{chunk-34IOOYXA.mjs → chunk-6ICOWB6I.mjs} +1 -1
- package/dist/{chunk-XNFBYAXI.mjs → chunk-C3EINJNJ.mjs} +1 -1
- package/dist/{chunk-JCWC75NH.mjs → chunk-C77OBNPP.mjs} +1 -1
- package/dist/{chunk-YPV2L7M5.mjs → chunk-CKS4QQEC.mjs} +3 -3
- package/dist/{chunk-2C3BXZGA.mjs → chunk-CWXR7OP4.mjs} +18 -20
- package/dist/{chunk-BIIROQ5Q.mjs → chunk-EGWBZSHK.mjs} +2 -2
- package/dist/{chunk-XQQKETAF.mjs → chunk-F2UOTRY7.mjs} +2 -2
- package/dist/{chunk-XTSFRWAS.mjs → chunk-FIXUVFUC.mjs} +3 -3
- package/dist/{chunk-Y27E2MGC.mjs → chunk-GGG5R4CU.mjs} +1 -1
- package/dist/{chunk-2KWTQ2P7.mjs → chunk-JVR5KMO4.mjs} +2 -2
- package/dist/{chunk-XITVDRRH.mjs → chunk-M3H7CTIC.mjs} +6 -6
- package/dist/{chunk-YXZDTKQS.mjs → chunk-MCAJOLVK.mjs} +2 -2
- package/dist/{chunk-QDZJM7NI.mjs → chunk-MSIN4NM3.mjs} +3 -1
- package/dist/{chunk-UISV46WX.mjs → chunk-NPXORGMK.mjs} +2 -2
- package/dist/{chunk-R7PLSVK3.mjs → chunk-OQANB7SJ.mjs} +1 -1
- package/dist/{chunk-KHJPMZE2.mjs → chunk-PK3BGGHO.mjs} +1 -1
- package/dist/{chunk-ISJ35523.mjs → chunk-PXEGKQHS.mjs} +2 -2
- package/dist/{chunk-LOQHA6QK.mjs → chunk-SA7U67XF.mjs} +2 -2
- package/dist/{chunk-JDIATDPY.mjs → chunk-T3YI4KN6.mjs} +1 -1
- package/dist/{chunk-ZB5X5WAK.mjs → chunk-TTTBE4TB.mjs} +10 -5
- package/dist/{chunk-A4XYDUVN.mjs → chunk-V7F5DOSC.mjs} +2 -2
- package/dist/{chunk-26E5MO3Y.mjs → chunk-WUWSUJ2X.mjs} +4 -4
- package/dist/{chunk-XFOL77WH.mjs → chunk-YWSIRKKQ.mjs} +1 -1
- package/dist/{chunk-7FC2ZILY.mjs → chunk-ZVZ2V2PZ.mjs} +37 -67
- package/dist/{client-CeUxvIvd.d.ts → client-DpqtT2XG.d.ts} +3 -3
- package/dist/client.d.ts +6 -6
- package/dist/{config-DehU-VGL.d.ts → config-C687-reW.d.ts} +11 -1
- package/dist/{config-CIpLXXxm.d.ts → config-D9WR3MhO.d.ts} +1 -1
- package/dist/{direct-executor-2WQSGBN3.mjs → direct-executor-JXYIL4OQ.mjs} +1 -1
- package/dist/distribution.d.ts +4 -4
- package/dist/distribution.mjs +391 -138
- package/dist/{durability-config-XV4XR7Y4.mjs → durability-config-NWU2G2SJ.mjs} +6 -3
- package/dist/{engine-P-4xhUe4.d.ts → engine-De6JzTW8.d.ts} +123 -72
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.react-native.mjs +1 -1
- package/dist/{long-query-thread-AAYTLYZK.mjs → long-query-thread-HPKGRYWM.mjs} +10 -10
- package/dist/{optional-writes-N2DFWWZ3.mjs → optional-writes-QE7QUI45.mjs} +5 -3
- package/dist/{paged-partition-archive-X7L27E5Z.mjs → paged-partition-archive-IK2UOY2G.mjs} +9 -9
- package/dist/partial-words.browser.mjs +1 -1
- package/dist/partial-words.mjs +1 -1
- package/dist/persistence/durability/checkpoint-worker.d.ts +9 -0
- package/dist/persistence/durability/checkpoint-worker.mjs +23 -12
- package/dist/{query-actions-2JOLPELC.mjs → query-actions-COEFVUH3.mjs} +1 -1
- package/dist/query-suggestions/merge-worker.mjs +4 -4
- package/dist/query-suggestions.browser.mjs +1 -1
- package/dist/query-suggestions.d.ts +1 -1
- package/dist/query-suggestions.mjs +2 -2
- package/dist/react-native/chunks/{chunk-F4MIGBBP.mjs → chunk-6A5XE2MA.mjs} +18 -20
- package/dist/react-native/chunks/{chunk-H344ZXRH.mjs → chunk-DN2GVVR4.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GVWLACAT.mjs → chunk-DZ4FQW5K.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-57R74JWC.mjs → chunk-G4YYO5TC.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-F6BJYCF2.mjs → chunk-UPN4NUXU.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GGBATERA.mjs → chunk-XNIH3WIB.mjs} +1 -1
- package/dist/react-native/chunks/{durability-config-3IOXIPYZ.mjs → durability-config-RVTWSXPH.mjs} +6 -3
- package/dist/react-native/chunks/{optional-writes-TXTJ6HUZ.mjs → optional-writes-YZ7WTR7V.mjs} +4 -2
- package/dist/react-native/chunks/{restore-queue-SZLWIL3B.mjs → restore-queue-IGKD6Q2Y.mjs} +4 -4
- package/dist/react-native/chunks/{segment-codec-leaf-WMUZ5P4F.mjs → segment-codec-leaf-JTTGDT3G.mjs} +2 -2
- package/dist/react-native/chunks/{segment-merge-leaf-Q2OEJIQ3.mjs → segment-merge-leaf-D5ZFJRUB.mjs} +3 -3
- package/dist/react-native/chunks/{storage-leaf-OXYV6O6P.mjs → storage-leaf-ZKIM6IF6.mjs} +864 -255
- package/dist/react-native/chunks/{store-leaf-ZMDXYK4E.mjs → store-leaf-PHBOTT5J.mjs} +3 -3
- package/dist/react-native/chunks/{suggestions-leaf-FIMGQZ2T.mjs → suggestions-leaf-R7MIH6Q3.mjs} +3 -3
- package/dist/react-native/chunks/{worker-copies-72TGFYQB.mjs → worker-copies-U35KPVJ7.mjs} +2 -2
- package/dist/react-native/partial-words.mjs +1 -1
- package/dist/react-native/query-suggestions.mjs +1 -1
- package/dist/react-native/sync.mjs +1 -1
- package/dist/react-native/synonyms.mjs +1 -1
- package/dist/react.d.ts +7 -7
- package/dist/{rerank-E2HFKKGJ.mjs → rerank-LYL3D7LU.mjs} +1 -1
- package/dist/{restore-queue-PUVBN6L3.mjs → restore-queue-LF4DTVJC.mjs} +4 -4
- package/dist/{segment-codec-leaf-24Z3MMQI.mjs → segment-codec-leaf-ACALKS2C.mjs} +2 -2
- package/dist/{segment-merge-leaf-FQQDU45E.mjs → segment-merge-leaf-SKMPASFK.mjs} +2 -2
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +16 -16
- package/dist/{storage-leaf-KIA7XO6Y.mjs → storage-leaf-OJ55R4C5.mjs} +588 -158
- package/dist/{store-leaf-ESVLL4JO.mjs → store-leaf-CWHHEDRK.mjs} +3 -3
- package/dist/{suggestions-leaf-FXF4AHAY.mjs → suggestions-leaf-ZTU3ZTWJ.mjs} +5 -5
- package/dist/sync/filesystem.d.ts +2 -2
- package/dist/sync/filesystem.mjs +6 -6
- package/dist/sync/indexeddb.d.ts +2 -2
- package/dist/sync.browser.mjs +1 -1
- package/dist/sync.d.ts +3 -3
- package/dist/sync.mjs +1 -1
- package/dist/synonyms.browser.mjs +1 -1
- package/dist/synonyms.mjs +1 -1
- package/dist/{tasks-CXtQ3Zpp.d.ts → tasks-X2IJQc8J.d.ts} +2 -2
- package/dist/{thread-OWXVP2ZA.mjs → thread-BEGFRULV.mjs} +9 -9
- package/dist/{types-CDN70Y_C.d.ts → types-D0YasjoX.d.ts} +1 -1
- package/dist/{worker-copies-XXX7PF4J.mjs → worker-copies-373P6IYZ.mjs} +4 -4
- package/dist/workers/entry.mjs +7 -7
- package/openapi.json +32 -0
- package/package.json +7 -7
|
@@ -10,12 +10,14 @@ var WAL_ONLY_FIELDS = ["directory", "mode", "flushIntervalMs", "segmentMaxBytes"
|
|
|
10
10
|
function configError(message) {
|
|
11
11
|
return new NarsilError(ErrorCodes.CONFIG_INVALID, message);
|
|
12
12
|
}
|
|
13
|
-
function requireKnob(name, value, minimum) {
|
|
13
|
+
function requireKnob(name, value, minimum, whole = false) {
|
|
14
14
|
if (value === void 0) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value < minimum) {
|
|
18
|
-
throw configError(
|
|
17
|
+
if (typeof value !== "number" || !(whole ? Number.isSafeInteger(value) : Number.isFinite(value)) || value < minimum) {
|
|
18
|
+
throw configError(
|
|
19
|
+
`durability.${name} must be ${whole ? "an integer" : "a finite number"} of at least ${minimum}, got ${String(value)}`
|
|
20
|
+
);
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
function requireValidDurabilityConfig(durability) {
|
|
@@ -35,6 +37,7 @@ function requireValidDurabilityConfig(durability) {
|
|
|
35
37
|
);
|
|
36
38
|
}
|
|
37
39
|
requireKnob("compactionThreshold", durability.compactionThreshold, 1);
|
|
40
|
+
requireKnob("rewriteBytesPerCheckpoint", durability.rewriteBytesPerCheckpoint, 1, true);
|
|
38
41
|
if (durability.tier === "snapshot") {
|
|
39
42
|
for (const field of WAL_ONLY_FIELDS) {
|
|
40
43
|
if (durability[field] !== void 0) {
|
|
@@ -1131,6 +1131,129 @@ declare class NarsilError extends Error {
|
|
|
1131
1131
|
*/
|
|
1132
1132
|
declare function isNarsilError(value: unknown): value is NarsilError;
|
|
1133
1133
|
|
|
1134
|
+
/**
|
|
1135
|
+
* What {@link Narsil.getStats} returns about one index.
|
|
1136
|
+
*
|
|
1137
|
+
* @public
|
|
1138
|
+
*/
|
|
1139
|
+
interface IndexStats {
|
|
1140
|
+
/** The index holds this many documents. A closed index reports its count as of the last checkpoint. */
|
|
1141
|
+
documentCount: number;
|
|
1142
|
+
/** The index is spread across this many partitions. */
|
|
1143
|
+
partitionCount: number;
|
|
1144
|
+
/**
|
|
1145
|
+
* Formula-based estimate of the index's main-thread memory footprint, summed
|
|
1146
|
+
* across every partition and vector index for this index. Computed from
|
|
1147
|
+
* structural counters (document count, posting counts, field-index sizes),
|
|
1148
|
+
* not measured. Per-object V8 overhead (hidden classes, map transitions,
|
|
1149
|
+
* GC headers) is not captured here, so this number routinely undershoots
|
|
1150
|
+
* the real heap by a meaningful factor. Use {@link Narsil.getMemoryStats}
|
|
1151
|
+
* when sizing host memory.
|
|
1152
|
+
*/
|
|
1153
|
+
estimatedMemoryBytes: number;
|
|
1154
|
+
/**
|
|
1155
|
+
* The files that the index's current checkpoint lists hold this many bytes:
|
|
1156
|
+
* the segment files of every partition, the vector files, and the graph
|
|
1157
|
+
* parts. The figure changes only when a checkpoint commits, so an unchanged
|
|
1158
|
+
* index reports the same size before and after a restart. A closed index
|
|
1159
|
+
* reports the size that its last checkpoint recorded, and an index that
|
|
1160
|
+
* saves nothing reports no figure. In a cluster, the figure covers the copy
|
|
1161
|
+
* of each partition that the stats call read.
|
|
1162
|
+
*/
|
|
1163
|
+
savedBytes?: number;
|
|
1164
|
+
/**
|
|
1165
|
+
* The index's write-ahead log and the history that it keeps for device sync
|
|
1166
|
+
* hold this many bytes. The figure grows with every write, and it falls when
|
|
1167
|
+
* the engine deletes log or history files. A closed index reports no figure,
|
|
1168
|
+
* and neither does an index that saves nothing.
|
|
1169
|
+
*/
|
|
1170
|
+
logBytes?: number;
|
|
1171
|
+
/**
|
|
1172
|
+
* A cluster adds up {@link IndexStats.savedBytes} over every copy of every
|
|
1173
|
+
* partition, which shows the disk space that the index takes across all of
|
|
1174
|
+
* its nodes. The figure is absent outside a cluster, and it is absent
|
|
1175
|
+
* whenever a copy fails to answer or reports no saved size.
|
|
1176
|
+
*/
|
|
1177
|
+
savedBytesOfEveryCopy?: number;
|
|
1178
|
+
/**
|
|
1179
|
+
* A cluster adds up {@link IndexStats.logBytes} over every copy of every
|
|
1180
|
+
* partition. The figure is absent outside a cluster, and it is absent
|
|
1181
|
+
* whenever a copy fails to answer or reports no log size.
|
|
1182
|
+
*/
|
|
1183
|
+
logBytesOfEveryCopy?: number;
|
|
1184
|
+
/** The index analyses text with this language module. */
|
|
1185
|
+
language: string;
|
|
1186
|
+
/** The index was created with this field layout. */
|
|
1187
|
+
schema: SchemaDefinition;
|
|
1188
|
+
/**
|
|
1189
|
+
* This many searches on this instance's main copy hold a state of the index
|
|
1190
|
+
* open right now. Each search holds one state from its start until it
|
|
1191
|
+
* answers, fails, or is cancelled, so the figure falls back to 0 once every
|
|
1192
|
+
* search has finished. A cluster reports no figure.
|
|
1193
|
+
*/
|
|
1194
|
+
heldSearchStates?: number;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* A summary of one index, as {@link Narsil.listIndexes} reports it.
|
|
1198
|
+
*
|
|
1199
|
+
* @public
|
|
1200
|
+
*/
|
|
1201
|
+
interface IndexInfo {
|
|
1202
|
+
/** The index was created under this name. */
|
|
1203
|
+
name: string;
|
|
1204
|
+
/** The index holds this many documents. A closed index reports its count as of the last checkpoint. */
|
|
1205
|
+
documentCount: number;
|
|
1206
|
+
/** The index is spread across this many partitions. */
|
|
1207
|
+
partitionCount: number;
|
|
1208
|
+
/** The index analyses text with this language module. */
|
|
1209
|
+
language: string;
|
|
1210
|
+
/** This turns true when the index's terms came from an older analysis than its language module produces now. */
|
|
1211
|
+
analysisStale?: boolean;
|
|
1212
|
+
/** This is `open` in memory, `closed` after release, and `reopen-failed` after five recovery failures. */
|
|
1213
|
+
state: 'open' | 'closed' | 'reopen-failed';
|
|
1214
|
+
/** This counts successful loads since this engine started. */
|
|
1215
|
+
reopenCount: number;
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* What {@link Narsil.getPartitionStats} reports for one partition, which is
|
|
1219
|
+
* where you look when an index grows unevenly.
|
|
1220
|
+
*
|
|
1221
|
+
* @public
|
|
1222
|
+
*/
|
|
1223
|
+
interface PartitionStatsResult {
|
|
1224
|
+
/** This identifies the partition within its index. */
|
|
1225
|
+
partitionId: number;
|
|
1226
|
+
/** The partition holds this many documents. */
|
|
1227
|
+
documentCount: number;
|
|
1228
|
+
/**
|
|
1229
|
+
* Formula-based estimate of this partition's memory footprint. V8 has no
|
|
1230
|
+
* per-object heap accounting API, so this number is derived from structural
|
|
1231
|
+
* counters (document count, posting counts, field-index sizes) and does not
|
|
1232
|
+
* include per-object overhead. Treat as an estimate, not a measurement.
|
|
1233
|
+
*/
|
|
1234
|
+
estimatedMemoryBytes: number;
|
|
1235
|
+
/**
|
|
1236
|
+
* The segment files that the index's current checkpoint lists for this
|
|
1237
|
+
* partition hold this many bytes. The vector files and graph parts belong to
|
|
1238
|
+
* the whole index, so only {@link IndexStats.savedBytes} counts them.
|
|
1239
|
+
*/
|
|
1240
|
+
savedBytes?: number;
|
|
1241
|
+
/** This partition's write-ahead log files and device-sync history files hold this many bytes. */
|
|
1242
|
+
logBytes?: number;
|
|
1243
|
+
/**
|
|
1244
|
+
* A cluster adds up {@link PartitionStatsResult.savedBytes} over every copy
|
|
1245
|
+
* of this partition. The figure is absent outside a cluster, and it is
|
|
1246
|
+
* absent whenever a copy fails to answer or reports no saved size.
|
|
1247
|
+
*/
|
|
1248
|
+
savedBytesOfEveryCopy?: number;
|
|
1249
|
+
/**
|
|
1250
|
+
* A cluster adds up {@link PartitionStatsResult.logBytes} over every copy of
|
|
1251
|
+
* this partition. The figure is absent outside a cluster, and it is absent
|
|
1252
|
+
* whenever a copy fails to answer or reports no log size.
|
|
1253
|
+
*/
|
|
1254
|
+
logBytesOfEveryCopy?: number;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1134
1257
|
/**
|
|
1135
1258
|
* What {@link Narsil.query} returns: the ranked hits and everything the query
|
|
1136
1259
|
* asked for alongside them.
|
|
@@ -1350,78 +1473,6 @@ interface DocumentImportResult {
|
|
|
1350
1473
|
message: string;
|
|
1351
1474
|
}>;
|
|
1352
1475
|
}
|
|
1353
|
-
/**
|
|
1354
|
-
* What {@link Narsil.getStats} returns about one index.
|
|
1355
|
-
*
|
|
1356
|
-
* @public
|
|
1357
|
-
*/
|
|
1358
|
-
interface IndexStats {
|
|
1359
|
-
/** The index holds this many documents. A closed index reports its count as of the last checkpoint. */
|
|
1360
|
-
documentCount: number;
|
|
1361
|
-
/** The index is spread across this many partitions. */
|
|
1362
|
-
partitionCount: number;
|
|
1363
|
-
/**
|
|
1364
|
-
* Formula-based estimate of the index's main-thread memory footprint, summed
|
|
1365
|
-
* across every partition and vector index for this index. Computed from
|
|
1366
|
-
* structural counters (document count, posting counts, field-index sizes),
|
|
1367
|
-
* not measured. Per-object V8 overhead (hidden classes, map transitions,
|
|
1368
|
-
* GC headers) is not captured here, so this number routinely undershoots
|
|
1369
|
-
* the real heap by a meaningful factor. Use {@link Narsil.getMemoryStats}
|
|
1370
|
-
* when sizing host memory.
|
|
1371
|
-
*/
|
|
1372
|
-
estimatedMemoryBytes: number;
|
|
1373
|
-
/** The index analyses text with this language module. */
|
|
1374
|
-
language: string;
|
|
1375
|
-
/** The index was created with this field layout. */
|
|
1376
|
-
schema: SchemaDefinition;
|
|
1377
|
-
/**
|
|
1378
|
-
* This many searches on this instance's main copy hold a state of the index
|
|
1379
|
-
* open right now. Each search holds one state from its start until it
|
|
1380
|
-
* answers, fails, or is cancelled, so the figure falls back to 0 once every
|
|
1381
|
-
* search has finished. A cluster reports no figure.
|
|
1382
|
-
*/
|
|
1383
|
-
heldSearchStates?: number;
|
|
1384
|
-
}
|
|
1385
|
-
/**
|
|
1386
|
-
* A summary of one index, as {@link Narsil.listIndexes} reports it.
|
|
1387
|
-
*
|
|
1388
|
-
* @public
|
|
1389
|
-
*/
|
|
1390
|
-
interface IndexInfo {
|
|
1391
|
-
/** The index was created under this name. */
|
|
1392
|
-
name: string;
|
|
1393
|
-
/** The index holds this many documents. A closed index reports its count as of the last checkpoint. */
|
|
1394
|
-
documentCount: number;
|
|
1395
|
-
/** The index is spread across this many partitions. */
|
|
1396
|
-
partitionCount: number;
|
|
1397
|
-
/** The index analyses text with this language module. */
|
|
1398
|
-
language: string;
|
|
1399
|
-
/** This turns true when the index's terms came from an older analysis than its language module produces now. */
|
|
1400
|
-
analysisStale?: boolean;
|
|
1401
|
-
/** This is `open` in memory, `closed` after release, and `reopen-failed` after five recovery failures. */
|
|
1402
|
-
state: 'open' | 'closed' | 'reopen-failed';
|
|
1403
|
-
/** This counts successful loads since this engine started. */
|
|
1404
|
-
reopenCount: number;
|
|
1405
|
-
}
|
|
1406
|
-
/**
|
|
1407
|
-
* What {@link Narsil.getPartitionStats} reports for one partition, which is
|
|
1408
|
-
* where you look when an index grows unevenly.
|
|
1409
|
-
*
|
|
1410
|
-
* @public
|
|
1411
|
-
*/
|
|
1412
|
-
interface PartitionStatsResult {
|
|
1413
|
-
/** This identifies the partition within its index. */
|
|
1414
|
-
partitionId: number;
|
|
1415
|
-
/** The partition holds this many documents. */
|
|
1416
|
-
documentCount: number;
|
|
1417
|
-
/**
|
|
1418
|
-
* Formula-based estimate of this partition's memory footprint. V8 has no
|
|
1419
|
-
* per-object heap accounting API, so this number is derived from structural
|
|
1420
|
-
* counters (document count, posting counts, field-index sizes) and does not
|
|
1421
|
-
* include per-object overhead. Treat as an estimate, not a measurement.
|
|
1422
|
-
*/
|
|
1423
|
-
estimatedMemoryBytes: number;
|
|
1424
|
-
}
|
|
1425
1476
|
/**
|
|
1426
1477
|
* What {@link Narsil.suggest} returns: the indexed terms that complete a
|
|
1427
1478
|
* prefix, ready to offer as you-type suggestions.
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-
|
|
1
|
+
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-ZZUXMJIK.mjs';
|
|
2
2
|
import './browser/chunk-4ZICWS4V.mjs';
|
|
3
3
|
import './browser/chunk-YJHGOJAC.mjs';
|
|
4
4
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-2Q45HI5H.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { S as SynonymSearch } from './synonyms-CpOAHPa-.js';
|
|
|
6
6
|
export { O as OneWaySynonymRule, a as SynonymRule, T as TwoWaySynonymRule } from './synonyms-CpOAHPa-.js';
|
|
7
7
|
import { L as LanguageModule } from './language-DB8KG1z5.js';
|
|
8
8
|
export { T as TokenizerConfig } from './language-DB8KG1z5.js';
|
|
9
|
-
import { h as Narsil } from './engine-
|
|
10
|
-
export { s as AdapterRegistrationOperations, A as AnalysisChange, t as AnalysisOperations, u as ArrayFilter, v as BM25Operations, B as BatchResult, w as ByteSource, C as ClientErrorCode, a as ClientErrorCodes, x as ComparisonFilter, D as DocumentImportResult, y as DocumentProjection, z as DocumentWriteOperations, E as ErrorCode, b as ErrorCodes, F as FacetConfig, J as FacetResult, K as FieldFilter, O as FilterExpression, R as GeoFilter, T as GeoPolygonFilter, U as GeoRadiusFilter, r as GroupConfig, W as GroupReducer, G as GroupResult, X as HeldCheckpointReport, Y as HighlightConfig, Z as HighlightMatch, H as Hit, _ as HybridConfig, I as IndexInfo, $ as IndexLifecycleOperations, p as IndexStats, L as ListParams, l as ListResult, a0 as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, k as NarsilEventHandlers, q as NarsilEventMap, P as PartitionStatsResult, o as PreflightResult, a1 as PresenceFilter, a2 as ProcessMemoryReport, a3 as QueryCoverage, Q as QueryParams, j as QueryResult, a4 as RerankConfig, a5 as ScoreComponents, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, e as SnapshotOptions, a7 as SortField, a8 as SortSpec, a9 as StringFilter, m as SuggestParams, n as SuggestResult, aa as SyncOperations, f as SyncSetting, g as SyncStatus, ab as SynonymOperations, ac as TermMatchPolicy, ad as VectorMaintenanceOperations, V as VectorMaintenanceResult, ae as VectorQueryConfig, af as WorkerCopyReport, i as isNarsilError } from './engine-
|
|
11
|
-
import { N as NarsilConfig } from './config-
|
|
12
|
-
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as MemoryConfig, d as NarsilPlugin, P as PartitionContext, Q as QuerySuggestionsConfig, R as RemoveContext, S as SearchContext, e as StaleAnalysis, U as UpdateContext, W as WorkerConfig, f as WorkerContext } from './config-
|
|
9
|
+
import { h as Narsil } from './engine-De6JzTW8.js';
|
|
10
|
+
export { s as AdapterRegistrationOperations, A as AnalysisChange, t as AnalysisOperations, u as ArrayFilter, v as BM25Operations, B as BatchResult, w as ByteSource, C as ClientErrorCode, a as ClientErrorCodes, x as ComparisonFilter, D as DocumentImportResult, y as DocumentProjection, z as DocumentWriteOperations, E as ErrorCode, b as ErrorCodes, F as FacetConfig, J as FacetResult, K as FieldFilter, O as FilterExpression, R as GeoFilter, T as GeoPolygonFilter, U as GeoRadiusFilter, r as GroupConfig, W as GroupReducer, G as GroupResult, X as HeldCheckpointReport, Y as HighlightConfig, Z as HighlightMatch, H as Hit, _ as HybridConfig, I as IndexInfo, $ as IndexLifecycleOperations, p as IndexStats, L as ListParams, l as ListResult, a0 as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, k as NarsilEventHandlers, q as NarsilEventMap, P as PartitionStatsResult, o as PreflightResult, a1 as PresenceFilter, a2 as ProcessMemoryReport, a3 as QueryCoverage, Q as QueryParams, j as QueryResult, a4 as RerankConfig, a5 as ScoreComponents, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, e as SnapshotOptions, a7 as SortField, a8 as SortSpec, a9 as StringFilter, m as SuggestParams, n as SuggestResult, aa as SyncOperations, f as SyncSetting, g as SyncStatus, ab as SynonymOperations, ac as TermMatchPolicy, ad as VectorMaintenanceOperations, V as VectorMaintenanceResult, ae as VectorQueryConfig, af as WorkerCopyReport, i as isNarsilError } from './engine-De6JzTW8.js';
|
|
11
|
+
import { N as NarsilConfig } from './config-C687-reW.js';
|
|
12
|
+
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as MemoryConfig, d as NarsilPlugin, P as PartitionContext, Q as QuerySuggestionsConfig, R as RemoveContext, S as SearchContext, e as StaleAnalysis, U as UpdateContext, W as WorkerConfig, f as WorkerContext } from './config-C687-reW.js';
|
|
13
13
|
import { N as NativeStoredValues } from './stored-values-BWIMpiT_.js';
|
|
14
14
|
export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
|
|
15
15
|
export { h as QuerySuggestionsBuildEvent, j as QuerySuggestionsWarningEvent } from './query-suggestions-CBYkrQ5T.js';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './chunk-
|
|
1
|
+
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './chunk-CWXR7OP4.mjs';
|
|
2
2
|
import './chunk-KLVMK3R5.mjs';
|
|
3
3
|
import './chunk-LPRRFCVU.mjs';
|
|
4
4
|
import './chunk-GXCDWLQI.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './react-native/chunks/chunk-
|
|
1
|
+
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './react-native/chunks/chunk-6A5XE2MA.mjs';
|
|
2
2
|
import './react-native/chunks/chunk-J2BQTJJE.mjs';
|
|
3
3
|
import './react-native/chunks/chunk-I7DTUOK2.mjs';
|
|
4
4
|
import './react-native/chunks/chunk-SK3DPAI4.mjs';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-
|
|
2
|
-
import { answerRequest } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-V7F5DOSC.mjs';
|
|
2
|
+
import { answerRequest } from './chunk-C3EINJNJ.mjs';
|
|
3
|
+
import './chunk-FIXUVFUC.mjs';
|
|
4
4
|
import './chunk-FETZYCH7.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
5
|
+
import './chunk-GGG5R4CU.mjs';
|
|
6
|
+
import './chunk-NPXORGMK.mjs';
|
|
7
|
+
import './chunk-PK3BGGHO.mjs';
|
|
8
8
|
import './chunk-CV3Q2EKO.mjs';
|
|
9
9
|
import './chunk-LNGE7SLY.mjs';
|
|
10
10
|
import './chunk-I2WJCRIH.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import './chunk-YWSIRKKQ.mjs';
|
|
12
|
+
import './chunk-OQANB7SJ.mjs';
|
|
13
13
|
import './chunk-TNEU32EN.mjs';
|
|
14
14
|
import './chunk-V6EUBAIT.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
15
|
+
import './chunk-C77OBNPP.mjs';
|
|
16
|
+
import './chunk-CWXR7OP4.mjs';
|
|
17
17
|
import './chunk-KLVMK3R5.mjs';
|
|
18
18
|
import './chunk-LPRRFCVU.mjs';
|
|
19
19
|
import './chunk-GXCDWLQI.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { applyStoredIndexBm25, updateIndexBm25 } from './chunk-
|
|
2
|
-
import { readHeapStatistics, loadSchemaCodeFor, loadStorageCode, lookupOfStoredSynonyms, reconstructSchemaFromMetadata, getLanguage, validatePatternValueLimit, requireSurfaceFormsForPartialFields, prepareStoredSynonyms, getVectorFieldPaths, arrayPositionsAreStale, validatePartitionConfig, validateEmbeddingConfig } from './chunk-
|
|
3
|
-
export { bindOptionalWritesHost, holdVectorsForRollback, insertDocument, insertDocumentBatch, removeDocument, removeDocumentBatch, rollbackInsertedDocument, rollbackRemovedDocument, rollbackUpdatedDocument, updateDocument, updateDocumentBatch } from './chunk-
|
|
1
|
+
export { applyStoredIndexBm25, updateIndexBm25 } from './chunk-632ABEIR.mjs';
|
|
2
|
+
import { readHeapStatistics, loadSchemaCodeFor, loadStorageCode, lookupOfStoredSynonyms, reconstructSchemaFromMetadata, getLanguage, validatePatternValueLimit, requireSurfaceFormsForPartialFields, prepareStoredSynonyms, getVectorFieldPaths, arrayPositionsAreStale, validatePartitionConfig, validateEmbeddingConfig } from './chunk-CWXR7OP4.mjs';
|
|
3
|
+
export { bindOptionalWritesHost, holdVectorsForRollback, insertDocument, insertDocumentBatch, removeDocument, removeDocumentBatch, rollbackInsertedDocument, rollbackRemovedDocument, rollbackUpdatedDocument, updateDocument, updateDocumentBatch } from './chunk-CWXR7OP4.mjs';
|
|
4
4
|
import './chunk-KLVMK3R5.mjs';
|
|
5
5
|
import './chunk-LPRRFCVU.mjs';
|
|
6
6
|
import './chunk-GXCDWLQI.mjs';
|
|
@@ -159,6 +159,7 @@ async function createIndexFromMetadata(deps, metadata, loadData) {
|
|
|
159
159
|
throw recoveryFailure(metadata, err);
|
|
160
160
|
}
|
|
161
161
|
deps.indexRegistry.set(metadata.indexName, {
|
|
162
|
+
storedSizes: deps.indexRegistry.get(metadata.indexName)?.storedSizes,
|
|
162
163
|
config: indexConfig,
|
|
163
164
|
language,
|
|
164
165
|
embeddingAdapter: embedding.adapter,
|
|
@@ -167,6 +168,7 @@ async function createIndexFromMetadata(deps, metadata, loadData) {
|
|
|
167
168
|
indexUuid: metadata.indexUuid ?? null,
|
|
168
169
|
heldPartitions: metadata.heldPartitions ?? null,
|
|
169
170
|
documentCount: metadata.documentCount ?? 0,
|
|
171
|
+
savedBytes: metadata.savedBytes,
|
|
170
172
|
partitionCount,
|
|
171
173
|
analysisRevision: metadata.analysisRevision ?? null,
|
|
172
174
|
arrayPositionGap: metadata.arrayPositionGap ?? null,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { resolvePartitionId } from './chunk-
|
|
2
|
-
import { readVectorFile, VECTOR_FILE_ENVELOPE_VERSION } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { resolvePartitionId } from './chunk-EGWBZSHK.mjs';
|
|
2
|
+
import { readVectorFile, VECTOR_FILE_ENVELOPE_VERSION } from './chunk-CKS4QQEC.mjs';
|
|
3
|
+
import './chunk-F2UOTRY7.mjs';
|
|
4
4
|
import './chunk-X4UMDSB4.mjs';
|
|
5
|
-
import { encodeSegmentManifest, loadFailed, directoryCheckpointStore, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-
|
|
5
|
+
import { encodeSegmentManifest, loadFailed, directoryCheckpointStore, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-TTTBE4TB.mjs';
|
|
6
6
|
import { PARTITION_COPY_VECTOR_RUN_BYTES } from './chunk-JDDXV6UF.mjs';
|
|
7
|
-
import { segmentsPrefix, vectorFileKey } from './chunk-
|
|
7
|
+
import { segmentsPrefix, vectorFileKey } from './chunk-PK3BGGHO.mjs';
|
|
8
8
|
import './chunk-CV3Q2EKO.mjs';
|
|
9
9
|
import './chunk-LNGE7SLY.mjs';
|
|
10
10
|
import './chunk-I2WJCRIH.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import './chunk-YWSIRKKQ.mjs';
|
|
12
|
+
import './chunk-OQANB7SJ.mjs';
|
|
13
13
|
import { vectorsPerFile, isDead, VECTOR_FILE_PAYLOAD_VERSION } from './chunk-TNEU32EN.mjs';
|
|
14
14
|
import './chunk-V6EUBAIT.mjs';
|
|
15
|
-
import { HEADER_SIZE, crc32Init, crc32Final, engineVersionParts, writeHeader, RESERVED_SIZE, crc32Update } from './chunk-
|
|
16
|
-
import { generateId, isCompositePartition } from './chunk-
|
|
15
|
+
import { HEADER_SIZE, crc32Init, crc32Final, engineVersionParts, writeHeader, RESERVED_SIZE, crc32Update } from './chunk-C77OBNPP.mjs';
|
|
16
|
+
import { generateId, isCompositePartition } from './chunk-CWXR7OP4.mjs';
|
|
17
17
|
import './chunk-KLVMK3R5.mjs';
|
|
18
18
|
import './chunk-LPRRFCVU.mjs';
|
|
19
19
|
import { decode } from './chunk-GXCDWLQI.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { spellingCountsOf, encodePartialSpellings, countSpelling, SurfaceTable, SURFACE_TABLE_START_CAPACITY, StringPlan, SegmentRefusal, reserveStrings, grownCapacity, PARTIAL_WORD_RUN_CODE_POINTS, encodeStringBlob, sameFields, countDocumentSpellings, tokenize, PARTIAL_WORD_MIN_CODE_POINTS, PARTIAL_WORDS_ADDED_PER_QUERY, GROWING_PARTIAL_ENTRY_BYTES, GROWING_PARTIAL_RUN_BYTES, GROWING_PARTIAL_RUN_MEMBER_BYTES, GROWING_PARTIAL_PENDING_ENTRY_BYTES, RUN_TABLE_START_CAPACITY, TERM_REGION_GROWTH_FACTOR, RUN_MEMBER_START_CAPACITY, SLICE_CAPACITIES, TERM_SLOT_LOAD_DENOMINATOR, TERM_SLOT_LOAD_NUMERATOR, PoolPlan, requireRoom, releaseRange, requireSegment, termText, partitionDocumentFrequency, visitDocumentSpellings, visitDocumentSurfaceSpellings, DEFAULT_FUZZY_PREFIX_LENGTH, resolveStopWords, transformToken, expansionSource, liveFrequency, codePointCountOf, GROWING_PARTIAL_PENDING_ENTRIES_PER_ENTRY, FNV_OFFSET_BASIS, typedRegion, regionsOverlap, mergeText, FNV_PRIME } from './browser/chunk-
|
|
1
|
+
import { spellingCountsOf, encodePartialSpellings, countSpelling, SurfaceTable, SURFACE_TABLE_START_CAPACITY, StringPlan, SegmentRefusal, reserveStrings, grownCapacity, PARTIAL_WORD_RUN_CODE_POINTS, encodeStringBlob, sameFields, countDocumentSpellings, tokenize, PARTIAL_WORD_MIN_CODE_POINTS, PARTIAL_WORDS_ADDED_PER_QUERY, GROWING_PARTIAL_ENTRY_BYTES, GROWING_PARTIAL_RUN_BYTES, GROWING_PARTIAL_RUN_MEMBER_BYTES, GROWING_PARTIAL_PENDING_ENTRY_BYTES, RUN_TABLE_START_CAPACITY, TERM_REGION_GROWTH_FACTOR, RUN_MEMBER_START_CAPACITY, SLICE_CAPACITIES, TERM_SLOT_LOAD_DENOMINATOR, TERM_SLOT_LOAD_NUMERATOR, PoolPlan, requireRoom, releaseRange, requireSegment, termText, partitionDocumentFrequency, visitDocumentSpellings, visitDocumentSurfaceSpellings, DEFAULT_FUZZY_PREFIX_LENGTH, resolveStopWords, transformToken, expansionSource, liveFrequency, codePointCountOf, GROWING_PARTIAL_PENDING_ENTRIES_PER_ENTRY, FNV_OFFSET_BASIS, typedRegion, regionsOverlap, mergeText, FNV_PRIME } from './browser/chunk-ZZUXMJIK.mjs';
|
|
2
2
|
import { fuzzyTermMatches, storedText } from './browser/chunk-4ZICWS4V.mjs';
|
|
3
3
|
import './browser/chunk-YJHGOJAC.mjs';
|
|
4
4
|
import { compareCodePoints, codePointCount, NarsilError, ErrorCodes } from './browser/chunk-2Q45HI5H.mjs';
|
package/dist/partial-words.mjs
CHANGED
|
@@ -183,6 +183,8 @@ interface IndexMetadata {
|
|
|
183
183
|
indexName: string;
|
|
184
184
|
/** Number of documents represented by the last completed checkpoint. */
|
|
185
185
|
documentCount?: number;
|
|
186
|
+
/** The saved size of the last completed checkpoint. */
|
|
187
|
+
savedBytes?: number;
|
|
186
188
|
/** The identity a cluster gave the index at creation; absent on a single engine. */
|
|
187
189
|
indexUuid?: string;
|
|
188
190
|
/** The partitions this copy holds, which a cluster node answers a partition-stores request from. */
|
|
@@ -268,6 +270,11 @@ interface CapturedWholePartition {
|
|
|
268
270
|
segments: CapturedSegment[];
|
|
269
271
|
}
|
|
270
272
|
|
|
273
|
+
interface PartitionDocumentCount {
|
|
274
|
+
partitionId: number;
|
|
275
|
+
documentCount: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
271
278
|
interface PriorCheckpoint {
|
|
272
279
|
checkpoint: PartitionCheckpoint[];
|
|
273
280
|
partitions: PartitionManifestEntry[];
|
|
@@ -285,6 +292,8 @@ interface CheckpointWorkerRequest {
|
|
|
285
292
|
prior: PriorCheckpoint | null;
|
|
286
293
|
capturedPartitions?: CapturedWholePartition[];
|
|
287
294
|
keepsWriteRecords?: boolean;
|
|
295
|
+
liveDocuments?: PartitionDocumentCount[];
|
|
296
|
+
rewriteBytesPerCheckpoint?: number;
|
|
288
297
|
}
|
|
289
298
|
interface CheckpointWorkerSuccess {
|
|
290
299
|
type: 'success';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { createDurableDirectory } from '../../chunk-
|
|
2
|
-
import { writeCheckpointSegments } from '../../chunk-
|
|
3
|
-
import { directoryCheckpointStore } from '../../chunk-
|
|
1
|
+
import { createDurableDirectory } from '../../chunk-6ICOWB6I.mjs';
|
|
2
|
+
import { writeCheckpointSegments } from '../../chunk-3OEXOSWI.mjs';
|
|
3
|
+
import { directoryCheckpointStore } from '../../chunk-TTTBE4TB.mjs';
|
|
4
4
|
import '../../chunk-5FLRXF73.mjs';
|
|
5
5
|
import '../../chunk-JDDXV6UF.mjs';
|
|
6
|
-
import '../../chunk-
|
|
6
|
+
import '../../chunk-PK3BGGHO.mjs';
|
|
7
7
|
import '../../chunk-HLPRHOSO.mjs';
|
|
8
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS } from '../../chunk-
|
|
8
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS } from '../../chunk-MSIN4NM3.mjs';
|
|
9
9
|
import '../../chunk-CV3Q2EKO.mjs';
|
|
10
10
|
import '../../chunk-LNGE7SLY.mjs';
|
|
11
11
|
import '../../chunk-I2WJCRIH.mjs';
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-YWSIRKKQ.mjs';
|
|
13
|
+
import '../../chunk-OQANB7SJ.mjs';
|
|
14
14
|
import '../../chunk-TNEU32EN.mjs';
|
|
15
15
|
import '../../chunk-V6EUBAIT.mjs';
|
|
16
|
-
import '../../chunk-
|
|
17
|
-
import { importOptionalReads, loadGeoCodeFor } from '../../chunk-
|
|
16
|
+
import '../../chunk-C77OBNPP.mjs';
|
|
17
|
+
import { importOptionalReads, loadGeoCodeFor } from '../../chunk-CWXR7OP4.mjs';
|
|
18
18
|
import '../../chunk-KLVMK3R5.mjs';
|
|
19
19
|
import '../../chunk-LPRRFCVU.mjs';
|
|
20
20
|
import '../../chunk-GXCDWLQI.mjs';
|
|
@@ -32,7 +32,7 @@ import '../../chunk-Q3ZZH5Z7.mjs';
|
|
|
32
32
|
import '../../chunk-TGPKS2UM.mjs';
|
|
33
33
|
|
|
34
34
|
// src/persistence/durability/rebuild.ts
|
|
35
|
-
async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = [], keepsWriteRecords = false) {
|
|
35
|
+
async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = [], keepsWriteRecords = false, liveDocuments, rewriteBytesPerCheckpoint) {
|
|
36
36
|
const directory = createDurableDirectory(root);
|
|
37
37
|
return writeCheckpointSegments({
|
|
38
38
|
store: directoryCheckpointStore(directory),
|
|
@@ -42,7 +42,9 @@ async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThr
|
|
|
42
42
|
compactionThreshold,
|
|
43
43
|
prior,
|
|
44
44
|
capturedPartitions,
|
|
45
|
-
keepsWriteRecords
|
|
45
|
+
keepsWriteRecords,
|
|
46
|
+
...liveDocuments === void 0 ? {} : { liveDocuments },
|
|
47
|
+
...rewriteBytesPerCheckpoint === void 0 ? {} : { rewriteBytesPerCheckpoint }
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
|
|
@@ -64,6 +66,13 @@ async function handleRequest(raw) {
|
|
|
64
66
|
if (request.capturedPartitions !== void 0 && !Array.isArray(request.capturedPartitions)) {
|
|
65
67
|
throw new Error("Checkpoint request names captured partitions in a shape the worker cannot read");
|
|
66
68
|
}
|
|
69
|
+
if (request.liveDocuments !== void 0 && !Array.isArray(request.liveDocuments)) {
|
|
70
|
+
throw new Error("Checkpoint request gives partition document counts in a shape the worker cannot read");
|
|
71
|
+
}
|
|
72
|
+
const rewriteBytes = request.rewriteBytesPerCheckpoint;
|
|
73
|
+
if (rewriteBytes !== void 0 && (!Number.isSafeInteger(rewriteBytes) || rewriteBytes < 1)) {
|
|
74
|
+
throw new Error("Checkpoint request has an invalid rewrite budget");
|
|
75
|
+
}
|
|
67
76
|
const loadingGeoCode = loadGeoCodeFor(request.metadata.schema);
|
|
68
77
|
if (loadingGeoCode !== null) await loadingGeoCode;
|
|
69
78
|
const segments = await rebuildSegmentsFromDurable(
|
|
@@ -73,7 +82,9 @@ async function handleRequest(raw) {
|
|
|
73
82
|
request.compactionThreshold,
|
|
74
83
|
request.prior ?? null,
|
|
75
84
|
request.capturedPartitions,
|
|
76
|
-
request.keepsWriteRecords === true
|
|
85
|
+
request.keepsWriteRecords === true,
|
|
86
|
+
request.liveDocuments,
|
|
87
|
+
rewriteBytes
|
|
77
88
|
);
|
|
78
89
|
return { type: "success", segments };
|
|
79
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadPhraseCodeFor, loadCursorPageFor, loadGroupingFor, loadPinningFor, loadFacetMergesFor, loadSortingFor, loadPrefixFor, joinPatternWorkMeter, fanOutQuery, sanitizeGlobalStats, countsWithoutScores, fanOutMatchCount, documentsOf, rankPage, fillHits } from './chunk-
|
|
1
|
+
import { loadPhraseCodeFor, loadCursorPageFor, loadGroupingFor, loadPinningFor, loadFacetMergesFor, loadSortingFor, loadPrefixFor, joinPatternWorkMeter, fanOutQuery, sanitizeGlobalStats, countsWithoutScores, fanOutMatchCount, documentsOf, rankPage, fillHits } from './chunk-CWXR7OP4.mjs';
|
|
2
2
|
import './chunk-KLVMK3R5.mjs';
|
|
3
3
|
import './chunk-LPRRFCVU.mjs';
|
|
4
4
|
import './chunk-GXCDWLQI.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Merger } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { Merger } from '../chunk-JVR5KMO4.mjs';
|
|
2
|
+
import '../chunk-MCAJOLVK.mjs';
|
|
3
3
|
import '../chunk-V6EUBAIT.mjs';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-C77OBNPP.mjs';
|
|
5
|
+
import '../chunk-CWXR7OP4.mjs';
|
|
6
6
|
import '../chunk-KLVMK3R5.mjs';
|
|
7
7
|
import '../chunk-LPRRFCVU.mjs';
|
|
8
8
|
import '../chunk-GXCDWLQI.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { engineCoreOf, loadSuggestionsCode, GROUP_PATTERN_SOURCE, GROUP_FORMAT, SUGGESTIONS_INDEX_INFIX } from './browser/chunk-
|
|
1
|
+
import { engineCoreOf, loadSuggestionsCode, GROUP_PATTERN_SOURCE, GROUP_FORMAT, SUGGESTIONS_INDEX_INFIX } from './browser/chunk-ZZUXMJIK.mjs';
|
|
2
2
|
import './browser/chunk-4ZICWS4V.mjs';
|
|
3
3
|
import './browser/chunk-YJHGOJAC.mjs';
|
|
4
4
|
import { NarsilError, ErrorCodes } from './browser/chunk-2Q45HI5H.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as Narsil } from './engine-
|
|
1
|
+
import { h as Narsil } from './engine-De6JzTW8.js';
|
|
2
2
|
import { g as QuerySuggestions } from './query-suggestions-CBYkrQ5T.js';
|
|
3
3
|
export { M as ManualQuerySuggestion, Q as QuerySuggestionPreviewEntry, a as QuerySuggestionsBuild, h as QuerySuggestionsBuildEvent, b as QuerySuggestionsBuildTrigger, c as QuerySuggestionsPreview, d as QuerySuggestionsSetting, i as QuerySuggestionsSource, e as QuerySuggestionsStatus, j as QuerySuggestionsWarningEvent, k as QuerySuggestionsWarningReason, R as RecordQueryOutcome, f as RecordQueryResult, l as RecordedQuery } from './query-suggestions-CBYkrQ5T.js';
|
|
4
4
|
import './adapters-pljAqmrC.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { querySuggestions } from './chunk-
|
|
1
|
+
export { querySuggestions } from './chunk-T3YI4KN6.mjs';
|
|
2
2
|
import './chunk-S2POFTLN.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-CWXR7OP4.mjs';
|
|
4
4
|
import './chunk-KLVMK3R5.mjs';
|
|
5
5
|
import './chunk-LPRRFCVU.mjs';
|
|
6
6
|
import './chunk-GXCDWLQI.mjs';
|