@delali/narsil 0.3.1-next.86 → 0.3.1-next.87
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-3BXQPIXK.mjs +602 -0
- package/dist/browser/chunk-3ZRMZIH4.mjs +3959 -0
- package/dist/browser/chunk-BBDAYUCO.mjs +2703 -0
- package/dist/browser/chunk-FHFFWLEK.mjs +669 -0
- package/dist/browser/chunk-HOZW3PKP.mjs +9 -0
- package/dist/browser/chunk-NQW2YXEX.mjs +346 -0
- package/dist/browser/chunk-TBMNPGFO.mjs +22910 -0
- package/dist/browser/durability-wiring-7RUN7LNS.mjs +3250 -0
- package/dist/browser/module-E25UDADM.mjs +2766 -0
- package/dist/browser/snapshot-A42DRERF.mjs +888 -0
- package/dist/browser/write-4U6Q26TJ.mjs +206 -0
- package/dist/{capabilities-CAdkp2P-.d.ts → capabilities-SJPttcgQ.d.ts} +2 -2
- package/dist/chunk-37CD3OKS.mjs +87 -0
- package/dist/chunk-AQU2QHSY.mjs +7247 -0
- package/dist/{chunk-OLXM65YH.mjs → chunk-AV4IJKD2.mjs} +1 -18
- package/dist/{chunk-4D6OH4EF.mjs → chunk-AXDAS2VA.mjs} +7 -5
- package/dist/{chunk-LS5IRM23.mjs → chunk-BVOJIYRV.mjs} +2 -25
- package/dist/chunk-C7SLA6CM.mjs +19 -0
- package/dist/{chunk-KJ7LB3TR.mjs → chunk-CVQWQVFX.mjs} +3 -22
- package/dist/chunk-DJHHF2L5.mjs +17 -0
- package/dist/chunk-FGMGUDHX.mjs +21 -0
- package/dist/chunk-IKST36MA.mjs +614 -0
- package/dist/{chunk-2453RJYK.mjs → chunk-J2BPXTD7.mjs} +167 -176
- package/dist/chunk-JFJBA3PD.mjs +522 -0
- package/dist/chunk-K4OWQ2M3.mjs +462 -0
- package/dist/chunk-L5ORED7V.mjs +25 -0
- package/dist/chunk-MKK4OZ5W.mjs +703 -0
- package/dist/chunk-MXS5HWIH.mjs +515 -0
- package/dist/chunk-P36MUFEJ.mjs +10 -0
- package/dist/chunk-PR4O7CAP.mjs +18 -0
- package/dist/{chunk-4VBG6PEH.mjs → chunk-PSUJCOSE.mjs} +3 -2
- package/dist/{chunk-ZCKPRCYI.mjs → chunk-Q5DC6WAB.mjs} +1 -1
- package/dist/{chunk-NFF5TDRG.mjs → chunk-QZN3MIJ3.mjs} +1 -16
- package/dist/chunk-R7OSDAFK.mjs +44 -0
- package/dist/chunk-RVM7AODE.mjs +73 -0
- package/dist/{chunk-XYDP7CCJ.mjs → chunk-SYRFSF6V.mjs} +6 -4
- package/dist/{chunk-SREPGC6O.mjs → chunk-T6CNO72J.mjs} +1 -1
- package/dist/chunk-T7DMUVTL.mjs +1714 -0
- package/dist/chunk-UKSUENHK.mjs +997 -0
- package/dist/{chunk-B3F7LZXM.mjs → chunk-ULRPNYAG.mjs} +1220 -2318
- package/dist/{chunk-GNYXCLJS.mjs → chunk-URGLSNKR.mjs} +4 -3
- package/dist/chunk-WQSHDZ7Z.mjs +631 -0
- package/dist/{chunk-XPK3GB2P.mjs → chunk-XBXKPWMR.mjs} +20 -2664
- package/dist/{chunk-RM6FRYEC.mjs → chunk-XSZVS4S3.mjs} +3 -2
- package/dist/chunk-Y2F66IQJ.mjs +74 -0
- package/dist/chunk-YCJLVNWR.mjs +262 -0
- package/dist/{client-CKUtkLz3.d.ts → client-BMK53IR2.d.ts} +3 -3
- package/dist/client.d.ts +8 -8
- package/dist/{config-CSDEPraV.d.ts → config-BUR-7eVQ.d.ts} +2 -2
- package/dist/{config-BuIkeM5C.d.ts → config-UJx1dyX1.d.ts} +2 -2
- package/dist/direct-executor-LD6JW57R.mjs +18 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +30 -15
- package/dist/durability-wiring-5S32KDDC.mjs +2797 -0
- package/dist/{engine-DMNZJAUq.d.ts → engine-9X6W5naj.d.ts} +2 -2
- package/dist/{index-DzONZUKE.d.ts → index-vCMu8OeQ.d.ts} +1 -1
- package/dist/index.browser.mjs +2 -38128
- package/dist/index.d.ts +23 -9
- package/dist/index.mjs +18 -14
- package/dist/{memory-BPKNx9Tl.d.ts → memory-CV9NAxLY.d.ts} +1 -1
- package/dist/module-WIDYIJLY.mjs +1819 -0
- package/dist/partial-words.mjs +5 -3
- package/dist/pattern.mjs +3 -2
- package/dist/persistence/durability/checkpoint-worker.d.ts +1 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +23 -13
- package/dist/react.d.ts +7 -7
- package/dist/{schema-DgyDijhf.d.ts → schema-DtsgmNfU.d.ts} +1 -1
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +14 -9
- package/dist/snapshot-6BYSUPWL.mjs +469 -0
- package/dist/{tasks-DGyz586z.d.ts → tasks-BGaZJyoY.d.ts} +1 -1
- package/dist/{thread-EUUNJNKU.mjs → thread-GS65E6RM.mjs} +12 -9
- package/dist/vector/search-worker.d.ts +30 -3
- package/dist/vector/search-worker.mjs +6 -2
- package/dist/workers/entry.mjs +5 -3
- package/dist/write-HLEZTL2L.mjs +233 -0
- package/package.json +11 -7
- package/dist/chunk-IDLP54FH.mjs +0 -15198
- package/dist/direct-executor-SI2QV4YI.mjs +0 -19
- package/dist/simd-DW5AtJ6B.d.ts +0 -41
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { nativeSearchCoreIsEnabled
|
|
1
|
+
import { nativeSearchCoreIsEnabled } from './chunk-DJHHF2L5.mjs';
|
|
2
|
+
import { loadNativeCore } from './chunk-QZN3MIJ3.mjs';
|
|
2
3
|
import { MAX_FILTER_DEPTH } from './chunk-WQBCBKY3.mjs';
|
|
3
|
-
import { MAX_SORT_FIELDS } from './chunk-
|
|
4
|
+
import { MAX_SORT_FIELDS } from './chunk-FGMGUDHX.mjs';
|
|
4
5
|
import { NarsilError, ServerErrorCodes, ErrorCodes } from './chunk-TPJU7NDJ.mjs';
|
|
5
6
|
import { mkdtemp, open, rm } from 'fs/promises';
|
|
6
7
|
import { tmpdir } from 'os';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// src/vector/constants.ts
|
|
2
|
+
var WASM_PAGE_BYTES = 65536;
|
|
3
|
+
var MAX_WASM_PAGES = 65536;
|
|
4
|
+
var VECTOR_STORE_INITIAL_CAPACITY = 16;
|
|
5
|
+
var VECTOR_BLOCK_INITIAL_SLOTS = 256;
|
|
6
|
+
var DISK_STORAGE_BLOCK_BYTES = 67108864;
|
|
7
|
+
var MAX_VECTOR_ORDINALS = 16777216;
|
|
8
|
+
var UNPLACED_FLAG_CHUNK_ORDINALS = 1024;
|
|
9
|
+
var VECTOR_SCRATCH_SLOTS = 64;
|
|
10
|
+
var SCRATCH_SLOTS_PER_THREAD_POOL = 31;
|
|
11
|
+
var MAX_DOC_ID_TABLE_BYTES = 1073741824;
|
|
12
|
+
var MAX_WORKER_COPIES = 64;
|
|
13
|
+
var VECTOR_SEARCH_TIMEOUT_MS = 3e4;
|
|
14
|
+
var VECTOR_SEARCH_LOAD_TIMEOUT_MS = 3e5;
|
|
15
|
+
var VECTOR_INSERT_TIMEOUT_MS = 6e5;
|
|
16
|
+
var NATIVE_ATTACH_RETRY_MS = 1e3;
|
|
17
|
+
var LOCK_SPIN_ITERATIONS = 128;
|
|
18
|
+
var LOCK_WAIT_SLICE_MS = 20;
|
|
19
|
+
var GRAPH_LOCK_WAIT_SLICE_MS = 1;
|
|
20
|
+
var GRAPH_BUILD_DISPATCH_CHUNK = 64;
|
|
21
|
+
var GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER = 2;
|
|
22
|
+
|
|
23
|
+
// src/runtime/simd-support.ts
|
|
24
|
+
var SIMD_PROBE_MODULE = new Uint8Array([
|
|
25
|
+
0,
|
|
26
|
+
97,
|
|
27
|
+
115,
|
|
28
|
+
109,
|
|
29
|
+
1,
|
|
30
|
+
0,
|
|
31
|
+
0,
|
|
32
|
+
0,
|
|
33
|
+
1,
|
|
34
|
+
5,
|
|
35
|
+
1,
|
|
36
|
+
96,
|
|
37
|
+
0,
|
|
38
|
+
1,
|
|
39
|
+
123,
|
|
40
|
+
3,
|
|
41
|
+
2,
|
|
42
|
+
1,
|
|
43
|
+
0,
|
|
44
|
+
10,
|
|
45
|
+
10,
|
|
46
|
+
1,
|
|
47
|
+
8,
|
|
48
|
+
0,
|
|
49
|
+
65,
|
|
50
|
+
0,
|
|
51
|
+
253,
|
|
52
|
+
15,
|
|
53
|
+
253,
|
|
54
|
+
98,
|
|
55
|
+
11
|
|
56
|
+
]);
|
|
57
|
+
function runtimeStartsSimdModule() {
|
|
58
|
+
try {
|
|
59
|
+
if (typeof WebAssembly === "undefined") return false;
|
|
60
|
+
new WebAssembly.Instance(new WebAssembly.Module(SIMD_PROBE_MODULE));
|
|
61
|
+
return true;
|
|
62
|
+
} catch {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
var simdAvailable = runtimeStartsSimdModule();
|
|
67
|
+
function isSimdAvailable() {
|
|
68
|
+
return simdAvailable;
|
|
69
|
+
}
|
|
70
|
+
function markSimdUnavailable() {
|
|
71
|
+
simdAvailable = false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { DISK_STORAGE_BLOCK_BYTES, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, GRAPH_LOCK_WAIT_SLICE_MS, LOCK_SPIN_ITERATIONS, LOCK_WAIT_SLICE_MS, MAX_DOC_ID_TABLE_BYTES, MAX_VECTOR_ORDINALS, MAX_WASM_PAGES, MAX_WORKER_COPIES, NATIVE_ATTACH_RETRY_MS, SCRATCH_SLOTS_PER_THREAD_POOL, UNPLACED_FLAG_CHUNK_ORDINALS, VECTOR_BLOCK_INITIAL_SLOTS, VECTOR_INSERT_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_STORE_INITIAL_CAPACITY, WASM_PAGE_BYTES, isSimdAvailable, markSimdUnavailable };
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { osqRecordBytes } from './chunk-37CD3OKS.mjs';
|
|
2
|
+
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-KEHK2O6P.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-TPJU7NDJ.mjs';
|
|
4
|
+
|
|
5
|
+
// src/vector/vector-index/dead-bits.ts
|
|
6
|
+
var NO_LIVE_VECTOR_AT_POSITION = -1;
|
|
7
|
+
function deadBytesFor(count) {
|
|
8
|
+
return Math.ceil(count / 8);
|
|
9
|
+
}
|
|
10
|
+
function isDead(dead, position) {
|
|
11
|
+
return dead !== null && (dead[position >> 3] >> (position & 7) & 1) === 1;
|
|
12
|
+
}
|
|
13
|
+
function countDead(dead, count) {
|
|
14
|
+
if (dead === null) return 0;
|
|
15
|
+
let found = 0;
|
|
16
|
+
for (let position = 0; position < count; position++) {
|
|
17
|
+
if (isDead(dead, position)) found += 1;
|
|
18
|
+
}
|
|
19
|
+
return found;
|
|
20
|
+
}
|
|
21
|
+
function deadBitsWhere(count, isDeadAt) {
|
|
22
|
+
let dead = null;
|
|
23
|
+
for (let position = 0; position < count; position++) {
|
|
24
|
+
if (!isDeadAt(position)) continue;
|
|
25
|
+
dead ??= new Uint8Array(deadBytesFor(count));
|
|
26
|
+
dead[position >> 3] |= 1 << (position & 7);
|
|
27
|
+
}
|
|
28
|
+
return dead;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/vector/vector-index/payload.ts
|
|
32
|
+
var VECTOR_INDEX_PAYLOAD_VERSION = 3;
|
|
33
|
+
var VECTOR_INDEX_PART_VECTORS = 65536;
|
|
34
|
+
var LITTLE_ENDIAN = new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
|
|
35
|
+
function vectorsToBytes(vectors) {
|
|
36
|
+
if (LITTLE_ENDIAN) return new Uint8Array(vectors.buffer, vectors.byteOffset, vectors.byteLength);
|
|
37
|
+
const bytes = new Uint8Array(vectors.byteLength);
|
|
38
|
+
const view = new DataView(bytes.buffer);
|
|
39
|
+
for (let i = 0; i < vectors.length; i++) view.setFloat32(i * 4, vectors[i], true);
|
|
40
|
+
return bytes;
|
|
41
|
+
}
|
|
42
|
+
function bytesToVectors(bytes) {
|
|
43
|
+
if (LITTLE_ENDIAN && bytes.byteOffset % 4 === 0) {
|
|
44
|
+
return new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);
|
|
45
|
+
}
|
|
46
|
+
const vectors = new Float32Array(bytes.byteLength / 4);
|
|
47
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
48
|
+
for (let i = 0; i < vectors.length; i++) vectors[i] = view.getFloat32(i * 4, true);
|
|
49
|
+
return vectors;
|
|
50
|
+
}
|
|
51
|
+
function invalid(message, details) {
|
|
52
|
+
throw new NarsilError(ErrorCodes.PERSISTENCE_LOAD_FAILED, `Invalid vector index payload: ${message}`, details);
|
|
53
|
+
}
|
|
54
|
+
function isRecord(value) {
|
|
55
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
56
|
+
}
|
|
57
|
+
function isNonNegativeInteger(value) {
|
|
58
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
59
|
+
}
|
|
60
|
+
function isSerializedGraph(value) {
|
|
61
|
+
return isRecord(value) && Array.isArray(value.nodes);
|
|
62
|
+
}
|
|
63
|
+
function codesOf(raw, dimension, count) {
|
|
64
|
+
if (raw === null || raw === void 0) return null;
|
|
65
|
+
if (!isRecord(raw)) invalid("codes must be a map or nil");
|
|
66
|
+
const bits = raw.bits;
|
|
67
|
+
if (bits !== 1 && bits !== 2 && bits !== 4 && bits !== 8) invalid("codes.bits must be 8, 4, 2, or 1", { bits });
|
|
68
|
+
if (!Array.isArray(raw.centroid) || raw.centroid.length !== dimension) {
|
|
69
|
+
invalid("codes.centroid must hold one number per dimension");
|
|
70
|
+
}
|
|
71
|
+
if (!(raw.records instanceof Uint8Array)) invalid("codes.records must be bytes");
|
|
72
|
+
if (raw.records.byteLength !== count * osqRecordBytes(dimension, bits)) {
|
|
73
|
+
invalid("codes.records must hold one record per vector", { count, bytes: raw.records.byteLength });
|
|
74
|
+
}
|
|
75
|
+
return { bits, centroid: raw.centroid.map(Number), records: raw.records };
|
|
76
|
+
}
|
|
77
|
+
function decodeVectorIndexPart(raw) {
|
|
78
|
+
if (!isRecord(raw)) invalid("payload must be a map");
|
|
79
|
+
if (raw.v !== VECTOR_INDEX_PAYLOAD_VERSION) {
|
|
80
|
+
throw new NarsilError(
|
|
81
|
+
ErrorCodes.ENVELOPE_VERSION_MISMATCH,
|
|
82
|
+
`This vector index payload was written in layout ${String(raw.v ?? 1)}, and this build reads layout ${VECTOR_INDEX_PAYLOAD_VERSION} alone`,
|
|
83
|
+
{ version: raw.v ?? 1 }
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
if (typeof raw.fieldName !== "string") invalid("fieldName must be a string");
|
|
87
|
+
if (!isNonNegativeInteger(raw.dimension) || raw.dimension === 0) invalid("dimension must be a positive integer");
|
|
88
|
+
if (!isNonNegativeInteger(raw.part)) invalid("part must be a non-negative integer");
|
|
89
|
+
if (!isNonNegativeInteger(raw.parts) || raw.parts === 0 || raw.part >= raw.parts) {
|
|
90
|
+
invalid("parts must exceed part", { part: raw.part, parts: raw.parts });
|
|
91
|
+
}
|
|
92
|
+
if (!Array.isArray(raw.docIds) || !raw.docIds.every((docId) => typeof docId === "string")) {
|
|
93
|
+
invalid("docIds must be a list of strings");
|
|
94
|
+
}
|
|
95
|
+
if (raw.docIds.length > VECTOR_INDEX_PART_VECTORS) {
|
|
96
|
+
invalid(`a part holds at most ${VECTOR_INDEX_PART_VECTORS} vectors`, { count: raw.docIds.length });
|
|
97
|
+
}
|
|
98
|
+
if (!Array.isArray(raw.graphs) || !raw.graphs.every(isSerializedGraph)) {
|
|
99
|
+
invalid("graphs must be a list of graphs, each holding a list of nodes");
|
|
100
|
+
}
|
|
101
|
+
if (!(raw.vectors instanceof Uint8Array)) invalid("vectors must be bytes");
|
|
102
|
+
if (raw.vectors.byteLength !== raw.docIds.length * raw.dimension * 4) {
|
|
103
|
+
invalid("vectors must hold dimension float32 components per document", {
|
|
104
|
+
count: raw.docIds.length,
|
|
105
|
+
bytes: raw.vectors.byteLength
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
v: VECTOR_INDEX_PAYLOAD_VERSION,
|
|
110
|
+
fieldName: raw.fieldName,
|
|
111
|
+
dimension: raw.dimension,
|
|
112
|
+
part: raw.part,
|
|
113
|
+
parts: raw.parts,
|
|
114
|
+
docIds: raw.docIds,
|
|
115
|
+
graphs: raw.graphs,
|
|
116
|
+
codes: codesOf(raw.codes, raw.dimension, raw.docIds.length),
|
|
117
|
+
vectors: raw.vectors
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function decodeVectorIndexParts(raw) {
|
|
121
|
+
if (!Array.isArray(raw)) invalid("a field must carry a list of parts");
|
|
122
|
+
return raw.map(decodeVectorIndexPart);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// src/vector/vector-index/checkpoint-payload.ts
|
|
126
|
+
var VECTOR_FILE_PAYLOAD_VERSION = 1;
|
|
127
|
+
var VECTOR_GRAPH_PAYLOAD_VERSION = 1;
|
|
128
|
+
var VECTOR_GRAPH_PART_PAYLOAD_VERSION = 2;
|
|
129
|
+
var VECTOR_GRAPH_PART_VECTORS = 16384;
|
|
130
|
+
var VECTOR_FILE_MAX_VECTORS = VECTOR_INDEX_PART_VECTORS;
|
|
131
|
+
var METRICS = ["cosine", "dotProduct", "euclidean"];
|
|
132
|
+
function invalid2(payload, message, details) {
|
|
133
|
+
throw new NarsilError(ErrorCodes.PERSISTENCE_LOAD_FAILED, `Invalid ${payload} payload: ${message}`, details);
|
|
134
|
+
}
|
|
135
|
+
function isRecord2(value) {
|
|
136
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
137
|
+
}
|
|
138
|
+
function isIntegerUpTo(value, highest) {
|
|
139
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= highest;
|
|
140
|
+
}
|
|
141
|
+
function requireVersion(payload, found, expected) {
|
|
142
|
+
if (found === expected) return;
|
|
143
|
+
throw new NarsilError(
|
|
144
|
+
ErrorCodes.ENVELOPE_VERSION_MISMATCH,
|
|
145
|
+
`This ${payload} payload was written in layout ${String(found)}, and this build reads layout ${expected} alone`,
|
|
146
|
+
{ version: found }
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
function decodeVectorFilePayload(raw) {
|
|
150
|
+
const name = "vector file";
|
|
151
|
+
if (!isRecord2(raw)) invalid2(name, "payload must be a map");
|
|
152
|
+
requireVersion(name, raw.v, VECTOR_FILE_PAYLOAD_VERSION);
|
|
153
|
+
if (typeof raw.fieldName !== "string") invalid2(name, "fieldName must be a string");
|
|
154
|
+
if (!isIntegerUpTo(raw.dimension, 65535) || raw.dimension === 0) invalid2(name, "dimension must be a positive uint16");
|
|
155
|
+
if (!Array.isArray(raw.docIds) || !raw.docIds.every((docId) => typeof docId === "string")) {
|
|
156
|
+
invalid2(name, "docIds must be a list of strings");
|
|
157
|
+
}
|
|
158
|
+
if (raw.docIds.length > VECTOR_FILE_MAX_VECTORS) {
|
|
159
|
+
invalid2(name, `a file holds at most ${VECTOR_FILE_MAX_VECTORS} vectors`, { count: raw.docIds.length });
|
|
160
|
+
}
|
|
161
|
+
if (!(raw.vectors instanceof Uint8Array)) invalid2(name, "vectors must be bytes");
|
|
162
|
+
if (raw.vectors.byteLength !== raw.docIds.length * raw.dimension * 4) {
|
|
163
|
+
invalid2(name, "vectors must hold dimension float32 components per document", {
|
|
164
|
+
count: raw.docIds.length,
|
|
165
|
+
bytes: raw.vectors.byteLength
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
v: VECTOR_FILE_PAYLOAD_VERSION,
|
|
170
|
+
fieldName: raw.fieldName,
|
|
171
|
+
dimension: raw.dimension,
|
|
172
|
+
docIds: raw.docIds,
|
|
173
|
+
codes: codesOf(raw.codes, raw.dimension, raw.docIds.length),
|
|
174
|
+
vectors: raw.vectors
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function isMetric(value) {
|
|
178
|
+
return METRICS.some((metric) => metric === value);
|
|
179
|
+
}
|
|
180
|
+
function decodeNumberedGraph(raw, minimumM) {
|
|
181
|
+
const name = "vector graph";
|
|
182
|
+
if (!isRecord2(raw)) invalid2(name, "each graph must be a map");
|
|
183
|
+
const entryPoint = raw.entryPoint ?? null;
|
|
184
|
+
if (entryPoint !== null && !isIntegerUpTo(entryPoint, 4294967295))
|
|
185
|
+
invalid2(name, "entryPoint must be a uint32 or nil");
|
|
186
|
+
if (!isIntegerUpTo(raw.maxLayer, 255)) invalid2(name, "maxLayer must be a uint8");
|
|
187
|
+
if (!isIntegerUpTo(raw.m, MAX_M) || raw.m < minimumM) {
|
|
188
|
+
invalid2(name, `m must be a whole number from ${minimumM} to ${MAX_M}`);
|
|
189
|
+
}
|
|
190
|
+
if (!isIntegerUpTo(raw.efConstruction, 65535)) invalid2(name, "efConstruction must be a uint16");
|
|
191
|
+
if (!isMetric(raw.metric)) invalid2(name, "metric must name a supported metric", { metric: raw.metric });
|
|
192
|
+
if (!(raw.levels instanceof Uint8Array)) invalid2(name, "levels must be bytes");
|
|
193
|
+
if (!(raw.neighbours instanceof Uint8Array)) invalid2(name, "neighbours must be bytes");
|
|
194
|
+
return {
|
|
195
|
+
entryPoint,
|
|
196
|
+
maxLayer: raw.maxLayer,
|
|
197
|
+
m: raw.m,
|
|
198
|
+
efConstruction: raw.efConstruction,
|
|
199
|
+
metric: raw.metric,
|
|
200
|
+
levels: raw.levels,
|
|
201
|
+
neighbours: raw.neighbours
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function decodeVectorGraphPayload(raw) {
|
|
205
|
+
const name = "vector graph";
|
|
206
|
+
if (!isRecord2(raw)) invalid2(name, "payload must be a map");
|
|
207
|
+
requireVersion(name, raw.v, VECTOR_GRAPH_PAYLOAD_VERSION);
|
|
208
|
+
if (typeof raw.fieldName !== "string") invalid2(name, "fieldName must be a string");
|
|
209
|
+
if (!Array.isArray(raw.graphs)) invalid2(name, "graphs must be a list");
|
|
210
|
+
return {
|
|
211
|
+
v: VECTOR_GRAPH_PAYLOAD_VERSION,
|
|
212
|
+
fieldName: raw.fieldName,
|
|
213
|
+
graphs: raw.graphs.map((graph) => decodeNumberedGraph(graph, EARLIER_RELEASE_MIN_M))
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function decodeVectorGraphPartPayload(raw) {
|
|
217
|
+
const name = "vector graph part";
|
|
218
|
+
if (!isRecord2(raw)) invalid2(name, "payload must be a map");
|
|
219
|
+
requireVersion(name, raw.v, VECTOR_GRAPH_PART_PAYLOAD_VERSION);
|
|
220
|
+
if (typeof raw.fieldName !== "string") invalid2(name, "fieldName must be a string");
|
|
221
|
+
if (!Array.isArray(raw.graphs)) invalid2(name, "graphs must be a list");
|
|
222
|
+
return {
|
|
223
|
+
v: VECTOR_GRAPH_PART_PAYLOAD_VERSION,
|
|
224
|
+
fieldName: raw.fieldName,
|
|
225
|
+
graphs: raw.graphs.map((graph) => decodeNumberedGraph(graph, MIN_M))
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function sameGraphHeader(a, b) {
|
|
229
|
+
return a.entryPoint === b.entryPoint && a.maxLayer === b.maxLayer && a.m === b.m && a.efConstruction === b.efConstruction && a.metric === b.metric;
|
|
230
|
+
}
|
|
231
|
+
function assembleGraphParts(parts) {
|
|
232
|
+
const name = "vector graph part";
|
|
233
|
+
const first = parts[0];
|
|
234
|
+
if (first === void 0) invalid2(name, "a field that holds a graph must have at least one part");
|
|
235
|
+
const partLists = first.graphs.map(() => []);
|
|
236
|
+
for (let p = 0; p < parts.length; p++) {
|
|
237
|
+
const part = parts[p];
|
|
238
|
+
const isLast = p === parts.length - 1;
|
|
239
|
+
if (part.fieldName !== first.fieldName || part.graphs.length !== first.graphs.length) {
|
|
240
|
+
invalid2(name, `part ${p} lists other graphs than part 0`, { part: p });
|
|
241
|
+
}
|
|
242
|
+
for (let g = 0; g < part.graphs.length; g++) {
|
|
243
|
+
const graph = part.graphs[g];
|
|
244
|
+
if (!sameGraphHeader(graph, first.graphs[g]))
|
|
245
|
+
invalid2(name, `part ${p} gives graph ${g} other headers`, { part: p });
|
|
246
|
+
const levels = graph.levels.length;
|
|
247
|
+
const fits = isLast ? levels >= 1 && levels <= VECTOR_GRAPH_PART_VECTORS : levels === VECTOR_GRAPH_PART_VECTORS;
|
|
248
|
+
if (!fits) invalid2(name, `part ${p} gives graph ${g} ${levels} bytes of levels`, { part: p, levels });
|
|
249
|
+
partLists[g].push(graph);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const graphs = partLists.map((list) => ({ partSize: VECTOR_GRAPH_PART_VECTORS, parts: list }));
|
|
253
|
+
return { fieldName: first.fieldName, graphs };
|
|
254
|
+
}
|
|
255
|
+
function graphPartsOfEarlierPayload(payload) {
|
|
256
|
+
return {
|
|
257
|
+
fieldName: payload.fieldName,
|
|
258
|
+
graphs: payload.graphs.map((graph) => ({ partSize: Math.max(graph.levels.length, 1), parts: [graph] }))
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export { NO_LIVE_VECTOR_AT_POSITION, VECTOR_FILE_MAX_VECTORS, VECTOR_FILE_PAYLOAD_VERSION, VECTOR_GRAPH_PART_PAYLOAD_VERSION, VECTOR_GRAPH_PART_VECTORS, assembleGraphParts, bytesToVectors, countDead, deadBitsWhere, deadBytesFor, decodeVectorFilePayload, decodeVectorGraphPartPayload, decodeVectorGraphPayload, decodeVectorIndexParts, graphPartsOfEarlierPayload, isDead, vectorsToBytes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PartitionConfig, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-
|
|
2
|
-
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult } from './memory-
|
|
3
|
-
import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-
|
|
1
|
+
import { P as PartitionConfig, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-DtsgmNfU.js';
|
|
2
|
+
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult } from './memory-CV9NAxLY.js';
|
|
3
|
+
import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-BGaZJyoY.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* This is the `fetch` implementation the client sends every request through.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-
|
|
2
|
-
export { A as ASYNC_IMPORT_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './capabilities-
|
|
3
|
-
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-
|
|
4
|
-
export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-
|
|
5
|
-
import './schema-
|
|
1
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-CV9NAxLY.js';
|
|
2
|
+
export { A as ASYNC_IMPORT_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './capabilities-SJPttcgQ.js';
|
|
3
|
+
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-BGaZJyoY.js';
|
|
4
|
+
export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-BMK53IR2.js';
|
|
5
|
+
import './schema-DtsgmNfU.js';
|
|
6
6
|
import './adapters-79OIa4xm.js';
|
|
7
|
-
import './config-
|
|
8
|
-
import './config-
|
|
9
|
-
import './index-
|
|
7
|
+
import './config-UJx1dyX1.js';
|
|
8
|
+
import './config-BUR-7eVQ.js';
|
|
9
|
+
import './index-vCMu8OeQ.js';
|
|
10
10
|
import './types-Cb9kiY5P.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
-
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-
|
|
3
|
-
import { I as IndexConfig, A as AnyDocument } from './schema-
|
|
2
|
+
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-CV9NAxLY.js';
|
|
3
|
+
import { I as IndexConfig, A as AnyDocument } from './schema-DtsgmNfU.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Hooks that the engine calls alongside its own work, so that an application
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NarsilConfig } from './config-
|
|
2
|
-
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-
|
|
1
|
+
import { N as NarsilConfig } from './config-BUR-7eVQ.js';
|
|
2
|
+
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-vCMu8OeQ.js';
|
|
3
3
|
import { N as NodeTransport } from './types-Cb9kiY5P.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { createDirectExecutor } from './chunk-XBXKPWMR.mjs';
|
|
2
|
+
import './chunk-SYRFSF6V.mjs';
|
|
3
|
+
import './chunk-PR4O7CAP.mjs';
|
|
4
|
+
import './chunk-TGP5M5R7.mjs';
|
|
5
|
+
import './chunk-T6CNO72J.mjs';
|
|
6
|
+
import './chunk-WQBCBKY3.mjs';
|
|
7
|
+
import './chunk-PSUJCOSE.mjs';
|
|
8
|
+
import './chunk-CVQWQVFX.mjs';
|
|
9
|
+
import './chunk-FGMGUDHX.mjs';
|
|
10
|
+
import './chunk-KEHK2O6P.mjs';
|
|
11
|
+
import './chunk-GES7U2PM.mjs';
|
|
12
|
+
import './chunk-BVOJIYRV.mjs';
|
|
13
|
+
import './chunk-U2BKYEC7.mjs';
|
|
14
|
+
import './chunk-R6A773WK.mjs';
|
|
15
|
+
import './chunk-YTJCGKM4.mjs';
|
|
16
|
+
import './chunk-R7OSDAFK.mjs';
|
|
17
|
+
import './chunk-L5ORED7V.mjs';
|
|
18
|
+
import './chunk-TPJU7NDJ.mjs';
|
package/dist/distribution.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-
|
|
2
|
-
export { c as ClusterControllerConfig, d as ClusterMemoryConfig, e as ClusterNodeInfo, f as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-
|
|
3
|
-
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-
|
|
4
|
-
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-
|
|
5
|
-
import { b as NodeCapacity, N as NodeRole } from './index-
|
|
6
|
-
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexPartitionBytes, e as NodeEvent, f as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, g as PartitionState, S as SchemaEvent, U as UnassignedReason } from './index-
|
|
7
|
-
import { N as Narsil } from './engine-
|
|
1
|
+
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-UJx1dyX1.js';
|
|
2
|
+
export { c as ClusterControllerConfig, d as ClusterMemoryConfig, e as ClusterNodeInfo, f as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-UJx1dyX1.js';
|
|
3
|
+
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-CV9NAxLY.js';
|
|
4
|
+
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-DtsgmNfU.js';
|
|
5
|
+
import { b as NodeCapacity, N as NodeRole } from './index-vCMu8OeQ.js';
|
|
6
|
+
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexPartitionBytes, e as NodeEvent, f as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, g as PartitionState, S as SchemaEvent, U as UnassignedReason } from './index-vCMu8OeQ.js';
|
|
7
|
+
import { N as Narsil } from './engine-9X6W5naj.js';
|
|
8
8
|
export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-Cb9kiY5P.js';
|
|
9
|
-
import './config-
|
|
9
|
+
import './config-BUR-7eVQ.js';
|
|
10
10
|
import './adapters-79OIa4xm.js';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/distribution.mjs
CHANGED
|
@@ -1,29 +1,44 @@
|
|
|
1
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-K4OWQ2M3.mjs';
|
|
2
|
+
import { indexMetadataOf, loadPartitionSegments } from './chunk-JFJBA3PD.mjs';
|
|
1
3
|
import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
|
|
2
|
-
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
4
|
+
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-URGLSNKR.mjs';
|
|
5
|
+
import './chunk-MXS5HWIH.mjs';
|
|
6
|
+
import { decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-YCJLVNWR.mjs';
|
|
7
|
+
import './chunk-ULRPNYAG.mjs';
|
|
8
|
+
import './chunk-37CD3OKS.mjs';
|
|
9
|
+
import './chunk-DJHHF2L5.mjs';
|
|
10
|
+
import { validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, createForwardBatchResultMessage, readListedFile, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage, computeEntryChecksum, createEntryMessage, createEntryBatchMessage, createInsyncConfirmMessage, validateAckPayload, createInsyncRemoveMessage, validateInsyncConfirmPayload, createInsyncAddMessage } from './chunk-T7DMUVTL.mjs';
|
|
11
|
+
import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-IKST36MA.mjs';
|
|
5
12
|
import { ReplicationMessageTypes, TransportErrorCodes, ClusterMessageTypes, QueryMessageTypes, TransportError } from './chunk-GCM3JFVA.mjs';
|
|
6
|
-
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
13
|
+
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
|
|
14
|
+
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, createByteReader, openChecksummedEnvelope, crc32Init, crc32Final, crc32Update } from './chunk-AQU2QHSY.mjs';
|
|
15
|
+
import { generateId, readHeapStatistics } from './chunk-XBXKPWMR.mjs';
|
|
16
|
+
import { now, listBindingOf, requireSurfaceFormsForPartialFields, queryBindingOf, hitsKeptPerGroup, clampLimit, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-AXDAS2VA.mjs';
|
|
17
|
+
import { oversampledShardSize, resolveProjection, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, normalizeSort, sortModesOf, encodePageCursor, applyProjection, readSortValues, requireWithinResultWindow, fnv1a, sortSignatureEntry, FILTER_EXPRESSION_KEYS, filterTestCount, fnv1aUint32s, mergePartitionStats, FIELD_FILTER_OPERATORS } from './chunk-SYRFSF6V.mjs';
|
|
18
|
+
import { providedDocId } from './chunk-J2BPXTD7.mjs';
|
|
19
|
+
import { getLanguage } from './chunk-PR4O7CAP.mjs';
|
|
20
|
+
import './chunk-RVM7AODE.mjs';
|
|
21
|
+
import './chunk-AV4IJKD2.mjs';
|
|
22
|
+
import { DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, MAX_INDEX_NAME_LENGTH, MAX_DOC_ID_LENGTH, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, INDEX_NAME_PATTERN } from './chunk-Q5DC6WAB.mjs';
|
|
11
23
|
import './chunk-TGP5M5R7.mjs';
|
|
12
|
-
import './chunk-
|
|
24
|
+
import './chunk-Y2F66IQJ.mjs';
|
|
13
25
|
import { MIN_OVERSAMPLE } from './chunk-ZJ4CSAB2.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import { isPatternTolerance } from './chunk-
|
|
26
|
+
import './chunk-QZN3MIJ3.mjs';
|
|
27
|
+
import { isPatternTolerance } from './chunk-T6CNO72J.mjs';
|
|
16
28
|
import { MAX_FILTER_DEPTH, MAX_FILTER_TESTS, MAX_FILTER_ARRAY_SIZE } from './chunk-WQBCBKY3.mjs';
|
|
17
|
-
import './chunk-
|
|
18
|
-
import { validateSchema, requireCreatableSchema,
|
|
29
|
+
import './chunk-PSUJCOSE.mjs';
|
|
30
|
+
import { validateSchema, requireCreatableSchema, encodeDocument, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES } from './chunk-CVQWQVFX.mjs';
|
|
31
|
+
import { DEFAULT_PAGE_SIZE, MAX_SORT_FIELDS, MAX_CURSOR_LENGTH, MAX_TOLERANCE, MAX_PREFIX_LENGTH, RESULT_WINDOW } from './chunk-FGMGUDHX.mjs';
|
|
19
32
|
import './chunk-KEHK2O6P.mjs';
|
|
20
33
|
import './chunk-GES7U2PM.mjs';
|
|
21
|
-
import
|
|
34
|
+
import './chunk-BVOJIYRV.mjs';
|
|
22
35
|
import './chunk-U2BKYEC7.mjs';
|
|
23
36
|
import { toComparableSortValue, compareComparableKeys, isSortMode, SORT_MODES, compareSortValues } from './chunk-R6A773WK.mjs';
|
|
24
37
|
import { compareCodePoints, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
25
38
|
import { collectAndReturnPages } from './chunk-5XNIRLFC.mjs';
|
|
26
39
|
import './chunk-YRX6XMOQ.mjs';
|
|
40
|
+
import './chunk-R7OSDAFK.mjs';
|
|
41
|
+
import { MAX_STORED_VECTOR_DIMENSION, MAX_NESTING_DEPTH } from './chunk-L5ORED7V.mjs';
|
|
27
42
|
import { ErrorCodes, NarsilError, describeError } from './chunk-TPJU7NDJ.mjs';
|
|
28
43
|
import { decode, encode } from '@msgpack/msgpack';
|
|
29
44
|
import { randomUUID } from 'crypto';
|
|
@@ -5802,7 +5817,7 @@ async function restoreReplicationPartition(core, engine, indexName, partitionId,
|
|
|
5802
5817
|
async function createClusterLocalEngine(config, hooks) {
|
|
5803
5818
|
requireKnownConfig(config);
|
|
5804
5819
|
const runnableConfig = await resolveRunnableConfig(config);
|
|
5805
|
-
const core = createEngineCore(runnableConfig, hooks, "partition");
|
|
5820
|
+
const core = await createEngineCore(runnableConfig, hooks, "partition");
|
|
5806
5821
|
await startEngineCore(core, runnableConfig);
|
|
5807
5822
|
core.orchestrator.shareMainThread();
|
|
5808
5823
|
const engine = createNarsilFromCore(core, runnableConfig);
|