@delali/narsil 0.3.1-next.82 → 0.3.1-next.83

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/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- export { VERSION, createNarsil } from './chunk-IH3GKNDQ.mjs';
1
+ export { VERSION, createNarsil } from './chunk-7JZZ3HNV.mjs';
2
2
  import './chunk-4D6OH4EF.mjs';
3
3
  import './chunk-GCM3JFVA.mjs';
4
4
  import './chunk-2453RJYK.mjs';
5
- export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-4CWHWOBI.mjs';
5
+ export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-CUP2E4OH.mjs';
6
6
  export { registerPartialWordSearch, registerPatternSearch } from './chunk-XYDP7CCJ.mjs';
7
7
  export { getLanguage, registerLanguage } from './chunk-OLXM65YH.mjs';
8
8
  import './chunk-ZCKPRCYI.mjs';
9
9
  import './chunk-TGP5M5R7.mjs';
10
- export { isSimdAvailable } from './chunk-IN5CH4P2.mjs';
10
+ export { isSimdAvailable } from './chunk-RZXNWQSM.mjs';
11
11
  import './chunk-ZJ4CSAB2.mjs';
12
12
  import './chunk-B3UOQJD3.mjs';
13
13
  import './chunk-SREPGC6O.mjs';
@@ -1,13 +1,13 @@
1
- import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-IH3GKNDQ.mjs';
1
+ import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-7JZZ3HNV.mjs';
2
2
  import '../../chunk-4D6OH4EF.mjs';
3
3
  import '../../chunk-GCM3JFVA.mjs';
4
4
  import '../../chunk-2453RJYK.mjs';
5
- import '../../chunk-4CWHWOBI.mjs';
5
+ import '../../chunk-CUP2E4OH.mjs';
6
6
  import '../../chunk-XYDP7CCJ.mjs';
7
7
  import '../../chunk-OLXM65YH.mjs';
8
8
  import '../../chunk-ZCKPRCYI.mjs';
9
9
  import '../../chunk-TGP5M5R7.mjs';
10
- import '../../chunk-IN5CH4P2.mjs';
10
+ import '../../chunk-RZXNWQSM.mjs';
11
11
  import '../../chunk-ZJ4CSAB2.mjs';
12
12
  import '../../chunk-B3UOQJD3.mjs';
13
13
  import '../../chunk-SREPGC6O.mjs';
@@ -189,6 +189,8 @@ interface VectorStoreSnapshot {
189
189
  magnitudes: Float64Array;
190
190
  /** This names the document at each ordinal, and it reads `null` where the ordinal holds none. */
191
191
  docIds: Array<string | null>;
192
+ /** This lists the ordinals of vectors that an update replaced, and the store keeps each of those vectors so that a search can pass through it until compaction. */
193
+ replacedOrdinals: number[];
192
194
  }
193
195
 
194
196
  /**
@@ -1,4 +1,4 @@
1
- import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-IN5CH4P2.mjs';
1
+ import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-RZXNWQSM.mjs';
2
2
  import '../chunk-ZJ4CSAB2.mjs';
3
3
  import '../chunk-B3UOQJD3.mjs';
4
4
  import '../chunk-KEHK2O6P.mjs';
@@ -14,10 +14,11 @@ function restoreQuantizer(snapshot, store) {
14
14
  quantizer.restoreCentroid(snapshot.codes.centroid);
15
15
  const recordBytes = osqRecordBytes(snapshot.dimension, bits);
16
16
  for (let ordinal = 0; ordinal < snapshot.codes.present.length; ordinal++) {
17
- if (snapshot.codes.present[ordinal] !== 1) continue;
18
- const docId = store.docIdForOrdinal(ordinal);
19
- if (docId === void 0) continue;
20
- quantizer.restoreRecord(docId, snapshot.codes.records.subarray(ordinal * recordBytes, (ordinal + 1) * recordBytes));
17
+ if (snapshot.codes.present[ordinal] !== 1 || ordinal >= store.slots) continue;
18
+ quantizer.restoreRecordAtOrdinal(
19
+ ordinal,
20
+ snapshot.codes.records.subarray(ordinal * recordBytes, (ordinal + 1) * recordBytes)
21
+ );
21
22
  }
22
23
  return quantizer;
23
24
  }
@@ -102,7 +102,7 @@ async function setup() {
102
102
  } catch {
103
103
  parentPort = null;
104
104
  }
105
- const { createDirectExecutor } = await import('../direct-executor-JVXDR5Y5.mjs');
105
+ const { createDirectExecutor } = await import('../direct-executor-6HASZ36Y.mjs');
106
106
  const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
107
107
  if (parentPort) {
108
108
  const port = parentPort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delali/narsil",
3
- "version": "0.3.1-next.82",
3
+ "version": "0.3.1-next.83",
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)",
@@ -246,11 +246,11 @@
246
246
  }
247
247
  },
248
248
  "optionalDependencies": {
249
- "@delali/narsil-native-darwin-arm64": "0.3.1-next.82",
250
- "@delali/narsil-native-darwin-x64": "0.3.1-next.82",
251
- "@delali/narsil-native-linux-arm64": "0.3.1-next.82",
252
- "@delali/narsil-native-linux-x64": "0.3.1-next.82",
253
- "@delali/narsil-native-win32-arm64": "0.3.1-next.82",
254
- "@delali/narsil-native-win32-x64": "0.3.1-next.82"
249
+ "@delali/narsil-native-darwin-arm64": "0.3.1-next.83",
250
+ "@delali/narsil-native-darwin-x64": "0.3.1-next.83",
251
+ "@delali/narsil-native-linux-arm64": "0.3.1-next.83",
252
+ "@delali/narsil-native-linux-x64": "0.3.1-next.83",
253
+ "@delali/narsil-native-win32-arm64": "0.3.1-next.83",
254
+ "@delali/narsil-native-win32-x64": "0.3.1-next.83"
255
255
  }
256
256
  }