@delali/narsil 0.3.1-next.111 → 0.3.1-next.112

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.
Files changed (30) hide show
  1. package/dist/browser/{chunk-5BQPBG3G.mjs → chunk-O5IKTA27.mjs} +1 -1
  2. package/dist/browser/{chunk-HQOYKRMB.mjs → chunk-UR5MNN53.mjs} +181 -43
  3. package/dist/browser/{chunk-6YUUEMQ4.mjs → chunk-YRYBTRWB.mjs} +2 -2
  4. package/dist/browser/{durability-wiring-CYAJBYCO.mjs → durability-wiring-CPEMDDK7.mjs} +3 -3
  5. package/dist/browser/{restore-queue-RTZGJT4D.mjs → restore-queue-2H4QDQV4.mjs} +1 -1
  6. package/dist/browser/{snapshot-BU6I25CW.mjs → snapshot-ISZMBDCN.mjs} +3 -3
  7. package/dist/browser/{write-RUPYHPBZ.mjs → write-IABOLE4N.mjs} +2 -2
  8. package/dist/{chunk-6S7YRUPQ.mjs → chunk-2IFU7SXG.mjs} +4 -4
  9. package/dist/{chunk-PKE2PCTS.mjs → chunk-3COL24MT.mjs} +1 -1
  10. package/dist/{chunk-IW6UR3AF.mjs → chunk-3RRATITJ.mjs} +8 -8
  11. package/dist/{chunk-7JOONQ24.mjs → chunk-5WEBVYOA.mjs} +176 -38
  12. package/dist/{chunk-CUVTRLA4.mjs → chunk-7CI34JAP.mjs} +3 -3
  13. package/dist/{chunk-JBPYFYIU.mjs → chunk-BVOUSX3U.mjs} +3 -3
  14. package/dist/{chunk-UGKO3RG2.mjs → chunk-GLZI636G.mjs} +1 -1
  15. package/dist/{chunk-YSR5L3XJ.mjs → chunk-IBTKJIV7.mjs} +1 -1
  16. package/dist/{chunk-YLE75NQ5.mjs → chunk-IM76DLA7.mjs} +1 -1
  17. package/dist/{chunk-R2MRMH6M.mjs → chunk-V7ISFBFC.mjs} +1 -1
  18. package/dist/{chunk-SXVDBHYJ.mjs → chunk-VLRT47GU.mjs} +3 -3
  19. package/dist/{direct-executor-QFAUKTCQ.mjs → direct-executor-ZSTKRA6Z.mjs} +2 -2
  20. package/dist/distribution.mjs +9 -9
  21. package/dist/{durability-wiring-NUHTYXHA.mjs → durability-wiring-EQTFL3B4.mjs} +10 -10
  22. package/dist/index.browser.mjs +1 -1
  23. package/dist/index.mjs +4 -4
  24. package/dist/persistence/durability/checkpoint-worker.mjs +7 -7
  25. package/dist/{restore-queue-QSLGXZJB.mjs → restore-queue-WZTMTJP2.mjs} +1 -1
  26. package/dist/{snapshot-IV3S2TMI.mjs → snapshot-EU6NNB2P.mjs} +9 -9
  27. package/dist/{thread-THLCKMEB.mjs → thread-WGBCVJII.mjs} +2 -2
  28. package/dist/workers/entry.mjs +3 -3
  29. package/dist/{write-VGRTOS7N.mjs → write-CKRWS3P5.mjs} +5 -5
  30. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, getNestedValue, requireValidFieldTypes, VECTOR_PATTERN } from './chunk-HQOYKRMB.mjs';
1
+ import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, getNestedValue, requireValidFieldTypes, VECTOR_PATTERN } from './chunk-UR5MNN53.mjs';
2
2
  import { NarsilError, ErrorCodes } from './chunk-LJS6PREA.mjs';
3
3
  import { decode } from '@msgpack/msgpack';
4
4
 
@@ -3245,6 +3245,8 @@ function createDocumentStore() {
3245
3245
  // src/core/constants.ts
3246
3246
  var POSTING_LIST_COMPACTION_THRESHOLD = 0.3;
3247
3247
  var MAX_TERM_FREQUENCY = 65535;
3248
+ var PENDING_REMOVAL_MERGE_FLOOR = 64;
3249
+ var PENDING_REMOVAL_MERGE_DIVISOR = 256;
3248
3250
 
3249
3251
  // src/core/fuzzy.ts
3250
3252
  var FIRST_SURROGATE = 55296;
@@ -4944,6 +4946,7 @@ function vincentyDistance(lat1, lon1, lat2, lon2) {
4944
4946
  }
4945
4947
 
4946
4948
  // src/geo/geo-index.ts
4949
+ var REMOVED_DOC_ID = -1;
4947
4950
  function firstAtOrAfter(entries, code) {
4948
4951
  let lo = 0;
4949
4952
  let hi = entries.length;
@@ -4954,25 +4957,58 @@ function firstAtOrAfter(entries, code) {
4954
4957
  }
4955
4958
  return lo;
4956
4959
  }
4960
+ function dropRemoved(entries) {
4961
+ let write = 0;
4962
+ for (let read = 0; read < entries.length; read++) {
4963
+ if (entries[read].docId !== REMOVED_DOC_ID) entries[write++] = entries[read];
4964
+ }
4965
+ entries.length = write;
4966
+ }
4967
+ function mergeSortedPending(entries, pending) {
4968
+ pending.sort((left2, right2) => left2.code - right2.code || left2.docId - right2.docId);
4969
+ const mainLength = entries.length;
4970
+ for (const entry of pending) entries.push(entry);
4971
+ let left = mainLength - 1;
4972
+ let right = pending.length - 1;
4973
+ let write = entries.length - 1;
4974
+ while (right >= 0) {
4975
+ const later = left >= 0 ? entries[left] : void 0;
4976
+ const next = pending[right];
4977
+ if (later !== void 0 && (later.code > next.code || later.code === next.code && later.docId > next.docId)) {
4978
+ entries[write--] = later;
4979
+ left--;
4980
+ } else {
4981
+ entries[write--] = next;
4982
+ right--;
4983
+ }
4984
+ }
4985
+ }
4957
4986
  function createGeoIndex() {
4958
- const entries = [];
4987
+ let entries = [];
4988
+ let pending = [];
4959
4989
  const byDocument = /* @__PURE__ */ new Map();
4960
- let sorted = true;
4990
+ let removedCount = 0;
4961
4991
  function ensureSorted() {
4962
- if (sorted) return;
4963
- entries.sort((left, right) => left.code - right.code || left.docId - right.docId);
4964
- sorted = true;
4965
- }
4966
- function removeEntry(internalId) {
4967
- const entry = byDocument.get(internalId);
4968
- if (entry === void 0) return;
4969
- byDocument.delete(internalId);
4970
- ensureSorted();
4971
- for (let at = firstAtOrAfter(entries, entry.code); at < entries.length; at++) {
4972
- if (entries[at] !== entry) continue;
4973
- entries.splice(at, 1);
4974
- return;
4992
+ if (removedCount > 0) {
4993
+ dropRemoved(entries);
4994
+ dropRemoved(pending);
4995
+ removedCount = 0;
4996
+ }
4997
+ if (pending.length === 0) return;
4998
+ if (entries.length === 0) {
4999
+ pending.sort((left, right) => left.code - right.code || left.docId - right.docId);
5000
+ entries = pending;
5001
+ } else {
5002
+ mergeSortedPending(entries, pending);
4975
5003
  }
5004
+ pending = [];
5005
+ }
5006
+ function removeEntry(entry) {
5007
+ byDocument.delete(entry.docId);
5008
+ entry.docId = REMOVED_DOC_ID;
5009
+ removedCount++;
5010
+ const held = entries.length + pending.length;
5011
+ if (removedCount >= Math.max(PENDING_REMOVAL_MERGE_FLOOR, held / PENDING_REMOVAL_MERGE_DIVISOR)) ensureSorted();
4976
5012
  }
4977
5013
  function matching(boxes, passes, inside) {
4978
5014
  ensureSorted();
@@ -4991,14 +5027,15 @@ function createGeoIndex() {
4991
5027
  }
4992
5028
  const index = {
4993
5029
  insert(internalId, lat, lon) {
4994
- removeEntry(internalId);
5030
+ const existing = byDocument.get(internalId);
5031
+ if (existing !== void 0) removeEntry(existing);
4995
5032
  const entry = { lat, lon, docId: internalId, code: locationCode(lat, lon) };
4996
- entries.push(entry);
5033
+ pending.push(entry);
4997
5034
  byDocument.set(internalId, entry);
4998
- sorted = false;
4999
5035
  },
5000
5036
  remove(internalId) {
5001
- removeEntry(internalId);
5037
+ const existing = byDocument.get(internalId);
5038
+ if (existing !== void 0) removeEntry(existing);
5002
5039
  },
5003
5040
  radiusQuery(lat, lon, distanceMeters, inside, highPrecision) {
5004
5041
  const distanceFn = highPrecision ? vincentyDistance : haversineDistance;
@@ -5014,13 +5051,14 @@ function createGeoIndex() {
5014
5051
  },
5015
5052
  documentsBitset(capacity) {
5016
5053
  const bits = createBitSet(capacity);
5017
- for (const entry of entries) bitsetSet(bits, entry.docId);
5054
+ for (const docId of byDocument.keys()) bitsetSet(bits, docId);
5018
5055
  return bits;
5019
5056
  },
5020
5057
  clear() {
5021
- entries.length = 0;
5058
+ entries = [];
5059
+ pending = [];
5022
5060
  byDocument.clear();
5023
- sorted = true;
5061
+ removedCount = 0;
5024
5062
  },
5025
5063
  serialize() {
5026
5064
  ensureSorted();
@@ -5348,29 +5386,126 @@ function collectDocIdsBitset(entries, from, to, capacity) {
5348
5386
  }
5349
5387
  return bs;
5350
5388
  }
5389
+ function removalsFor(byDocument, docId, value) {
5390
+ const keys = byDocument.get(docId);
5391
+ if (keys === void 0) return void 0;
5392
+ for (const key of keys) {
5393
+ if (key.value === value) return key;
5394
+ }
5395
+ return void 0;
5396
+ }
5397
+ function groupRemovals(docIds, values, limits) {
5398
+ const byDocument = /* @__PURE__ */ new Map();
5399
+ for (let at = 0; at < docIds.length; at++) {
5400
+ const existing = removalsFor(byDocument, docIds[at], values[at]);
5401
+ if (existing !== void 0) {
5402
+ existing.limits.push(limits[at]);
5403
+ continue;
5404
+ }
5405
+ const key = { value: values[at], limits: [limits[at]], next: 0 };
5406
+ const keys = byDocument.get(docIds[at]);
5407
+ if (keys === void 0) byDocument.set(docIds[at], [key]);
5408
+ else keys.push(key);
5409
+ }
5410
+ return byDocument;
5411
+ }
5412
+ function markedDocuments(docIds) {
5413
+ let highest = 0;
5414
+ for (const docId of docIds) if (docId > highest) highest = docId;
5415
+ const marked = new Uint8Array(highest + 1);
5416
+ for (const docId of docIds) marked[docId] = 1;
5417
+ return marked;
5418
+ }
5419
+ function removeFromSorted(entries, from, marked, byDocument) {
5420
+ let write = from;
5421
+ for (let read = from; read < entries.length; read++) {
5422
+ const entry = entries[read];
5423
+ if (entry.docId < marked.length && marked[entry.docId] === 1) {
5424
+ const key = removalsFor(byDocument, entry.docId, entry.value);
5425
+ if (key !== void 0 && key.next < key.limits.length) {
5426
+ key.next++;
5427
+ continue;
5428
+ }
5429
+ }
5430
+ entries[write++] = entry;
5431
+ }
5432
+ entries.length = write;
5433
+ }
5434
+ function removeFromPending(pending, marked, byDocument) {
5435
+ let write = 0;
5436
+ for (let read = 0; read < pending.length; read++) {
5437
+ const entry = pending[read];
5438
+ if (entry.docId < marked.length && marked[entry.docId] === 1) {
5439
+ const key = removalsFor(byDocument, entry.docId, entry.value);
5440
+ if (key !== void 0) {
5441
+ while (key.next < key.limits.length && key.limits[key.next] <= read) key.next++;
5442
+ if (key.next < key.limits.length) {
5443
+ key.next++;
5444
+ continue;
5445
+ }
5446
+ }
5447
+ }
5448
+ pending[write++] = entry;
5449
+ }
5450
+ pending.length = write;
5451
+ }
5452
+ function mergeSortedPending2(entries, pending) {
5453
+ pending.sort((a, b) => a.value - b.value);
5454
+ const mainLength = entries.length;
5455
+ for (const entry of pending) entries.push(entry);
5456
+ let left = mainLength - 1;
5457
+ let right = pending.length - 1;
5458
+ let write = entries.length - 1;
5459
+ while (right >= 0) {
5460
+ if (left >= 0 && entries[left].value > pending[right].value) entries[write--] = entries[left--];
5461
+ else entries[write--] = pending[right--];
5462
+ }
5463
+ }
5351
5464
  function createNumericIndex() {
5352
5465
  let entries = [];
5353
- let sorted = true;
5466
+ let pending = [];
5467
+ const removedDocIds = [];
5468
+ const removedValues = [];
5469
+ const removedLimits = [];
5470
+ function applyRemovals() {
5471
+ const byDocument = groupRemovals(removedDocIds, removedValues, removedLimits);
5472
+ const marked = markedDocuments(removedDocIds);
5473
+ let lowest = removedValues[0];
5474
+ for (const value of removedValues) if (value < lowest) lowest = value;
5475
+ removeFromSorted(entries, lowerBound(entries, lowest), marked, byDocument);
5476
+ if (pending.length > 0) removeFromPending(pending, marked, byDocument);
5477
+ removedDocIds.length = 0;
5478
+ removedValues.length = 0;
5479
+ removedLimits.length = 0;
5480
+ }
5354
5481
  function ensureSorted() {
5355
- if (!sorted) {
5356
- entries.sort((a, b) => a.value - b.value);
5357
- sorted = true;
5482
+ if (removedDocIds.length > 0) applyRemovals();
5483
+ if (pending.length === 0) return;
5484
+ if (entries.length === 0) {
5485
+ pending.sort((a, b) => a.value - b.value);
5486
+ entries = pending;
5487
+ } else {
5488
+ mergeSortedPending2(entries, pending);
5358
5489
  }
5490
+ pending = [];
5491
+ }
5492
+ function discardPending() {
5493
+ pending = [];
5494
+ removedDocIds.length = 0;
5495
+ removedValues.length = 0;
5496
+ removedLimits.length = 0;
5359
5497
  }
5360
5498
  return {
5361
5499
  insert(internalId, value) {
5362
- entries.push({ value, docId: internalId });
5363
- sorted = false;
5500
+ pending.push({ value, docId: internalId });
5364
5501
  },
5365
5502
  remove(internalId, value) {
5366
- ensureSorted();
5367
- const start = lowerBound(entries, value);
5368
- const end = upperBound(entries, value);
5369
- for (let i = start; i < end; i++) {
5370
- if (entries[i].docId === internalId) {
5371
- entries.splice(i, 1);
5372
- return;
5373
- }
5503
+ removedDocIds.push(internalId);
5504
+ removedValues.push(value);
5505
+ removedLimits.push(pending.length);
5506
+ const held = entries.length + pending.length;
5507
+ if (removedDocIds.length >= Math.max(PENDING_REMOVAL_MERGE_FLOOR, held / PENDING_REMOVAL_MERGE_DIVISOR)) {
5508
+ ensureSorted();
5374
5509
  }
5375
5510
  },
5376
5511
  queryEq(value) {
@@ -5407,6 +5542,7 @@ function createNumericIndex() {
5407
5542
  return collectDocIds(entries, lowerBound(entries, min), upperBound(entries, max));
5408
5543
  },
5409
5544
  getAllDocIds() {
5545
+ ensureSorted();
5410
5546
  return collectDocIds(entries, 0, entries.length);
5411
5547
  },
5412
5548
  queryEqBitset(value, capacity) {
@@ -5434,9 +5570,11 @@ function createNumericIndex() {
5434
5570
  return collectDocIdsBitset(entries, lowerBound(entries, min), upperBound(entries, max), capacity);
5435
5571
  },
5436
5572
  getAllDocIdsBitset(capacity) {
5573
+ ensureSorted();
5437
5574
  return collectDocIdsBitset(entries, 0, entries.length, capacity);
5438
5575
  },
5439
5576
  count() {
5577
+ ensureSorted();
5440
5578
  return entries.length;
5441
5579
  },
5442
5580
  facetValueCounts(matched) {
@@ -5474,7 +5612,7 @@ function createNumericIndex() {
5474
5612
  },
5475
5613
  clear() {
5476
5614
  entries = [];
5477
- sorted = true;
5615
+ discardPending();
5478
5616
  },
5479
5617
  serialize() {
5480
5618
  ensureSorted();
@@ -5482,7 +5620,7 @@ function createNumericIndex() {
5482
5620
  },
5483
5621
  deserialize(data) {
5484
5622
  entries = data.slice();
5485
- sorted = true;
5623
+ discardPending();
5486
5624
  }
5487
5625
  };
5488
5626
  }
@@ -19037,7 +19175,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
19037
19175
  if (config?.lifecycle !== void 0 && durabilityTier === null) {
19038
19176
  throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
19039
19177
  }
19040
- const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-CYAJBYCO.mjs');
19178
+ const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-CPEMDDK7.mjs');
19041
19179
  const filesystemDurability = durabilityTier?.kind === "wal";
19042
19180
  const executor = createDirectExecutor({
19043
19181
  vectorWorkerCopies: vectorCopyPolicy,
@@ -22470,14 +22608,14 @@ function portabilityOperations(core, config, engine) {
22470
22608
  return {
22471
22609
  snapshot(indexName) {
22472
22610
  return withOpenIndex(indexName, async () => {
22473
- const { createSnapshot } = await import('./snapshot-BU6I25CW.mjs');
22611
+ const { createSnapshot } = await import('./snapshot-ISZMBDCN.mjs');
22474
22612
  return createSnapshot(snapshotDepsOf(indexName));
22475
22613
  });
22476
22614
  },
22477
22615
  async restore(indexName, data) {
22478
22616
  core.guardShutdown();
22479
22617
  validateIndexName(indexName);
22480
- const restored = import('./restore-queue-RTZGJT4D.mjs').then(
22618
+ const restored = import('./restore-queue-2H4QDQV4.mjs').then(
22481
22619
  ({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
22482
22620
  );
22483
22621
  await emitWriteEventAfter(core, indexName, restored);
@@ -22486,8 +22624,8 @@ function portabilityOperations(core, config, engine) {
22486
22624
  exportDocuments(indexName) {
22487
22625
  return withOpenIndex(indexName, async () => {
22488
22626
  const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
22489
- import('./snapshot-BU6I25CW.mjs'),
22490
- import('./write-RUPYHPBZ.mjs')
22627
+ import('./snapshot-ISZMBDCN.mjs'),
22628
+ import('./write-IABOLE4N.mjs')
22491
22629
  ]);
22492
22630
  const header = indexConfigurationOf(core.requireIndex(indexName));
22493
22631
  return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
@@ -1,5 +1,5 @@
1
- import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-5BQPBG3G.mjs';
2
- import { VERSION, rulesOfStoredSynonyms, flattenSchema, packChecksummedEnvelope, openChecksummedEnvelope, requireValidFieldTypes, isCompositePartition, crc32, reconstructSchemaFromMetadata, extractVectorFieldsFromSchema, readHeader, HEADER_SIZE, engineVersionParts, writeHeader, partialFieldsOf, getLanguage, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, VECTOR_PATTERN, isQuantizationMode, isStorageMode, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, fnv1a, selectionKeeps, decodeMapWithoutFields, prepareDocumentVectors, messagePackUpperBoundBytes, segmentArraysOf, mergeSegmentContents, resolveIndexAnalysis } from './chunk-HQOYKRMB.mjs';
1
+ import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-O5IKTA27.mjs';
2
+ import { VERSION, rulesOfStoredSynonyms, flattenSchema, packChecksummedEnvelope, openChecksummedEnvelope, requireValidFieldTypes, isCompositePartition, crc32, reconstructSchemaFromMetadata, extractVectorFieldsFromSchema, readHeader, HEADER_SIZE, engineVersionParts, writeHeader, partialFieldsOf, getLanguage, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, VECTOR_PATTERN, isQuantizationMode, isStorageMode, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, fnv1a, selectionKeeps, decodeMapWithoutFields, prepareDocumentVectors, messagePackUpperBoundBytes, segmentArraysOf, mergeSegmentContents, resolveIndexAnalysis } from './chunk-UR5MNN53.mjs';
3
3
  import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-P7C2S5JX.mjs';
4
4
  import { compareCodePoints, MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-2CBQ2PCC.mjs';
5
5
  import { NarsilError, ErrorCodes } from './chunk-LJS6PREA.mjs';
@@ -1,7 +1,7 @@
1
1
  import { nodeThreadId, spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
2
- import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, decodeSegmentManifest, readListedFile, adapterCheckpointStore, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-6YUUEMQ4.mjs';
3
- import { applyDeleteEntry, applyIndexEntry } from './chunk-5BQPBG3G.mjs';
4
- import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-HQOYKRMB.mjs';
2
+ import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, decodeSegmentManifest, readListedFile, adapterCheckpointStore, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-YRYBTRWB.mjs';
3
+ import { applyDeleteEntry, applyIndexEntry } from './chunk-O5IKTA27.mjs';
4
+ import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-UR5MNN53.mjs';
5
5
  import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-P7C2S5JX.mjs';
6
6
  import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-2CBQ2PCC.mjs';
7
7
  import './chunk-JPTQZWJQ.mjs';
@@ -18,7 +18,7 @@ function restoreDepsOf(core, host) {
18
18
  function queueRestore(core, host, restoresInFlight, indexName, data) {
19
19
  const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
20
20
  const restored = previous.then(async () => {
21
- const { restoreFromSnapshot } = await import('./snapshot-BU6I25CW.mjs');
21
+ const { restoreFromSnapshot } = await import('./snapshot-ISZMBDCN.mjs');
22
22
  await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
23
23
  });
24
24
  const settled = restored.then(
@@ -1,7 +1,7 @@
1
1
  import { vectorsPerFile } from './chunk-OVY4RPDS.mjs';
2
- import { indexMetadataOf, writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, writeLiveVectors, commitCheckpointManifest, manifestKey, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, manifestFileRefs, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readSegmentFile, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-6YUUEMQ4.mjs';
3
- import './chunk-5BQPBG3G.mjs';
4
- import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, raiseEarlierReleaseGraphSetting, restoredConfigFields, restoredEmbedding, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, prepareStoredSynonyms, rejectSnapshot, readHeapStatistics, readResidentMemory, extractVectorFieldsFromSchema, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-HQOYKRMB.mjs';
2
+ import { indexMetadataOf, writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, writeLiveVectors, commitCheckpointManifest, manifestKey, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, manifestFileRefs, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readSegmentFile, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-YRYBTRWB.mjs';
3
+ import './chunk-O5IKTA27.mjs';
4
+ import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, raiseEarlierReleaseGraphSetting, restoredConfigFields, restoredEmbedding, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, prepareStoredSynonyms, rejectSnapshot, readHeapStatistics, readResidentMemory, extractVectorFieldsFromSchema, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-UR5MNN53.mjs';
5
5
  import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-P7C2S5JX.mjs';
6
6
  import { MAX_FILE_BYTES } from './chunk-2CBQ2PCC.mjs';
7
7
  import './chunk-JPTQZWJQ.mjs';
@@ -1,5 +1,5 @@
1
- import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-5BQPBG3G.mjs';
2
- import { decodeStoredDocument, openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-HQOYKRMB.mjs';
1
+ import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-O5IKTA27.mjs';
2
+ import { decodeStoredDocument, openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-UR5MNN53.mjs';
3
3
  import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-P7C2S5JX.mjs';
4
4
  import './chunk-2CBQ2PCC.mjs';
5
5
  import './chunk-JPTQZWJQ.mjs';
@@ -1,9 +1,9 @@
1
- import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-PKE2PCTS.mjs';
1
+ import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-3COL24MT.mjs';
2
2
  import { WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
3
3
  import { ReplicationMessageTypes } from './chunk-YH5OIL7B.mjs';
4
- import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-IW6UR3AF.mjs';
5
- import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-R2MRMH6M.mjs';
6
- import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-7JOONQ24.mjs';
4
+ import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-3RRATITJ.mjs';
5
+ import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-V7ISFBFC.mjs';
6
+ import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-5WEBVYOA.mjs';
7
7
  import { generateId, getLanguage } from './chunk-FUUP45IS.mjs';
8
8
  import { extractVectorFieldsFromSchema, partialFieldsOf, messagePackUpperBoundBytes } from './chunk-DG62H7OD.mjs';
9
9
  import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
@@ -1,4 +1,4 @@
1
- import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-IW6UR3AF.mjs';
1
+ import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-3RRATITJ.mjs';
2
2
  import { getNestedValue } from './chunk-KCQG2PJT.mjs';
3
3
  import { requireValidFieldTypes } from './chunk-DG62H7OD.mjs';
4
4
  import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
@@ -1,9 +1,9 @@
1
- import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, queryBindingOf, executeQuery, executePreflight, executeSuggest, executeListDocuments, validateDocId } from './chunk-UGKO3RG2.mjs';
1
+ import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, queryBindingOf, executeQuery, executePreflight, executeSuggest, executeListDocuments, validateDocId } from './chunk-GLZI636G.mjs';
2
2
  import { resolveVectorText, bindEngineCore, restoredConfigFields, restoredEmbedding, collectRequiredFieldFailures, embedChunkDocuments, providedDocId, requireDocumentObject, admitInsert, asBatchInsertError, requireMatchingDocId, embedDocumentFields, assertDocumentCarriesMappedVectors, admitBufferedUpsert, createPendingAdmissions, recordPendingAdmission } from './chunk-N57XXGPG.mjs';
3
3
  import { splitWorkerBudget, resolveWorkerCount, resolveWorkerEntry, missingWorkerEntry, DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestThreadCount, workerResourceLimits, DEFAULT_BACKPRESSURE_LIMIT, SHUTDOWN_TIMEOUT_MS, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH } from './chunk-6PN3U6XW.mjs';
4
4
  import { detectRuntime } from './chunk-AV4IJKD2.mjs';
5
- import { isEmptySynonymSet, synonymModule, createDirectExecutor, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, resolvePartitionInsertOptions, createFrozenSegment } from './chunk-R2MRMH6M.mjs';
6
- import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, createPartitionIndex, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, fnv1a, encodeSegmentState } from './chunk-7JOONQ24.mjs';
5
+ import { isEmptySynonymSet, synonymModule, createDirectExecutor, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, resolvePartitionInsertOptions, createFrozenSegment } from './chunk-V7ISFBFC.mjs';
6
+ import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, createPartitionIndex, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, fnv1a, encodeSegmentState } from './chunk-5WEBVYOA.mjs';
7
7
  import { generateId, getLanguage } from './chunk-FUUP45IS.mjs';
8
8
  import { readHeapStatistics } from './chunk-SOADQINJ.mjs';
9
9
  import { DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-HJSN7UYG.mjs';
@@ -4037,7 +4037,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
4037
4037
  if (config?.lifecycle !== void 0 && durabilityTier === null) {
4038
4038
  throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
4039
4039
  }
4040
- const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-NUHTYXHA.mjs');
4040
+ const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-EQTFL3B4.mjs');
4041
4041
  const filesystemDurability = durabilityTier?.kind === "wal";
4042
4042
  const executor = createDirectExecutor({
4043
4043
  vectorWorkerCopies: vectorCopyPolicy,
@@ -6951,14 +6951,14 @@ function portabilityOperations(core, config, engine) {
6951
6951
  return {
6952
6952
  snapshot(indexName) {
6953
6953
  return withOpenIndex(indexName, async () => {
6954
- const { createSnapshot } = await import('./snapshot-IV3S2TMI.mjs');
6954
+ const { createSnapshot } = await import('./snapshot-EU6NNB2P.mjs');
6955
6955
  return createSnapshot(snapshotDepsOf(indexName));
6956
6956
  });
6957
6957
  },
6958
6958
  async restore(indexName, data) {
6959
6959
  core.guardShutdown();
6960
6960
  validateIndexName(indexName);
6961
- const restored = import('./restore-queue-QSLGXZJB.mjs').then(
6961
+ const restored = import('./restore-queue-WZTMTJP2.mjs').then(
6962
6962
  ({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
6963
6963
  );
6964
6964
  await emitWriteEventAfter(core, indexName, restored);
@@ -6967,8 +6967,8 @@ function portabilityOperations(core, config, engine) {
6967
6967
  exportDocuments(indexName) {
6968
6968
  return withOpenIndex(indexName, async () => {
6969
6969
  const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
6970
- import('./snapshot-IV3S2TMI.mjs'),
6971
- import('./write-VGRTOS7N.mjs')
6970
+ import('./snapshot-EU6NNB2P.mjs'),
6971
+ import('./write-CKRWS3P5.mjs')
6972
6972
  ]);
6973
6973
  const header = indexConfigurationOf(core.requireIndex(indexName));
6974
6974
  return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
@@ -597,6 +597,8 @@ function createDocumentStore() {
597
597
  // src/core/constants.ts
598
598
  var POSTING_LIST_COMPACTION_THRESHOLD = 0.3;
599
599
  var MAX_TERM_FREQUENCY = 65535;
600
+ var PENDING_REMOVAL_MERGE_FLOOR = 64;
601
+ var PENDING_REMOVAL_MERGE_DIVISOR = 256;
600
602
 
601
603
  // src/core/inverted-index/constants.ts
602
604
  var TERM_TABLE_START_CAPACITY = 1 << 10;
@@ -2187,6 +2189,7 @@ function vincentyDistance(lat1, lon1, lat2, lon2) {
2187
2189
  }
2188
2190
 
2189
2191
  // src/geo/geo-index.ts
2192
+ var REMOVED_DOC_ID = -1;
2190
2193
  function firstAtOrAfter(entries, code) {
2191
2194
  let lo = 0;
2192
2195
  let hi = entries.length;
@@ -2197,25 +2200,58 @@ function firstAtOrAfter(entries, code) {
2197
2200
  }
2198
2201
  return lo;
2199
2202
  }
2203
+ function dropRemoved(entries) {
2204
+ let write = 0;
2205
+ for (let read = 0; read < entries.length; read++) {
2206
+ if (entries[read].docId !== REMOVED_DOC_ID) entries[write++] = entries[read];
2207
+ }
2208
+ entries.length = write;
2209
+ }
2210
+ function mergeSortedPending(entries, pending) {
2211
+ pending.sort((left2, right2) => left2.code - right2.code || left2.docId - right2.docId);
2212
+ const mainLength = entries.length;
2213
+ for (const entry of pending) entries.push(entry);
2214
+ let left = mainLength - 1;
2215
+ let right = pending.length - 1;
2216
+ let write = entries.length - 1;
2217
+ while (right >= 0) {
2218
+ const later = left >= 0 ? entries[left] : void 0;
2219
+ const next = pending[right];
2220
+ if (later !== void 0 && (later.code > next.code || later.code === next.code && later.docId > next.docId)) {
2221
+ entries[write--] = later;
2222
+ left--;
2223
+ } else {
2224
+ entries[write--] = next;
2225
+ right--;
2226
+ }
2227
+ }
2228
+ }
2200
2229
  function createGeoIndex() {
2201
- const entries = [];
2230
+ let entries = [];
2231
+ let pending = [];
2202
2232
  const byDocument = /* @__PURE__ */ new Map();
2203
- let sorted = true;
2233
+ let removedCount = 0;
2204
2234
  function ensureSorted() {
2205
- if (sorted) return;
2206
- entries.sort((left, right) => left.code - right.code || left.docId - right.docId);
2207
- sorted = true;
2208
- }
2209
- function removeEntry(internalId) {
2210
- const entry = byDocument.get(internalId);
2211
- if (entry === void 0) return;
2212
- byDocument.delete(internalId);
2213
- ensureSorted();
2214
- for (let at = firstAtOrAfter(entries, entry.code); at < entries.length; at++) {
2215
- if (entries[at] !== entry) continue;
2216
- entries.splice(at, 1);
2217
- return;
2235
+ if (removedCount > 0) {
2236
+ dropRemoved(entries);
2237
+ dropRemoved(pending);
2238
+ removedCount = 0;
2239
+ }
2240
+ if (pending.length === 0) return;
2241
+ if (entries.length === 0) {
2242
+ pending.sort((left, right) => left.code - right.code || left.docId - right.docId);
2243
+ entries = pending;
2244
+ } else {
2245
+ mergeSortedPending(entries, pending);
2218
2246
  }
2247
+ pending = [];
2248
+ }
2249
+ function removeEntry(entry) {
2250
+ byDocument.delete(entry.docId);
2251
+ entry.docId = REMOVED_DOC_ID;
2252
+ removedCount++;
2253
+ const held = entries.length + pending.length;
2254
+ if (removedCount >= Math.max(PENDING_REMOVAL_MERGE_FLOOR, held / PENDING_REMOVAL_MERGE_DIVISOR)) ensureSorted();
2219
2255
  }
2220
2256
  function matching(boxes, passes, inside) {
2221
2257
  ensureSorted();
@@ -2234,14 +2270,15 @@ function createGeoIndex() {
2234
2270
  }
2235
2271
  const index = {
2236
2272
  insert(internalId, lat, lon) {
2237
- removeEntry(internalId);
2273
+ const existing = byDocument.get(internalId);
2274
+ if (existing !== void 0) removeEntry(existing);
2238
2275
  const entry = { lat, lon, docId: internalId, code: locationCode(lat, lon) };
2239
- entries.push(entry);
2276
+ pending.push(entry);
2240
2277
  byDocument.set(internalId, entry);
2241
- sorted = false;
2242
2278
  },
2243
2279
  remove(internalId) {
2244
- removeEntry(internalId);
2280
+ const existing = byDocument.get(internalId);
2281
+ if (existing !== void 0) removeEntry(existing);
2245
2282
  },
2246
2283
  radiusQuery(lat, lon, distanceMeters, inside, highPrecision) {
2247
2284
  const distanceFn = highPrecision ? vincentyDistance : haversineDistance;
@@ -2257,13 +2294,14 @@ function createGeoIndex() {
2257
2294
  },
2258
2295
  documentsBitset(capacity) {
2259
2296
  const bits = createBitSet(capacity);
2260
- for (const entry of entries) bitsetSet(bits, entry.docId);
2297
+ for (const docId of byDocument.keys()) bitsetSet(bits, docId);
2261
2298
  return bits;
2262
2299
  },
2263
2300
  clear() {
2264
- entries.length = 0;
2301
+ entries = [];
2302
+ pending = [];
2265
2303
  byDocument.clear();
2266
- sorted = true;
2304
+ removedCount = 0;
2267
2305
  },
2268
2306
  serialize() {
2269
2307
  ensureSorted();
@@ -2591,29 +2629,126 @@ function collectDocIdsBitset(entries, from, to, capacity) {
2591
2629
  }
2592
2630
  return bs;
2593
2631
  }
2632
+ function removalsFor(byDocument, docId, value) {
2633
+ const keys = byDocument.get(docId);
2634
+ if (keys === void 0) return void 0;
2635
+ for (const key of keys) {
2636
+ if (key.value === value) return key;
2637
+ }
2638
+ return void 0;
2639
+ }
2640
+ function groupRemovals(docIds, values, limits) {
2641
+ const byDocument = /* @__PURE__ */ new Map();
2642
+ for (let at = 0; at < docIds.length; at++) {
2643
+ const existing = removalsFor(byDocument, docIds[at], values[at]);
2644
+ if (existing !== void 0) {
2645
+ existing.limits.push(limits[at]);
2646
+ continue;
2647
+ }
2648
+ const key = { value: values[at], limits: [limits[at]], next: 0 };
2649
+ const keys = byDocument.get(docIds[at]);
2650
+ if (keys === void 0) byDocument.set(docIds[at], [key]);
2651
+ else keys.push(key);
2652
+ }
2653
+ return byDocument;
2654
+ }
2655
+ function markedDocuments(docIds) {
2656
+ let highest = 0;
2657
+ for (const docId of docIds) if (docId > highest) highest = docId;
2658
+ const marked = new Uint8Array(highest + 1);
2659
+ for (const docId of docIds) marked[docId] = 1;
2660
+ return marked;
2661
+ }
2662
+ function removeFromSorted(entries, from, marked, byDocument) {
2663
+ let write = from;
2664
+ for (let read = from; read < entries.length; read++) {
2665
+ const entry = entries[read];
2666
+ if (entry.docId < marked.length && marked[entry.docId] === 1) {
2667
+ const key = removalsFor(byDocument, entry.docId, entry.value);
2668
+ if (key !== void 0 && key.next < key.limits.length) {
2669
+ key.next++;
2670
+ continue;
2671
+ }
2672
+ }
2673
+ entries[write++] = entry;
2674
+ }
2675
+ entries.length = write;
2676
+ }
2677
+ function removeFromPending(pending, marked, byDocument) {
2678
+ let write = 0;
2679
+ for (let read = 0; read < pending.length; read++) {
2680
+ const entry = pending[read];
2681
+ if (entry.docId < marked.length && marked[entry.docId] === 1) {
2682
+ const key = removalsFor(byDocument, entry.docId, entry.value);
2683
+ if (key !== void 0) {
2684
+ while (key.next < key.limits.length && key.limits[key.next] <= read) key.next++;
2685
+ if (key.next < key.limits.length) {
2686
+ key.next++;
2687
+ continue;
2688
+ }
2689
+ }
2690
+ }
2691
+ pending[write++] = entry;
2692
+ }
2693
+ pending.length = write;
2694
+ }
2695
+ function mergeSortedPending2(entries, pending) {
2696
+ pending.sort((a, b) => a.value - b.value);
2697
+ const mainLength = entries.length;
2698
+ for (const entry of pending) entries.push(entry);
2699
+ let left = mainLength - 1;
2700
+ let right = pending.length - 1;
2701
+ let write = entries.length - 1;
2702
+ while (right >= 0) {
2703
+ if (left >= 0 && entries[left].value > pending[right].value) entries[write--] = entries[left--];
2704
+ else entries[write--] = pending[right--];
2705
+ }
2706
+ }
2594
2707
  function createNumericIndex() {
2595
2708
  let entries = [];
2596
- let sorted = true;
2709
+ let pending = [];
2710
+ const removedDocIds = [];
2711
+ const removedValues = [];
2712
+ const removedLimits = [];
2713
+ function applyRemovals() {
2714
+ const byDocument = groupRemovals(removedDocIds, removedValues, removedLimits);
2715
+ const marked = markedDocuments(removedDocIds);
2716
+ let lowest = removedValues[0];
2717
+ for (const value of removedValues) if (value < lowest) lowest = value;
2718
+ removeFromSorted(entries, lowerBound(entries, lowest), marked, byDocument);
2719
+ if (pending.length > 0) removeFromPending(pending, marked, byDocument);
2720
+ removedDocIds.length = 0;
2721
+ removedValues.length = 0;
2722
+ removedLimits.length = 0;
2723
+ }
2597
2724
  function ensureSorted() {
2598
- if (!sorted) {
2599
- entries.sort((a, b) => a.value - b.value);
2600
- sorted = true;
2725
+ if (removedDocIds.length > 0) applyRemovals();
2726
+ if (pending.length === 0) return;
2727
+ if (entries.length === 0) {
2728
+ pending.sort((a, b) => a.value - b.value);
2729
+ entries = pending;
2730
+ } else {
2731
+ mergeSortedPending2(entries, pending);
2601
2732
  }
2733
+ pending = [];
2734
+ }
2735
+ function discardPending() {
2736
+ pending = [];
2737
+ removedDocIds.length = 0;
2738
+ removedValues.length = 0;
2739
+ removedLimits.length = 0;
2602
2740
  }
2603
2741
  return {
2604
2742
  insert(internalId, value) {
2605
- entries.push({ value, docId: internalId });
2606
- sorted = false;
2743
+ pending.push({ value, docId: internalId });
2607
2744
  },
2608
2745
  remove(internalId, value) {
2609
- ensureSorted();
2610
- const start = lowerBound(entries, value);
2611
- const end = upperBound(entries, value);
2612
- for (let i = start; i < end; i++) {
2613
- if (entries[i].docId === internalId) {
2614
- entries.splice(i, 1);
2615
- return;
2616
- }
2746
+ removedDocIds.push(internalId);
2747
+ removedValues.push(value);
2748
+ removedLimits.push(pending.length);
2749
+ const held = entries.length + pending.length;
2750
+ if (removedDocIds.length >= Math.max(PENDING_REMOVAL_MERGE_FLOOR, held / PENDING_REMOVAL_MERGE_DIVISOR)) {
2751
+ ensureSorted();
2617
2752
  }
2618
2753
  },
2619
2754
  queryEq(value) {
@@ -2650,6 +2785,7 @@ function createNumericIndex() {
2650
2785
  return collectDocIds(entries, lowerBound(entries, min), upperBound(entries, max));
2651
2786
  },
2652
2787
  getAllDocIds() {
2788
+ ensureSorted();
2653
2789
  return collectDocIds(entries, 0, entries.length);
2654
2790
  },
2655
2791
  queryEqBitset(value, capacity) {
@@ -2677,9 +2813,11 @@ function createNumericIndex() {
2677
2813
  return collectDocIdsBitset(entries, lowerBound(entries, min), upperBound(entries, max), capacity);
2678
2814
  },
2679
2815
  getAllDocIdsBitset(capacity) {
2816
+ ensureSorted();
2680
2817
  return collectDocIdsBitset(entries, 0, entries.length, capacity);
2681
2818
  },
2682
2819
  count() {
2820
+ ensureSorted();
2683
2821
  return entries.length;
2684
2822
  },
2685
2823
  facetValueCounts(matched) {
@@ -2717,7 +2855,7 @@ function createNumericIndex() {
2717
2855
  },
2718
2856
  clear() {
2719
2857
  entries = [];
2720
- sorted = true;
2858
+ discardPending();
2721
2859
  },
2722
2860
  serialize() {
2723
2861
  ensureSorted();
@@ -2725,7 +2863,7 @@ function createNumericIndex() {
2725
2863
  },
2726
2864
  deserialize(data) {
2727
2865
  entries = data.slice();
2728
- sorted = true;
2866
+ discardPending();
2729
2867
  }
2730
2868
  };
2731
2869
  }
@@ -1,8 +1,8 @@
1
1
  import { vectorsPerFile } from './chunk-PT7VRWS7.mjs';
2
- import { writeLiveVectors, decodeSegmentManifest, openManifestPayload, listedKeysOf, decodeManifestPayload, SINGLE_NODE_PRIMARY_TERM } from './chunk-SXVDBHYJ.mjs';
2
+ import { writeLiveVectors, decodeSegmentManifest, openManifestPayload, listedKeysOf, decodeManifestPayload, SINGLE_NODE_PRIMARY_TERM } from './chunk-VLRT47GU.mjs';
3
3
  import { vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION } from './chunk-OCB7TMUQ.mjs';
4
- import { writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, commitCheckpointManifest, manifestKey, manifestFileRefs, partitionContentsOf } from './chunk-6S7YRUPQ.mjs';
5
- import { HEADER_SIZE } from './chunk-IW6UR3AF.mjs';
4
+ import { writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, commitCheckpointManifest, manifestKey, manifestFileRefs, partitionContentsOf } from './chunk-2IFU7SXG.mjs';
5
+ import { HEADER_SIZE } from './chunk-3RRATITJ.mjs';
6
6
  import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
7
7
  import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
8
8
 
@@ -1,6 +1,6 @@
1
- import { readMetadataEnvelope } from './chunk-SXVDBHYJ.mjs';
2
- import { readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-6S7YRUPQ.mjs';
3
- import { applyDeleteEntry, applyIndexEntry } from './chunk-PKE2PCTS.mjs';
1
+ import { readMetadataEnvelope } from './chunk-VLRT47GU.mjs';
2
+ import { readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-2IFU7SXG.mjs';
3
+ import { applyDeleteEntry, applyIndexEntry } from './chunk-3COL24MT.mjs';
4
4
 
5
5
  // src/persistence/durability/recovery.ts
6
6
  async function listPersistedIndexes(directory) {
@@ -1,4 +1,4 @@
1
- import { normalizeSort, requireMatchingCursor, encodePageCursor, decodePageCursor, projectionKeepsField, resolveProjection, clampRowCount, sortSignatureOf, requireSortableFields, fanOutQuery, requireWithinResultWindow, sortModesOf, applySorting, applyPagination, countsWithoutScores, fanOutMatchCount, FNV_OFFSET_BASIS, validatedFilterOf, createPatternWorkMeter, partialWordsToHighlight, partialWordHighlighter, pruneStatsToQueryTerms, everyValueFacetConfig, fulltextMatches, mergeFacets, applyPartitionFiltersBitset, fnv1aContinue, partitionsIn, fnv1aContinueTaggedNumbers, undeclaredFieldOnStrictIndex } from './chunk-7JOONQ24.mjs';
1
+ import { normalizeSort, requireMatchingCursor, encodePageCursor, decodePageCursor, projectionKeepsField, resolveProjection, clampRowCount, sortSignatureOf, requireSortableFields, fanOutQuery, requireWithinResultWindow, sortModesOf, applySorting, applyPagination, countsWithoutScores, fanOutMatchCount, FNV_OFFSET_BASIS, validatedFilterOf, createPatternWorkMeter, partialWordsToHighlight, partialWordHighlighter, pruneStatsToQueryTerms, everyValueFacetConfig, fulltextMatches, mergeFacets, applyPartitionFiltersBitset, fnv1aContinue, partitionsIn, fnv1aContinueTaggedNumbers, undeclaredFieldOnStrictIndex } from './chunk-5WEBVYOA.mjs';
2
2
  import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, MAX_DOC_ID_LENGTH, DEFAULT_LIMIT, DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, DEFAULT_OFFSET } from './chunk-LXWDQLTW.mjs';
3
3
  import { MIN_OVERSAMPLE, MAX_RENUMBERED_SEARCH_ATTEMPTS } from './chunk-QSK35UC2.mjs';
4
4
  import { flattenSchema, partialFieldsOf } from './chunk-DG62H7OD.mjs';
@@ -1,4 +1,4 @@
1
- import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-SXVDBHYJ.mjs';
1
+ import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-VLRT47GU.mjs';
2
2
  import { requireValidFieldTypes } from './chunk-DG62H7OD.mjs';
3
3
  import { VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
4
4
  import { decode } from '@msgpack/msgpack';
@@ -1,6 +1,6 @@
1
1
  import { nodeThreadId } from './chunk-C7SLA6CM.mjs';
2
2
  import { getFs, getPath } from './chunk-HLPRHOSO.mjs';
3
- import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-6S7YRUPQ.mjs';
3
+ import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-2IFU7SXG.mjs';
4
4
  import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
5
5
  import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
6
6
  import { openSync, close, readFileSync } from 'fs';
@@ -1,4 +1,4 @@
1
- import { requirePatternSearchFor, requirePartialWordSearchFor, createPartitionIndex, buildPartialWordTableFrom, recordValueSize, patternIndexOf, encodeFieldIndexes, encodePartialSpellingsOf, countPartialSpelling, copyVectorsInto, isCompositePartition, fnv1a, partialSpellingsOfDocuments, createFrozenPartialWords, requirePatternSearch, documentValueBytes, cloneProjected, projectIncludedPaths, valueWithOwnBuffers, createSurfaceRegistry, MAX_TERM_FREQUENCY, joinPatternWorkMeter, fanOutQuery, sanitizeGlobalStats, countsWithoutScores, fanOutMatchCount, createCompositePartition, createGeoIndex, documentWithOwnBuffers, readProjectedPath, createNumericIndex, createBooleanIndex, createEnumIndex, ValueAffixes } from './chunk-7JOONQ24.mjs';
1
+ import { requirePatternSearchFor, requirePartialWordSearchFor, createPartitionIndex, buildPartialWordTableFrom, recordValueSize, patternIndexOf, encodeFieldIndexes, encodePartialSpellingsOf, countPartialSpelling, copyVectorsInto, isCompositePartition, fnv1a, partialSpellingsOfDocuments, createFrozenPartialWords, requirePatternSearch, documentValueBytes, cloneProjected, projectIncludedPaths, valueWithOwnBuffers, createSurfaceRegistry, MAX_TERM_FREQUENCY, joinPatternWorkMeter, fanOutQuery, sanitizeGlobalStats, countsWithoutScores, fanOutMatchCount, createCompositePartition, createGeoIndex, documentWithOwnBuffers, readProjectedPath, createNumericIndex, createBooleanIndex, createEnumIndex, ValueAffixes } from './chunk-5WEBVYOA.mjs';
2
2
  import { generateId, getLanguage } from './chunk-FUUP45IS.mjs';
3
3
  import { readHeapStatistics, readResidentMemory } from './chunk-SOADQINJ.mjs';
4
4
  import { GrowableUint32, bitsetHas, bitsetSet, createBitSet } from './chunk-HNAP2KTG.mjs';
@@ -1,7 +1,7 @@
1
1
  import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-OCB7TMUQ.mjs';
2
- import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, readSegmentFile, manifestKey, segmentsPrefix, readListedFile, requireListedChecksum, vectorFileKey, graphPartKey } from './chunk-6S7YRUPQ.mjs';
3
- import { VERSION, rulesOfStoredSynonyms, openChecksummedEnvelope, readHeader, HEADER_SIZE, crc32, engineVersionParts, writeHeader, packChecksummedEnvelope } from './chunk-IW6UR3AF.mjs';
4
- import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-R2MRMH6M.mjs';
2
+ import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, readSegmentFile, manifestKey, segmentsPrefix, readListedFile, requireListedChecksum, vectorFileKey, graphPartKey } from './chunk-2IFU7SXG.mjs';
3
+ import { VERSION, rulesOfStoredSynonyms, openChecksummedEnvelope, readHeader, HEADER_SIZE, crc32, engineVersionParts, writeHeader, packChecksummedEnvelope } from './chunk-3RRATITJ.mjs';
4
+ import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-V7ISFBFC.mjs';
5
5
  import { flattenSchema, requireValidFieldTypes, isQuantizationMode, isStorageMode } from './chunk-DG62H7OD.mjs';
6
6
  import { MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
7
7
  import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
@@ -1,5 +1,5 @@
1
- export { createDirectExecutor } from './chunk-R2MRMH6M.mjs';
2
- import './chunk-7JOONQ24.mjs';
1
+ export { createDirectExecutor } from './chunk-V7ISFBFC.mjs';
2
+ import './chunk-5WEBVYOA.mjs';
3
3
  import './chunk-FUUP45IS.mjs';
4
4
  import './chunk-SOADQINJ.mjs';
5
5
  import './chunk-TGP5M5R7.mjs';
@@ -2,10 +2,10 @@ import { DEFAULT_NODE_LIFECYCLE_CONFIG, bindWriteBlockLookup, bindEngineWriteBlo
2
2
  import { MAX_WAIT_FOR_ACTIVE_REPLICAS, MIN_CONTROLLER_LEASE_TTL_MS, MAX_NODE_LEFT_DELAY_MS, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_CAPACITY, CATCH_UP_TICK_MS, DEFAULT_RESUME_WRITES_BELOW, DEFAULT_BLOCK_WRITES_ABOVE, readMemoryFigures, createWritePressure, WRITE_MEMORY_SAMPLE_MAX_AGE_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, onRefusalAfterCollection, MAX_DROP_ACKNOWLEDGE_WAIT_MS, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_CREATE_INDEX_WAIT_MS, refuseEncodeWithoutRoom, readRecentMemoryFigures, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, MAX_SYNONYM_REPLACEMENT_ATTEMPTS, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, SEARCH_CONTEXT_REAPER_INTERVAL_MS, DECOMMISSION_RECHECK_INTERVAL_MS, answerRefusalOf, withAdmittedWrite, estimateForwardedBytes, CASE_FOLD_EXPANSION_FACTOR, PATTERN_RUN_HEAP_BYTES, ENUM_VALUE_HEAP_BYTES, MAX_SOURCE_ID_LENGTH, reserveHeapBytes, reservedHeapBytes, DOCUMENT_VALUE_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, NORMALIZATION_EXPANSION_FACTOR, TERM_UNIT_HEAP_BYTES, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, DISTINCT_TERM_HEAP_BYTES, PARTIAL_SPELLING_HEAP_BYTES, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, CATCH_UP_FEED_WINDOW_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, SYNCED_POSITION_REPORT_TIMEOUT_MS, ADMISSION_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, WRITE_APPLY_YIELD_INTERVAL_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, ROLLBACK_RETRY_DELAY_CAP_MS, COPY_FAILURE_RETRY_DELAY_MS, FETCH_GROUP_DOCUMENT_IDS, SEARCH_CONTEXT_ENTRY_HEAP_BYTES, collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal, FULL_MEMORY_COLLECTION_INTERVAL_MS, MEMORY_SAMPLE_INTERVAL_MS, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CLEAR_PAGE_SIZE, estimateDocumentsBytes, estimateDocumentBytes, PRIMARY_CHANGE_RETRY_WINDOW_MS, PRIMARY_CHANGE_POLL_INTERVAL_MS, PARTITION_WRITE_CONCURRENCY, FORWARD_RETRY_INITIAL_DELAY_MS, FORWARD_RETRY_DELAY_CAP_MS } from './chunk-V7G627TA.mjs';
3
3
  export { DEFAULT_CAPACITY, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR } from './chunk-V7G627TA.mjs';
4
4
  import { fixedHybridDepthOf, requireWithinHybridDepth, pageByPosition } from './chunk-2RAQKITH.mjs';
5
- import { closePartitionWriter, replaySyncedWal } from './chunk-JBPYFYIU.mjs';
6
- import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-CUVTRLA4.mjs';
5
+ import { closePartitionWriter, replaySyncedWal } from './chunk-BVOUSX3U.mjs';
6
+ import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-7CI34JAP.mjs';
7
7
  import './chunk-PT7VRWS7.mjs';
8
- import { indexMetadataOf, loadPartitionSegments, readSegmentManifest, readVectorFile } from './chunk-SXVDBHYJ.mjs';
8
+ import { indexMetadataOf, loadPartitionSegments, readSegmentManifest, readVectorFile } from './chunk-VLRT47GU.mjs';
9
9
  import { decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-OCB7TMUQ.mjs';
10
10
  import { CONTROLLER_LEASE_KEY } from './chunk-44W3CBNG.mjs';
11
11
  import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
@@ -13,17 +13,17 @@ import './chunk-YIDSHBQS.mjs';
13
13
  import './chunk-DJHHF2L5.mjs';
14
14
  import './chunk-37CD3OKS.mjs';
15
15
  import { getPath, getFs } from './chunk-HLPRHOSO.mjs';
16
- import { createForwardBatchResultMessage, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, readListedFile, optionalIndexUuid, computeEntryChecksum, createPrimaryResignMessage, validateInsyncConfirmPayload, buildEntry, createInsyncRemoveMessage, createEntryBatchMessage, createInsyncConfirmMessage, createEntryMessage, validateAckPayload, createInsyncAddMessage, directoryCheckpointStore, checkpointLastSeqNo, checkpointPrimaryTerm, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage } from './chunk-6S7YRUPQ.mjs';
17
- import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-PKE2PCTS.mjs';
16
+ import { createForwardBatchResultMessage, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, readListedFile, optionalIndexUuid, computeEntryChecksum, createPrimaryResignMessage, validateInsyncConfirmPayload, buildEntry, createInsyncRemoveMessage, createEntryBatchMessage, createInsyncConfirmMessage, createEntryMessage, validateAckPayload, createInsyncAddMessage, directoryCheckpointStore, checkpointLastSeqNo, checkpointPrimaryTerm, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage } from './chunk-2IFU7SXG.mjs';
17
+ import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-3COL24MT.mjs';
18
18
  import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
19
19
  import { TransportErrorCodes, ReplicationMessageTypes, ClusterMessageTypes, QueryMessageTypes, TransportError, DEFAULT_TRANSPORT_CONFIG } from './chunk-YH5OIL7B.mjs';
20
- import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update, yieldToEventLoop } from './chunk-IW6UR3AF.mjs';
21
- import { runtimeHost, requireSurfaceFormsForPartialFields, now, listBindingOf, clampLimit, hitsKeptPerGroup, queryBindingOf, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-UGKO3RG2.mjs';
20
+ import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update, yieldToEventLoop } from './chunk-3RRATITJ.mjs';
21
+ import { runtimeHost, requireSurfaceFormsForPartialFields, now, listBindingOf, clampLimit, hitsKeptPerGroup, queryBindingOf, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-GLZI636G.mjs';
22
22
  import { bindRerankWindowSource, rerankWindowCapOf, providedDocId, engineCoreOf } from './chunk-N57XXGPG.mjs';
23
23
  import './chunk-6PN3U6XW.mjs';
24
24
  import './chunk-AV4IJKD2.mjs';
25
- import { synonymModule } from './chunk-R2MRMH6M.mjs';
26
- import { oversampledShardSize, normalizeSort, sortModesOf, readSortValues, resolveProjection, fnv1a, applyProjection, FILTER_EXPRESSION_KEYS, filterTestCount, setNestedValue, FIELD_FILTER_OPERATORS, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, encodePageCursor, requireWithinResultWindow, sortSignatureEntry, fnv1aUint32s, mergePartitionStats } from './chunk-7JOONQ24.mjs';
25
+ import { synonymModule } from './chunk-V7ISFBFC.mjs';
26
+ import { oversampledShardSize, normalizeSort, sortModesOf, readSortValues, resolveProjection, fnv1a, applyProjection, FILTER_EXPRESSION_KEYS, filterTestCount, setNestedValue, FIELD_FILTER_OPERATORS, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, encodePageCursor, requireWithinResultWindow, sortSignatureEntry, fnv1aUint32s, mergePartitionStats } from './chunk-5WEBVYOA.mjs';
27
27
  import { generateId, getLanguage } from './chunk-FUUP45IS.mjs';
28
28
  import './chunk-SOADQINJ.mjs';
29
29
  import './chunk-HJSN7UYG.mjs';
@@ -1,22 +1,22 @@
1
- import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-YSR5L3XJ.mjs';
2
- import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-JBPYFYIU.mjs';
3
- import { decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, VECTOR_FILE_ENVELOPE_VERSION, metadataConfigOf, readCurrentManifest } from './chunk-SXVDBHYJ.mjs';
1
+ import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-IBTKJIV7.mjs';
2
+ import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-BVOUSX3U.mjs';
3
+ import { decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, VECTOR_FILE_ENVELOPE_VERSION, metadataConfigOf, readCurrentManifest } from './chunk-VLRT47GU.mjs';
4
4
  import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-OCB7TMUQ.mjs';
5
5
  import './chunk-37CD3OKS.mjs';
6
- import { createDurableDirectory } from './chunk-YLE75NQ5.mjs';
6
+ import { createDurableDirectory } from './chunk-IM76DLA7.mjs';
7
7
  import { spawnNodeWorker } from './chunk-C7SLA6CM.mjs';
8
8
  import { getFs } from './chunk-HLPRHOSO.mjs';
9
- import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, readSegmentFile, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, MAX_SEGMENTS_PER_PARTITION, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, SEGMENT_HEADER_SIZE, buildEntry, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, checkpointLastSeqNo, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-6S7YRUPQ.mjs';
10
- import './chunk-PKE2PCTS.mjs';
9
+ import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, readSegmentFile, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, MAX_SEGMENTS_PER_PARTITION, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, SEGMENT_HEADER_SIZE, buildEntry, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, checkpointLastSeqNo, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-2IFU7SXG.mjs';
10
+ import './chunk-3COL24MT.mjs';
11
11
  import './chunk-P36MUFEJ.mjs';
12
12
  import './chunk-YH5OIL7B.mjs';
13
- import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-IW6UR3AF.mjs';
14
- import './chunk-UGKO3RG2.mjs';
13
+ import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-3RRATITJ.mjs';
14
+ import './chunk-GLZI636G.mjs';
15
15
  import './chunk-N57XXGPG.mjs';
16
16
  import { resolveWorkerEntry } from './chunk-6PN3U6XW.mjs';
17
17
  import { detectRuntime } from './chunk-AV4IJKD2.mjs';
18
- import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-R2MRMH6M.mjs';
19
- import { fnv1a } from './chunk-7JOONQ24.mjs';
18
+ import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-V7ISFBFC.mjs';
19
+ import { fnv1a } from './chunk-5WEBVYOA.mjs';
20
20
  import './chunk-FUUP45IS.mjs';
21
21
  import './chunk-SOADQINJ.mjs';
22
22
  import './chunk-HJSN7UYG.mjs';
@@ -1,4 +1,4 @@
1
- export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-HQOYKRMB.mjs';
1
+ export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-UR5MNN53.mjs';
2
2
  export { isSimdAvailable } from './browser/chunk-2CBQ2PCC.mjs';
3
3
  import './browser/chunk-JPTQZWJQ.mjs';
4
4
  export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-LJS6PREA.mjs';
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- export { VERSION, createNarsil } from './chunk-IW6UR3AF.mjs';
2
- import './chunk-UGKO3RG2.mjs';
1
+ export { VERSION, createNarsil } from './chunk-3RRATITJ.mjs';
2
+ import './chunk-GLZI636G.mjs';
3
3
  import './chunk-N57XXGPG.mjs';
4
4
  import './chunk-6PN3U6XW.mjs';
5
5
  import './chunk-AV4IJKD2.mjs';
6
- export { registerSynonyms } from './chunk-R2MRMH6M.mjs';
7
- export { registerPartialWordSearch, registerPatternSearch } from './chunk-7JOONQ24.mjs';
6
+ export { registerSynonyms } from './chunk-V7ISFBFC.mjs';
7
+ export { registerPartialWordSearch, registerPatternSearch } from './chunk-5WEBVYOA.mjs';
8
8
  export { getLanguage, registerLanguage } from './chunk-FUUP45IS.mjs';
9
9
  import './chunk-SOADQINJ.mjs';
10
10
  import './chunk-HJSN7UYG.mjs';
@@ -1,17 +1,17 @@
1
- import { createDurableDirectory } from '../../chunk-YLE75NQ5.mjs';
1
+ import { createDurableDirectory } from '../../chunk-IM76DLA7.mjs';
2
2
  import '../../chunk-C7SLA6CM.mjs';
3
3
  import '../../chunk-HLPRHOSO.mjs';
4
- import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-6S7YRUPQ.mjs';
5
- import '../../chunk-PKE2PCTS.mjs';
4
+ import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-2IFU7SXG.mjs';
5
+ import '../../chunk-3COL24MT.mjs';
6
6
  import '../../chunk-P36MUFEJ.mjs';
7
7
  import '../../chunk-YH5OIL7B.mjs';
8
- import '../../chunk-IW6UR3AF.mjs';
9
- import '../../chunk-UGKO3RG2.mjs';
8
+ import '../../chunk-3RRATITJ.mjs';
9
+ import '../../chunk-GLZI636G.mjs';
10
10
  import '../../chunk-N57XXGPG.mjs';
11
11
  import '../../chunk-6PN3U6XW.mjs';
12
12
  import '../../chunk-AV4IJKD2.mjs';
13
- import '../../chunk-R2MRMH6M.mjs';
14
- import '../../chunk-7JOONQ24.mjs';
13
+ import '../../chunk-V7ISFBFC.mjs';
14
+ import '../../chunk-5WEBVYOA.mjs';
15
15
  import '../../chunk-FUUP45IS.mjs';
16
16
  import '../../chunk-SOADQINJ.mjs';
17
17
  import '../../chunk-HJSN7UYG.mjs';
@@ -18,7 +18,7 @@ function restoreDepsOf(core, host) {
18
18
  function queueRestore(core, host, restoresInFlight, indexName, data) {
19
19
  const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
20
20
  const restored = previous.then(async () => {
21
- const { restoreFromSnapshot } = await import('./snapshot-IV3S2TMI.mjs');
21
+ const { restoreFromSnapshot } = await import('./snapshot-EU6NNB2P.mjs');
22
22
  await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
23
23
  });
24
24
  const settled = restored.then(
@@ -1,22 +1,22 @@
1
- import { documentsOfPayloadV2 } from './chunk-YSR5L3XJ.mjs';
2
- import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-CUVTRLA4.mjs';
1
+ import { documentsOfPayloadV2 } from './chunk-IBTKJIV7.mjs';
2
+ import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-7CI34JAP.mjs';
3
3
  import './chunk-PT7VRWS7.mjs';
4
- import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-SXVDBHYJ.mjs';
4
+ import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-VLRT47GU.mjs';
5
5
  import { decodeVectorIndexParts, bytesToVectors } from './chunk-OCB7TMUQ.mjs';
6
6
  import './chunk-YIDSHBQS.mjs';
7
7
  import './chunk-DJHHF2L5.mjs';
8
8
  import './chunk-37CD3OKS.mjs';
9
- import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-6S7YRUPQ.mjs';
10
- import './chunk-PKE2PCTS.mjs';
9
+ import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-2IFU7SXG.mjs';
10
+ import './chunk-3COL24MT.mjs';
11
11
  import './chunk-P36MUFEJ.mjs';
12
12
  import './chunk-YH5OIL7B.mjs';
13
- import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-IW6UR3AF.mjs';
14
- import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-UGKO3RG2.mjs';
13
+ import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-3RRATITJ.mjs';
14
+ import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-GLZI636G.mjs';
15
15
  import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-N57XXGPG.mjs';
16
16
  import './chunk-6PN3U6XW.mjs';
17
17
  import './chunk-AV4IJKD2.mjs';
18
- import { decodeEveryStoredDocument } from './chunk-R2MRMH6M.mjs';
19
- import './chunk-7JOONQ24.mjs';
18
+ import { decodeEveryStoredDocument } from './chunk-V7ISFBFC.mjs';
19
+ import './chunk-5WEBVYOA.mjs';
20
20
  import { getLanguage } from './chunk-FUUP45IS.mjs';
21
21
  import { readHeapStatistics, readResidentMemory } from './chunk-SOADQINJ.mjs';
22
22
  import './chunk-HJSN7UYG.mjs';
@@ -2,8 +2,8 @@ import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, creat
2
2
  import { withRerankQueryText } from './chunk-KZ3NX2P7.mjs';
3
3
  import './chunk-V7G627TA.mjs';
4
4
  import './chunk-DJHHF2L5.mjs';
5
- import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-UGKO3RG2.mjs';
6
- import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-7JOONQ24.mjs';
5
+ import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-GLZI636G.mjs';
6
+ import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-5WEBVYOA.mjs';
7
7
  import './chunk-SOADQINJ.mjs';
8
8
  import './chunk-HJSN7UYG.mjs';
9
9
  import './chunk-LXWDQLTW.mjs';
@@ -22,7 +22,7 @@ async function importBootstrapModule(moduleUrl) {
22
22
  await import(moduleUrl);
23
23
  }
24
24
  async function stopServingRequests() {
25
- const { closeRequestThread } = await import('../thread-THLCKMEB.mjs');
25
+ const { closeRequestThread } = await import('../thread-WGBCVJII.mjs');
26
26
  closeRequestThread();
27
27
  }
28
28
  function holdsCopies(executor) {
@@ -53,7 +53,7 @@ function createActionHandler(executor) {
53
53
  if (!holdsCopies(executor)) {
54
54
  throw new NarsilError(ErrorCodes.CONFIG_INVALID, "This executor holds no copies to answer requests from");
55
55
  }
56
- const starting = import('../thread-THLCKMEB.mjs').then(
56
+ const starting = import('../thread-WGBCVJII.mjs').then(
57
57
  ({ serveRequests }) => serveRequests(executor, action.settings)
58
58
  );
59
59
  serving.start = starting.then(
@@ -106,7 +106,7 @@ async function setup() {
106
106
  } catch {
107
107
  parentPort = null;
108
108
  }
109
- const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-QFAUKTCQ.mjs'), loadVectorCode()]);
109
+ const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-ZSTKRA6Z.mjs'), loadVectorCode()]);
110
110
  const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
111
111
  if (parentPort) {
112
112
  const port = parentPort;
@@ -1,13 +1,13 @@
1
1
  import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-OCB7TMUQ.mjs';
2
2
  import './chunk-37CD3OKS.mjs';
3
- import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-PKE2PCTS.mjs';
4
- import { openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-IW6UR3AF.mjs';
5
- import './chunk-UGKO3RG2.mjs';
3
+ import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-3COL24MT.mjs';
4
+ import { openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-3RRATITJ.mjs';
5
+ import './chunk-GLZI636G.mjs';
6
6
  import './chunk-N57XXGPG.mjs';
7
7
  import './chunk-6PN3U6XW.mjs';
8
8
  import './chunk-AV4IJKD2.mjs';
9
- import { decodeStoredDocument } from './chunk-R2MRMH6M.mjs';
10
- import './chunk-7JOONQ24.mjs';
9
+ import { decodeStoredDocument } from './chunk-V7ISFBFC.mjs';
10
+ import './chunk-5WEBVYOA.mjs';
11
11
  import './chunk-FUUP45IS.mjs';
12
12
  import './chunk-SOADQINJ.mjs';
13
13
  import './chunk-HJSN7UYG.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delali/narsil",
3
- "version": "0.3.1-next.111",
3
+ "version": "0.3.1-next.112",
4
4
  "type": "module",
5
5
  "description": "Distributed search engine with full-text, vector, hybrid, and geosearch. One engine, embedded or on a server, with a cross-language .nrsl format.",
6
6
  "author": "Delali (https://sondelali.com)",
@@ -269,11 +269,11 @@
269
269
  }
270
270
  },
271
271
  "optionalDependencies": {
272
- "@delali/narsil-native-darwin-arm64": "0.3.1-next.111",
273
- "@delali/narsil-native-darwin-x64": "0.3.1-next.111",
274
- "@delali/narsil-native-linux-arm64": "0.3.1-next.111",
275
- "@delali/narsil-native-linux-x64": "0.3.1-next.111",
276
- "@delali/narsil-native-win32-arm64": "0.3.1-next.111",
277
- "@delali/narsil-native-win32-x64": "0.3.1-next.111"
272
+ "@delali/narsil-native-darwin-arm64": "0.3.1-next.112",
273
+ "@delali/narsil-native-darwin-x64": "0.3.1-next.112",
274
+ "@delali/narsil-native-linux-arm64": "0.3.1-next.112",
275
+ "@delali/narsil-native-linux-x64": "0.3.1-next.112",
276
+ "@delali/narsil-native-win32-arm64": "0.3.1-next.112",
277
+ "@delali/narsil-native-win32-x64": "0.3.1-next.112"
278
278
  }
279
279
  }