@delali/narsil 0.3.1-next.86 → 0.3.1-next.88
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-3GZQKGVQ.mjs +2719 -0
- package/dist/browser/chunk-3ZRMZIH4.mjs +3959 -0
- package/dist/browser/chunk-FHFFWLEK.mjs +669 -0
- package/dist/browser/chunk-HOZW3PKP.mjs +9 -0
- package/dist/browser/chunk-JACCR3BJ.mjs +602 -0
- package/dist/browser/chunk-NQW2YXEX.mjs +346 -0
- package/dist/browser/chunk-RAHUQOJL.mjs +24103 -0
- package/dist/browser/durability-wiring-VSUBLUDK.mjs +3250 -0
- package/dist/browser/module-E25UDADM.mjs +2766 -0
- package/dist/browser/snapshot-5MXBEDXF.mjs +888 -0
- package/dist/browser/write-6SBYTS62.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-4VBG6PEH.mjs → chunk-A3UB2MXL.mjs} +175 -124
- package/dist/{chunk-OLXM65YH.mjs → chunk-AV4IJKD2.mjs} +1 -18
- package/dist/{chunk-LS5IRM23.mjs → chunk-BVOJIYRV.mjs} +2 -25
- package/dist/chunk-C7SLA6CM.mjs +19 -0
- package/dist/chunk-CL4OM7GB.mjs +522 -0
- package/dist/{chunk-KJ7LB3TR.mjs → chunk-CVQWQVFX.mjs} +3 -22
- package/dist/{chunk-4D6OH4EF.mjs → chunk-DCK4P5BI.mjs} +32 -32
- package/dist/chunk-DJHHF2L5.mjs +17 -0
- package/dist/{chunk-XPK3GB2P.mjs → chunk-EMXAYPTQ.mjs} +1776 -3336
- package/dist/chunk-FGMGUDHX.mjs +21 -0
- package/dist/{chunk-2453RJYK.mjs → chunk-J2BPXTD7.mjs} +167 -176
- package/dist/chunk-L5ORED7V.mjs +25 -0
- package/dist/chunk-MWJIAREY.mjs +614 -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-ZCKPRCYI.mjs → chunk-Q5DC6WAB.mjs} +1 -1
- package/dist/chunk-QAMUC2BJ.mjs +1730 -0
- package/dist/{chunk-NFF5TDRG.mjs → chunk-QZN3MIJ3.mjs} +1 -16
- package/dist/chunk-R6BMMQXH.mjs +7316 -0
- package/dist/chunk-R7OSDAFK.mjs +44 -0
- package/dist/chunk-RVM7AODE.mjs +73 -0
- package/dist/chunk-S4LQDSUL.mjs +462 -0
- package/dist/{chunk-SREPGC6O.mjs → chunk-T6CNO72J.mjs} +1 -1
- 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-V7YUSKKZ.mjs +703 -0
- package/dist/chunk-VY4DXZ5P.mjs +631 -0
- package/dist/{chunk-XYDP7CCJ.mjs → chunk-X4SEXL4U.mjs} +54 -14
- 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-EGESD26S.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 +35 -33
- package/dist/durability-wiring-ZLRQU6FG.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-22CUEYYW.mjs +469 -0
- package/dist/{tasks-DGyz586z.d.ts → tasks-BGaZJyoY.d.ts} +1 -1
- package/dist/{thread-EUUNJNKU.mjs → thread-ZP3UMIZT.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-PXDKPG2R.mjs +233 -0
- package/package.json +17 -8
- package/dist/chunk-IDLP54FH.mjs +0 -15198
- package/dist/direct-executor-SI2QV4YI.mjs +0 -19
- package/dist/simd-DW5AtJ6B.d.ts +0 -41
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, bitsetIsEmpty, createBitSet, bitsetSet, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-
|
|
1
|
+
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, bitsetIsEmpty, createBitSet, bitsetSet, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-T6CNO72J.mjs';
|
|
2
2
|
import { GEO_UNIT_METRES, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, FILTER_OPERAND_COPY_DEPTH } from './chunk-WQBCBKY3.mjs';
|
|
3
|
-
import { getFlatSchema, tokenize, partialWordSearchModule
|
|
4
|
-
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, partialFieldsOf, schemaFieldsOf, flattenSchema,
|
|
3
|
+
import { getFlatSchema, tokenize, partialWordSearchModule } from './chunk-A3UB2MXL.mjs';
|
|
4
|
+
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, partialFieldsOf, schemaFieldsOf, flattenSchema, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, FULL_TURN_DEGREES, ANTIMERIDIAN_SPAN_DEGREES, DEG_TO_RAD, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS } from './chunk-CVQWQVFX.mjs';
|
|
5
|
+
import { MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, RESULT_WINDOW, DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_PAGE_SIZE, PREFIX_MAX_EXPANSIONS } from './chunk-FGMGUDHX.mjs';
|
|
5
6
|
import { fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
6
|
-
import { parsedTypeOf, isStringValuedBase, withSortableOption,
|
|
7
|
+
import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedFieldType } from './chunk-BVOJIYRV.mjs';
|
|
7
8
|
import { singleFoldTable, appendFoldedCodePoint, sortModeOf, defaultSortMode, SORT_VALUE_MAX_CODE_POINTS, toReducedSortValue, readSortField, compareComparableKeys, toComparableSortValue, isSortMode, SORT_MODES, compareSortValues } from './chunk-R6A773WK.mjs';
|
|
8
9
|
import { compareCodePoints, exceedsCodePoints, codePointCount, holdsUnpairedSurrogate } from './chunk-YTJCGKM4.mjs';
|
|
10
|
+
import { isGeopointOrVectorType, PROTOTYPE_POLLUTION_KEYS } from './chunk-L5ORED7V.mjs';
|
|
9
11
|
import { NarsilError, ErrorCodes } from './chunk-TPJU7NDJ.mjs';
|
|
10
12
|
|
|
11
13
|
// src/core/partition/partial-words/platform.ts
|
|
@@ -486,6 +488,7 @@ function ordinalBitsetOf(state, matched) {
|
|
|
486
488
|
return bitset;
|
|
487
489
|
}
|
|
488
490
|
function* matchedFieldValues(state, fieldPath, matched) {
|
|
491
|
+
const read = state.docStore.fieldReader(fieldPath);
|
|
489
492
|
if ("ordinalBitset" in matched) {
|
|
490
493
|
const bits = matched.ordinalBitset;
|
|
491
494
|
for (let wordIndex = 0; wordIndex < bits.length; wordIndex++) {
|
|
@@ -494,14 +497,15 @@ function* matchedFieldValues(state, fieldPath, matched) {
|
|
|
494
497
|
const base = wordIndex << 5;
|
|
495
498
|
while (word !== 0) {
|
|
496
499
|
const trailingZeros = Math.clz32(word & -word) ^ 31;
|
|
497
|
-
yield
|
|
500
|
+
yield read(base + trailingZeros);
|
|
498
501
|
word &= word - 1;
|
|
499
502
|
}
|
|
500
503
|
}
|
|
501
504
|
return;
|
|
502
505
|
}
|
|
503
506
|
for (const docId of matched) {
|
|
504
|
-
|
|
507
|
+
const internalId = state.docStore.getInternalId(docId);
|
|
508
|
+
yield internalId === void 0 ? void 0 : read(internalId);
|
|
505
509
|
}
|
|
506
510
|
}
|
|
507
511
|
function countValuesFromDocuments(state, fieldPath, matched) {
|
|
@@ -2092,6 +2096,25 @@ function fanOutMatchCount(manager, params, language, schema, options) {
|
|
|
2092
2096
|
}
|
|
2093
2097
|
|
|
2094
2098
|
// src/core/projection.ts
|
|
2099
|
+
function requireFieldPathList(paths, option) {
|
|
2100
|
+
if (paths === void 0) return;
|
|
2101
|
+
if (!Array.isArray(paths)) {
|
|
2102
|
+
throw new NarsilError(
|
|
2103
|
+
ErrorCodes.SEARCH_INVALID_FIELD,
|
|
2104
|
+
`The "document.${option}" option takes an array of field paths`,
|
|
2105
|
+
{ option: `document.${option}`, received: paths === null ? "null" : typeof paths }
|
|
2106
|
+
);
|
|
2107
|
+
}
|
|
2108
|
+
for (let position = 0; position < paths.length; position++) {
|
|
2109
|
+
const entry = paths[position];
|
|
2110
|
+
if (typeof entry === "string") continue;
|
|
2111
|
+
throw new NarsilError(
|
|
2112
|
+
ErrorCodes.SEARCH_INVALID_FIELD,
|
|
2113
|
+
`The "document.${option}" option takes field paths as strings, and entry ${position} is not a string`,
|
|
2114
|
+
{ option: `document.${option}`, position, received: entry === null ? "null" : typeof entry }
|
|
2115
|
+
);
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2095
2118
|
function splitPaths(paths) {
|
|
2096
2119
|
if (!paths) return [];
|
|
2097
2120
|
const split = [];
|
|
@@ -2117,7 +2140,7 @@ function covers(outer, inner) {
|
|
|
2117
2140
|
}
|
|
2118
2141
|
return true;
|
|
2119
2142
|
}
|
|
2120
|
-
function
|
|
2143
|
+
function readProjectedPath(source, path) {
|
|
2121
2144
|
let current = source;
|
|
2122
2145
|
for (const segment of path) {
|
|
2123
2146
|
if (typeof current !== "object" || current === null || Array.isArray(current))
|
|
@@ -2165,7 +2188,12 @@ function cloneExcept(value, path, exclude) {
|
|
|
2165
2188
|
for (const key of Object.keys(source)) {
|
|
2166
2189
|
const childPath = [...path, key];
|
|
2167
2190
|
if (exclude.some((excluded) => covers(excluded, childPath))) continue;
|
|
2168
|
-
kept
|
|
2191
|
+
Object.defineProperty(kept, key, {
|
|
2192
|
+
value: cloneExcept(source[key], childPath, exclude),
|
|
2193
|
+
enumerable: true,
|
|
2194
|
+
writable: true,
|
|
2195
|
+
configurable: true
|
|
2196
|
+
});
|
|
2169
2197
|
}
|
|
2170
2198
|
return kept;
|
|
2171
2199
|
}
|
|
@@ -2173,6 +2201,8 @@ function resolveProjection(projection) {
|
|
|
2173
2201
|
if (projection === void 0 || projection === true) return { kind: "full" };
|
|
2174
2202
|
if (projection === false) return { kind: "none" };
|
|
2175
2203
|
if (typeof projection !== "object" || projection === null) return { kind: "full" };
|
|
2204
|
+
requireFieldPathList(projection.include, "include");
|
|
2205
|
+
requireFieldPathList(projection.exclude, "exclude");
|
|
2176
2206
|
const askedInclude = Array.isArray(projection.include) && projection.include.length > 0;
|
|
2177
2207
|
const askedExclude = Array.isArray(projection.exclude) && projection.exclude.length > 0;
|
|
2178
2208
|
if (!askedInclude && !askedExclude) return { kind: "full" };
|
|
@@ -2194,12 +2224,15 @@ function cloneProjected(document, projection) {
|
|
|
2194
2224
|
if (projection === void 0 || projection.kind === "full") return structuredClone(document);
|
|
2195
2225
|
if (projection.kind === "none") return {};
|
|
2196
2226
|
if (projection.include === null) return cloneExcept(document, [], projection.exclude);
|
|
2227
|
+
return projectIncludedPaths(projection.include, projection.exclude, (path) => readProjectedPath(document, path));
|
|
2228
|
+
}
|
|
2229
|
+
function projectIncludedPaths(include, exclude, read) {
|
|
2197
2230
|
const projected = {};
|
|
2198
|
-
for (const path of
|
|
2199
|
-
if (
|
|
2200
|
-
const { found, value } =
|
|
2231
|
+
for (const path of include) {
|
|
2232
|
+
if (exclude.some((excluded) => covers(excluded, path))) continue;
|
|
2233
|
+
const { found, value } = read(path);
|
|
2201
2234
|
if (!found) continue;
|
|
2202
|
-
writePath(projected, path, cloneExcept(value, path,
|
|
2235
|
+
writePath(projected, path, cloneExcept(value, path, exclude));
|
|
2203
2236
|
}
|
|
2204
2237
|
return projected;
|
|
2205
2238
|
}
|
|
@@ -2210,7 +2243,7 @@ function applyProjection(document, projection) {
|
|
|
2210
2243
|
if (projection.include) {
|
|
2211
2244
|
projected = {};
|
|
2212
2245
|
for (const path of projection.include) {
|
|
2213
|
-
const { found, value } =
|
|
2246
|
+
const { found, value } = readProjectedPath(document, path);
|
|
2214
2247
|
if (found) writePath(projected, path, value);
|
|
2215
2248
|
}
|
|
2216
2249
|
} else {
|
|
@@ -2266,5 +2299,12 @@ function setNestedValue(obj, path, value) {
|
|
|
2266
2299
|
}
|
|
2267
2300
|
current[segments[segments.length - 1]] = value;
|
|
2268
2301
|
}
|
|
2302
|
+
function copyVectorsInto(document, docId, vectorIndexes, projection) {
|
|
2303
|
+
for (const [fieldPath, vectorIndex] of vectorIndexes) {
|
|
2304
|
+
if (projection !== void 0 && !projectionKeepsField(projection, fieldPath)) continue;
|
|
2305
|
+
const vector = vectorIndex.getVector(docId);
|
|
2306
|
+
if (vector) setNestedValue(document, fieldPath, vector);
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2269
2309
|
|
|
2270
|
-
export { FIELD_FILTER_OPERATORS, FILTER_EXPRESSION_KEYS, PATTERN_HOST, applyPagination, applyProjection, applySorting, availablePatternSearch, buildPartialWordTableFrom, clampRowCount, cloneProjected, collectQueryTermStats, computeFacets, countPartialSpelling, countsWithoutScores, coveringRanges, createFrozenPartialWords, createGrowingPartialWords, createPatternWorkMeter, decodePageCursor, encodePageCursor, encodePartialSpellingsOf, everyValueFacetConfig, expandPartialWords, fanOutMatchCount, fanOutQuery, filterTestCount, fnv1a, fnv1aBytes, fnv1aUint32s, fulltextMatches, joinPatternWorkMeter, kWayMerge, locationCode, mergeFacets, mergePartitionStats, normalizeSort, oversampledFacetConfig, oversampledShardSize, partialSpellingsOfDocuments, partialWordHighlighter, partialWordsToHighlight, partitionsIn, patternIndexOf, polygonBoxes, polygonContainment, projectionKeepsField, pruneStatsToQueryTerms, radiusBoxes, readSortValues, registerPartialWordSearch, registerPatternSearch, requireMatchingCursor, requirePartialWordSearchFor, requirePatternSearch, requirePatternSearchFor, requireSortableFields, requireWithinResultWindow, resolveProjection, sanitizeGlobalStats, setNestedValue, sortModesOf, sortSignatureEntry, sortSignatureOf, undeclaredFieldOnStrictIndex, undeclaredFilterField, validatedFilterOf };
|
|
2310
|
+
export { FIELD_FILTER_OPERATORS, FILTER_EXPRESSION_KEYS, PATTERN_HOST, applyPagination, applyProjection, applySorting, availablePatternSearch, buildPartialWordTableFrom, clampRowCount, cloneProjected, collectQueryTermStats, computeFacets, copyVectorsInto, countPartialSpelling, countsWithoutScores, coveringRanges, createFrozenPartialWords, createGrowingPartialWords, createPatternWorkMeter, decodePageCursor, encodePageCursor, encodePartialSpellingsOf, everyValueFacetConfig, expandPartialWords, fanOutMatchCount, fanOutQuery, filterTestCount, fnv1a, fnv1aBytes, fnv1aUint32s, fulltextMatches, joinPatternWorkMeter, kWayMerge, locationCode, mergeFacets, mergePartitionStats, normalizeSort, oversampledFacetConfig, oversampledShardSize, partialSpellingsOfDocuments, partialWordHighlighter, partialWordsToHighlight, partitionsIn, patternIndexOf, polygonBoxes, polygonContainment, projectIncludedPaths, projectionKeepsField, pruneStatsToQueryTerms, radiusBoxes, readProjectedPath, readSortValues, registerPartialWordSearch, registerPatternSearch, requireMatchingCursor, requirePartialWordSearchFor, requirePatternSearch, requirePatternSearchFor, requireSortableFields, requireWithinResultWindow, resolveProjection, sanitizeGlobalStats, setNestedValue, sortModesOf, sortSignatureEntry, sortSignatureOf, undeclaredFieldOnStrictIndex, undeclaredFilterField, validatedFilterOf };
|
|
@@ -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-EMXAYPTQ.mjs';
|
|
2
|
+
import './chunk-X4SEXL4U.mjs';
|
|
3
|
+
import './chunk-PR4O7CAP.mjs';
|
|
4
|
+
import './chunk-TGP5M5R7.mjs';
|
|
5
|
+
import './chunk-T6CNO72J.mjs';
|
|
6
|
+
import './chunk-WQBCBKY3.mjs';
|
|
7
|
+
import './chunk-A3UB2MXL.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
|
/**
|