@delali/narsil 0.3.1-next.107 → 0.3.1-next.109
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/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/browser/{chunk-PA56PRWX.mjs → chunk-3RXEGUGO.mjs} +2 -2
- package/dist/browser/{chunk-J3QB4LBD.mjs → chunk-EQ7BQ6VZ.mjs} +1 -0
- package/dist/browser/{chunk-JJKVYLL3.mjs → chunk-RYWURYTW.mjs} +1 -1
- package/dist/browser/{chunk-OL7S2KLL.mjs → chunk-S7KNCVPU.mjs} +2 -2
- package/dist/browser/{chunk-WZUSMF7A.mjs → chunk-SCBBEQWD.mjs} +14 -13
- package/dist/browser/{chunk-NNQPZPTB.mjs → chunk-XHRHOH2P.mjs} +5 -5
- package/dist/browser/{chunk-OKZGAJEF.mjs → chunk-Z2K5AGZL.mjs} +3 -3
- package/dist/browser/{durability-wiring-HFQULBSA.mjs → durability-wiring-JJGE7MED.mjs} +6 -6
- package/dist/browser/{module-VROKZ7IZ.mjs → module-PCKQADMQ.mjs} +5 -5
- package/dist/browser/{restore-queue-EU77FRCV.mjs → restore-queue-2STSWU2E.mjs} +1 -1
- package/dist/browser/{runtime-JQYPNOK6.mjs → runtime-ARKW5NZX.mjs} +1 -1
- package/dist/browser/{snapshot-G77LQBZX.mjs → snapshot-3AZDQKNA.mjs} +7 -7
- package/dist/browser/{write-RUC64JIH.mjs → write-XXLMPT3Y.mjs} +5 -5
- package/dist/{capabilities-ByKPha_q.d.ts → capabilities-D4MUmjfe.d.ts} +2 -2
- package/dist/{chunk-7IBX2LRA.mjs → chunk-4GD43FSW.mjs} +11 -11
- package/dist/{chunk-HAQUJYMN.mjs → chunk-5DPTHLMX.mjs} +14 -8
- package/dist/{chunk-RI5VNFAI.mjs → chunk-5LP7OU6B.mjs} +2 -2
- package/dist/{chunk-IA6I5U36.mjs → chunk-5W7ADHK7.mjs} +1 -1
- package/dist/{chunk-WXVTQ6NO.mjs → chunk-62GK7UUS.mjs} +3 -3
- package/dist/{chunk-VVDQNCOG.mjs → chunk-6OXNHLNZ.mjs} +1 -0
- package/dist/{chunk-DNKM67DF.mjs → chunk-A2HWRBQE.mjs} +2 -2
- package/dist/{chunk-VVFKFHWE.mjs → chunk-AWZVJCCW.mjs} +2 -2
- package/dist/{chunk-2MNJ2HX7.mjs → chunk-C55OFKU6.mjs} +2 -2
- package/dist/{chunk-FEOLYA2Y.mjs → chunk-C57FPCTL.mjs} +6 -6
- package/dist/{chunk-VHPVBJOI.mjs → chunk-CKRP7GCS.mjs} +1 -1
- package/dist/{chunk-WCJJCBR4.mjs → chunk-CYXLPFBG.mjs} +8 -8
- package/dist/{chunk-WCNN2PLX.mjs → chunk-FN75BCXC.mjs} +1 -1
- package/dist/{chunk-77SO7G55.mjs → chunk-FV5CP3E2.mjs} +1 -1
- package/dist/{chunk-UM6Z7AIP.mjs → chunk-H5465KUZ.mjs} +3 -3
- package/dist/{chunk-NRARRUKN.mjs → chunk-HL2GAS5N.mjs} +7 -7
- package/dist/{chunk-MZW4V4DS.mjs → chunk-IBJWO5PF.mjs} +1 -1
- package/dist/{chunk-CKNOGER5.mjs → chunk-ICZW4J3I.mjs} +23 -22
- package/dist/{chunk-G6YATIRT.mjs → chunk-JKOBHB4A.mjs} +2 -2
- package/dist/{chunk-QALAFGF5.mjs → chunk-LWQTFKRS.mjs} +1 -1
- package/dist/{chunk-BRIOLMIX.mjs → chunk-MVWWAHTR.mjs} +1 -1
- package/dist/{chunk-M5EZVXIM.mjs → chunk-N75MAOM7.mjs} +2 -2
- package/dist/{chunk-AEF2O7B4.mjs → chunk-NYWUBTMH.mjs} +1 -1
- package/dist/{chunk-IA3H54X4.mjs → chunk-PA5WZWLC.mjs} +2 -2
- package/dist/{chunk-CYHQNM3T.mjs → chunk-RQ7LOBLD.mjs} +1 -1
- package/dist/{chunk-QA6F5MML.mjs → chunk-RSSLOFRP.mjs} +6 -6
- package/dist/{chunk-6JUOMMHQ.mjs → chunk-S2CKO6PP.mjs} +1 -0
- package/dist/{chunk-JSSGO4B5.mjs → chunk-SAZB7ZHT.mjs} +1 -1
- package/dist/{chunk-MJIJG4YT.mjs → chunk-SD2EYVU4.mjs} +2 -2
- package/dist/{chunk-5FPMDU54.mjs → chunk-SOADQINJ.mjs} +8 -1
- package/dist/{chunk-VWFFCDOL.mjs → chunk-SYHS56F7.mjs} +6 -6
- package/dist/{chunk-OKZPYJZX.mjs → chunk-U6FT7LKG.mjs} +3 -3
- package/dist/{chunk-IZLM2OOO.mjs → chunk-VIXXQEX6.mjs} +4 -4
- package/dist/{chunk-3BRFOMGX.mjs → chunk-XY6Z7T5W.mjs} +2 -2
- package/dist/{chunk-KOCHOOS5.mjs → chunk-YP23IAV5.mjs} +4 -3
- package/dist/{chunk-HNAQNAFS.mjs → chunk-ZBZRBM2Z.mjs} +3 -3
- package/dist/{client-DI-xIXgR.d.ts → client-Ba9yP-Rr.d.ts} +2 -2
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +1 -0
- package/dist/{config-DL_bDDD8.d.ts → config-C-xXz8bC.d.ts} +1 -1
- package/dist/{config-BZ_e3X8w.d.ts → config-Dc_8-byz.d.ts} +1 -1
- package/dist/{direct-executor-BPBD2PBK.mjs → direct-executor-QH2M6AK2.mjs} +12 -12
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +5 -5
- package/dist/distribution.mjs +609 -132
- package/dist/{durability-wiring-AZL4EFLO.mjs → durability-wiring-4HWX7OVP.mjs} +24 -24
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-D_SYDsId.d.ts → engine-CMZ5XSLy.d.ts} +1 -1
- package/dist/{events-C7_dboUr.d.ts → events-dnvgprIl.d.ts} +1 -0
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +17 -17
- package/dist/{module-6EY7GW2W.mjs → module-IYILOTU3.mjs} +9 -9
- package/dist/partial-words.mjs +5 -5
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.mjs +20 -20
- package/dist/react.d.ts +6 -6
- package/dist/react.mjs +1 -0
- package/dist/{rerank-WVFFZV76.mjs → rerank-EHJVXEDP.mjs} +7 -7
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{restore-queue-DDXFDP7U.mjs → restore-queue-BONSQWCI.mjs} +1 -1
- package/dist/{runtime-AVUUCJWQ.mjs → runtime-LEX2F7OW.mjs} +5 -5
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +16 -15
- package/dist/{snapshot-IDAM65JO.mjs → snapshot-DWDLN5YW.mjs} +26 -26
- package/dist/synonyms.mjs +3 -3
- package/dist/{tasks-BhjQZ8Qf.d.ts → tasks-B4B2cMK5.d.ts} +1 -1
- package/dist/{thread-LMSYLCPI.mjs → thread-I32PUURR.mjs} +13 -13
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +6 -6
- package/dist/{write-3LIFIGOL.mjs → write-AOFSHACR.mjs} +19 -19
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, getNestedValue, requireValidFieldTypes, VECTOR_PATTERN } from './chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, getNestedValue, requireValidFieldTypes, VECTOR_PATTERN } from './chunk-SCBBEQWD.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-EQ7BQ6VZ.mjs';
|
|
3
3
|
import { decode } from '@msgpack/msgpack';
|
|
4
4
|
|
|
5
5
|
function applyIndexEntry(entry, manager, vectorFieldPaths, vecIndexes) {
|
|
@@ -49,6 +49,7 @@ var ErrorCodes = {
|
|
|
49
49
|
QUERY_PARTIAL_FAILURE: "QUERY_PARTIAL_FAILURE",
|
|
50
50
|
QUERY_NODE_TIMEOUT: "QUERY_NODE_TIMEOUT",
|
|
51
51
|
QUERY_NO_ACTIVE_REPLICA: "QUERY_NO_ACTIVE_REPLICA",
|
|
52
|
+
SEARCH_CONTEXT_MISSING: "SEARCH_CONTEXT_MISSING",
|
|
52
53
|
CLUSTER_OPERATION_UNSUPPORTED: "CLUSTER_OPERATION_UNSUPPORTED",
|
|
53
54
|
CLUSTER_WRITE_BLOCKED: "CLUSTER_WRITE_BLOCKED",
|
|
54
55
|
ALLOCATION_NO_DATA_NODES: "ALLOCATION_NO_DATA_NODES",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-RYWURYTW.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-EQ7BQ6VZ.mjs';
|
|
3
3
|
|
|
4
4
|
// src/vector/vector-index/dead-bits.ts
|
|
5
5
|
var NO_LIVE_VECTOR_AT_POSITION = -1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MAX_DOCUMENT_ENCODING_DEPTH, singleFoldTable, appendFoldedCodePoint, compareCodePoints, EARLIER_RELEASE_MIN_M, MIN_M, MAX_M, DOCUMENT_ENCODER_RETAINED_BUFFER_BYTES, MAX_FILE_BYTES, detectRuntime, splitWorkerBudget, resolveWorkerCount, CHECKSUM_YIELD_CHUNK_BYTES, resolveWorkerEntry, missingWorkerEntry, DEFAULT_REQUEST_TIMEOUT_MS, toReducedSortValue, resolveRequestThreadCount, defaultSortMode, holdsUnpairedSurrogate, compareComparableValues, readSortField, exceedsCodePoints, toComparableSortValue, SORT_VALUE_MAX_CODE_POINTS, compareComparableKeys, truncateSortString, sortModeOf, isSortMode, SORT_MODES, SHUTDOWN_TIMEOUT_MS, MIN_OVERSAMPLE, MAX_RENUMBERED_SEARCH_ATTEMPTS, compareSortValues, DEFAULT_BACKPRESSURE_LIMIT, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH, codePointCount, noteThreadSlotGone, threadSlotOfWorker } from './chunk-
|
|
1
|
+
import { MAX_DOCUMENT_ENCODING_DEPTH, singleFoldTable, appendFoldedCodePoint, compareCodePoints, EARLIER_RELEASE_MIN_M, MIN_M, MAX_M, DOCUMENT_ENCODER_RETAINED_BUFFER_BYTES, MAX_FILE_BYTES, detectRuntime, splitWorkerBudget, resolveWorkerCount, CHECKSUM_YIELD_CHUNK_BYTES, resolveWorkerEntry, missingWorkerEntry, DEFAULT_REQUEST_TIMEOUT_MS, toReducedSortValue, resolveRequestThreadCount, defaultSortMode, holdsUnpairedSurrogate, compareComparableValues, readSortField, exceedsCodePoints, toComparableSortValue, SORT_VALUE_MAX_CODE_POINTS, compareComparableKeys, truncateSortString, sortModeOf, isSortMode, SORT_MODES, SHUTDOWN_TIMEOUT_MS, MIN_OVERSAMPLE, MAX_RENUMBERED_SEARCH_ATTEMPTS, compareSortValues, DEFAULT_BACKPRESSURE_LIMIT, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH, codePointCount, noteThreadSlotGone, threadSlotOfWorker } from './chunk-RYWURYTW.mjs';
|
|
2
2
|
import { DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-JPTQZWJQ.mjs';
|
|
3
|
-
import { ErrorCodes, NarsilError, createNarsilError, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_SUGGEST_LIMIT, MAX_INDEX_CONFIGURATION_BYTES, FOREIGN_STATS_TTL_MS, HEAP_PRESSURE_WARNING_FRACTION, MAX_IMPORT_REFUSALS_REPORTED, DEFAULT_SUGGEST_LIMIT, DEFAULT_FUZZY_PREFIX_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, RESULT_WINDOW, DEFAULT_LIMIT, DEFAULT_OFFSET, DEFAULT_LINEAR_ALPHA, MIN_LINEAR_ALPHA, MAX_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT, MIN_RANK_CONSTANT, MIN_DOCUMENTS_FOR_SEGMENTS, DEFAULT_PAGE_SIZE, DEFAULT_MAX_PER_GROUP, PREFIX_MAX_EXPANSIONS, HEAP_PRESSURE_REARM_FRACTION, MAX_TOLERANCE, MAX_PREFIX_LENGTH, BATCH_CHUNK_SIZE, MAX_DOC_ID_LENGTH } from './chunk-
|
|
3
|
+
import { ErrorCodes, NarsilError, createNarsilError, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_SUGGEST_LIMIT, MAX_INDEX_CONFIGURATION_BYTES, FOREIGN_STATS_TTL_MS, HEAP_PRESSURE_WARNING_FRACTION, MAX_IMPORT_REFUSALS_REPORTED, DEFAULT_SUGGEST_LIMIT, DEFAULT_FUZZY_PREFIX_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, RESULT_WINDOW, DEFAULT_LIMIT, DEFAULT_OFFSET, DEFAULT_LINEAR_ALPHA, MIN_LINEAR_ALPHA, MAX_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT, MIN_RANK_CONSTANT, MIN_DOCUMENTS_FOR_SEGMENTS, DEFAULT_PAGE_SIZE, DEFAULT_MAX_PER_GROUP, PREFIX_MAX_EXPANSIONS, HEAP_PRESSURE_REARM_FRACTION, MAX_TOLERANCE, MAX_PREFIX_LENGTH, BATCH_CHUNK_SIZE, MAX_DOC_ID_LENGTH } from './chunk-EQ7BQ6VZ.mjs';
|
|
4
4
|
import { Encoder, Decoder, decode, encode } from '@msgpack/msgpack';
|
|
5
5
|
|
|
6
6
|
// src/analysis/registry.ts
|
|
@@ -14949,7 +14949,7 @@ function requireLoadedVectorCode() {
|
|
|
14949
14949
|
function loadVectorCode() {
|
|
14950
14950
|
if (loaded !== null) return Promise.resolve(loaded);
|
|
14951
14951
|
if (loading === null) {
|
|
14952
|
-
loading = import('./module-
|
|
14952
|
+
loading = import('./module-PCKQADMQ.mjs').then(
|
|
14953
14953
|
(code) => {
|
|
14954
14954
|
loaded = code;
|
|
14955
14955
|
return code;
|
|
@@ -19026,7 +19026,7 @@ async function emitWriteEventAfter(source, indexName, write) {
|
|
|
19026
19026
|
// src/engine/core.ts
|
|
19027
19027
|
async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
19028
19028
|
validateWorkerConfig(config?.workers, config?.lifecycle);
|
|
19029
|
-
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-
|
|
19029
|
+
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-ARKW5NZX.mjs')).resolveRerankSettings(config);
|
|
19030
19030
|
const eventHandlers = eventHandlersOf(config?.events);
|
|
19031
19031
|
const vectorWorkerCount = splitWorkerBudget(resolveWorkerCount(config?.workers?.count)).vector;
|
|
19032
19032
|
const vectorCopyPolicy = {
|
|
@@ -19037,7 +19037,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
19037
19037
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
19038
19038
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
19039
19039
|
}
|
|
19040
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
19040
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-JJGE7MED.mjs');
|
|
19041
19041
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
19042
19042
|
const executor = createDirectExecutor({
|
|
19043
19043
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -19334,7 +19334,7 @@ async function shutdownEngine(core) {
|
|
|
19334
19334
|
}
|
|
19335
19335
|
}
|
|
19336
19336
|
if (core.rerankAdapters.size > 0) {
|
|
19337
|
-
await (await import('./runtime-
|
|
19337
|
+
await (await import('./runtime-ARKW5NZX.mjs')).shutdownRerankAdapters(core.rerankAdapters);
|
|
19338
19338
|
}
|
|
19339
19339
|
await orchestrator.shutdown();
|
|
19340
19340
|
await executor.shutdown();
|
|
@@ -22470,14 +22470,14 @@ function portabilityOperations(core, config, engine) {
|
|
|
22470
22470
|
return {
|
|
22471
22471
|
snapshot(indexName) {
|
|
22472
22472
|
return withOpenIndex(indexName, async () => {
|
|
22473
|
-
const { createSnapshot } = await import('./snapshot-
|
|
22473
|
+
const { createSnapshot } = await import('./snapshot-3AZDQKNA.mjs');
|
|
22474
22474
|
return createSnapshot(snapshotDepsOf(indexName));
|
|
22475
22475
|
});
|
|
22476
22476
|
},
|
|
22477
22477
|
async restore(indexName, data) {
|
|
22478
22478
|
core.guardShutdown();
|
|
22479
22479
|
validateIndexName(indexName);
|
|
22480
|
-
const restored = import('./restore-queue-
|
|
22480
|
+
const restored = import('./restore-queue-2STSWU2E.mjs').then(
|
|
22481
22481
|
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
22482
22482
|
);
|
|
22483
22483
|
await emitWriteEventAfter(core, indexName, restored);
|
|
@@ -22486,8 +22486,8 @@ function portabilityOperations(core, config, engine) {
|
|
|
22486
22486
|
exportDocuments(indexName) {
|
|
22487
22487
|
return withOpenIndex(indexName, async () => {
|
|
22488
22488
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
22489
|
-
import('./snapshot-
|
|
22490
|
-
import('./write-
|
|
22489
|
+
import('./snapshot-3AZDQKNA.mjs'),
|
|
22490
|
+
import('./write-XXLMPT3Y.mjs')
|
|
22491
22491
|
]);
|
|
22492
22492
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
22493
22493
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -23737,13 +23737,13 @@ function requireCursorDepth(cursor, signature, binding) {
|
|
|
23737
23737
|
}
|
|
23738
23738
|
function hybridSearchOf(params, context, limit, offset, cursorDepth) {
|
|
23739
23739
|
if ((params.hybrid?.depth ?? null) === null) return executeHybridSearch(params, context, limit, offset, cursorDepth);
|
|
23740
|
-
return import('./runtime-
|
|
23740
|
+
return import('./runtime-ARKW5NZX.mjs').then(
|
|
23741
23741
|
(runtime) => runtime.searchFixedDepthHybrid(params, context, { cursorDepth: cursorDepth ?? 0, offset, limit }, runtimeHost)
|
|
23742
23742
|
);
|
|
23743
23743
|
}
|
|
23744
23744
|
function executeQuery(request, callerContext) {
|
|
23745
23745
|
if (request.rerank === void 0) return runQuery(request, callerContext);
|
|
23746
|
-
return import('./runtime-
|
|
23746
|
+
return import('./runtime-ARKW5NZX.mjs').then(
|
|
23747
23747
|
(runtime) => runtime.executeRerankedQuery(request, callerContext, executeQuery, runtimeHost)
|
|
23748
23748
|
);
|
|
23749
23749
|
}
|
|
@@ -24124,7 +24124,7 @@ async function runEngineQuery(core, indexName, params, options) {
|
|
|
24124
24124
|
const manager = core.requireManager(indexName);
|
|
24125
24125
|
const scoped = scopedParams(params, options);
|
|
24126
24126
|
await core.pluginRegistry.runHook("beforeSearch", { indexName, params: scoped });
|
|
24127
|
-
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-
|
|
24127
|
+
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-ARKW5NZX.mjs');
|
|
24128
24128
|
const resolvedParams = await resolveVectorText(
|
|
24129
24129
|
rerank === void 0 ? scoped : rerank.withRerankQueryText(scoped),
|
|
24130
24130
|
entry.embeddingAdapter,
|
|
@@ -24153,6 +24153,7 @@ async function runEngineQuery(core, indexName, params, options) {
|
|
|
24153
24153
|
if (analysisStale) {
|
|
24154
24154
|
result.analysisStale = true;
|
|
24155
24155
|
}
|
|
24156
|
+
options?.onRanked?.(manager, result);
|
|
24156
24157
|
if (core.pluginRegistry.hasHooks("afterSearch")) {
|
|
24157
24158
|
const observed = { ...result, hits: [...result.hits] };
|
|
24158
24159
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes } from './chunk-
|
|
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-
|
|
3
|
-
import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-
|
|
4
|
-
import { compareCodePoints, MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-
|
|
5
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes } from './chunk-3RXEGUGO.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-SCBBEQWD.mjs';
|
|
3
|
+
import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-S7KNCVPU.mjs';
|
|
4
|
+
import { compareCodePoints, MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-RYWURYTW.mjs';
|
|
5
|
+
import { NarsilError, ErrorCodes } from './chunk-EQ7BQ6VZ.mjs';
|
|
6
6
|
import { decode, encode } from '@msgpack/msgpack';
|
|
7
7
|
|
|
8
8
|
// src/engine/durability-metadata.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { unpackLevels, osqRecordBytes, VECTOR_FILE_MAX_VECTORS, NO_LIVE_VECTOR_AT_POSITION, readTrailer, stageQueryLevels, osqCodeBytes, osqStagedQueryBytes, bytesToVectors, VECTOR_GRAPH_PART_VECTORS, VECTOR_GRAPH_PART_PAYLOAD_VERSION, VECTOR_FILE_PAYLOAD_VERSION, deadBitsWhere, vectorsToBytes, writeRecord } from './chunk-
|
|
2
|
-
import { markSimdUnavailable, MAX_WASM_PAGES, WASM_PAGE_BYTES, VECTOR_SCRATCH_SLOTS, UNPLACED_FLAG_CHUNK_ORDINALS, COMPACTION_TOMBSTONE_RATIO, COMPACTION_ABSOLUTE_THRESHOLD, MAX_FILE_BYTES, VECTOR_BLOCK_INITIAL_SLOTS, MAX_VECTOR_ORDINALS, VECTOR_STORE_INITIAL_CAPACITY, PLACEMENT_ROOM_REQUESTS, LOCK_SPIN_ITERATIONS, LOCK_WAIT_SLICE_MS, MAX_LAYER_CAP, INITIAL_LIST_CAPACITY, OSQ_PLACEMENT_QUERY_BITS, GRAPH_LOCK_WAIT_SLICE_MS, OSQ_STEPS, OSQ_GRID, OSQ_QUERY_BITS, GRAPH_LOCK_WAIT_DEADLINE_MS, compareCodePoints, INITIAL_UPPER_SLOTS, OSQ_REFINE_ROUNDS, OSQ_REFINE_TOLERANCE, threadSlotGone, DEFAULT_EF_SEARCH, OSQ_LAMBDA, NEAREST_LINK_FALLBACK_HOSTS, FARTHEST_REJECTED_LINKS_KEPT, MAX_DOC_ID_TABLE_BYTES } from './chunk-
|
|
3
|
-
import { NarsilError, ErrorCodes, MAX_DOC_ID_LENGTH } from './chunk-
|
|
1
|
+
import { unpackLevels, osqRecordBytes, VECTOR_FILE_MAX_VECTORS, NO_LIVE_VECTOR_AT_POSITION, readTrailer, stageQueryLevels, osqCodeBytes, osqStagedQueryBytes, bytesToVectors, VECTOR_GRAPH_PART_VECTORS, VECTOR_GRAPH_PART_PAYLOAD_VERSION, VECTOR_FILE_PAYLOAD_VERSION, deadBitsWhere, vectorsToBytes, writeRecord } from './chunk-S7KNCVPU.mjs';
|
|
2
|
+
import { markSimdUnavailable, MAX_WASM_PAGES, WASM_PAGE_BYTES, VECTOR_SCRATCH_SLOTS, UNPLACED_FLAG_CHUNK_ORDINALS, COMPACTION_TOMBSTONE_RATIO, COMPACTION_ABSOLUTE_THRESHOLD, MAX_FILE_BYTES, VECTOR_BLOCK_INITIAL_SLOTS, MAX_VECTOR_ORDINALS, VECTOR_STORE_INITIAL_CAPACITY, PLACEMENT_ROOM_REQUESTS, LOCK_SPIN_ITERATIONS, LOCK_WAIT_SLICE_MS, MAX_LAYER_CAP, INITIAL_LIST_CAPACITY, OSQ_PLACEMENT_QUERY_BITS, GRAPH_LOCK_WAIT_SLICE_MS, OSQ_STEPS, OSQ_GRID, OSQ_QUERY_BITS, GRAPH_LOCK_WAIT_DEADLINE_MS, compareCodePoints, INITIAL_UPPER_SLOTS, OSQ_REFINE_ROUNDS, OSQ_REFINE_TOLERANCE, threadSlotGone, DEFAULT_EF_SEARCH, OSQ_LAMBDA, NEAREST_LINK_FALLBACK_HOSTS, FARTHEST_REJECTED_LINKS_KEPT, MAX_DOC_ID_TABLE_BYTES } from './chunk-RYWURYTW.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes, MAX_DOC_ID_LENGTH } from './chunk-EQ7BQ6VZ.mjs';
|
|
4
4
|
|
|
5
5
|
// src/vector/shared-buffers/growable.ts
|
|
6
6
|
function sharedMemoryAvailable() {
|
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
3
|
-
import { applyDeleteEntry, applyIndexEntry } from './chunk-
|
|
4
|
-
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
5
|
-
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-
|
|
6
|
-
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-
|
|
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-XHRHOH2P.mjs';
|
|
3
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-3RXEGUGO.mjs';
|
|
4
|
+
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-SCBBEQWD.mjs';
|
|
5
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-S7KNCVPU.mjs';
|
|
6
|
+
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-RYWURYTW.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
8
|
-
import { NarsilError, ErrorCodes, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-
|
|
8
|
+
import { NarsilError, ErrorCodes, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-EQ7BQ6VZ.mjs';
|
|
9
9
|
import { decode } from '@msgpack/msgpack';
|
|
10
10
|
|
|
11
11
|
// src/persistence/durability/node-fs.browser.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
2
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, osqBitsOf, noBuildHistory, createOsqQuantizer, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, ordinalFilterValues, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, OSQ4_MIN_DIMENSION, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, WORKER_COPY_MIN_VECTORS, allLiveDocIds, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, growBufferTo, unplacedChunkCount, STORE_DOC_ID_BYTES, recalibrateFromStore, signatureOf, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, createVectorBlock, ensureBlockSlots, createHNSWIndex, adoptGraph, topLayerInParts, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-
|
|
3
|
-
export { releaseLocksHeldBy } from './chunk-
|
|
4
|
-
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-
|
|
5
|
-
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, compareCodePoints, UNPLACED_FLAG_CHUNK_ORDINALS, MAX_VECTOR_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, resolveWorkerCount, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone, WORKER_YOUNG_GENERATION_MB, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-
|
|
6
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-
|
|
2
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, osqBitsOf, noBuildHistory, createOsqQuantizer, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, ordinalFilterValues, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, OSQ4_MIN_DIMENSION, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, WORKER_COPY_MIN_VECTORS, allLiveDocIds, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, BLOCK_MAX_BYTES, growBufferTo, unplacedChunkCount, STORE_DOC_ID_BYTES, recalibrateFromStore, signatureOf, nativeStoreScratchBytes, noteFallback, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, QUERY_STAGED, createVectorBlock, ensureBlockSlots, createHNSWIndex, adoptGraph, topLayerInParts, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-Z2K5AGZL.mjs';
|
|
3
|
+
export { releaseLocksHeldBy } from './chunk-Z2K5AGZL.mjs';
|
|
4
|
+
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-S7KNCVPU.mjs';
|
|
5
|
+
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, compareCodePoints, UNPLACED_FLAG_CHUNK_ORDINALS, MAX_VECTOR_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, resolveWorkerCount, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone, WORKER_YOUNG_GENERATION_MB, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-RYWURYTW.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-EQ7BQ6VZ.mjs';
|
|
7
7
|
|
|
8
8
|
// src/core/heap.ts
|
|
9
9
|
function createMaxHeap(compare) {
|
|
@@ -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-
|
|
21
|
+
const { restoreFromSnapshot } = await import('./snapshot-3AZDQKNA.mjs');
|
|
22
22
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
23
|
});
|
|
24
24
|
const settled = restored.then(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-JPTQZWJQ.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, DEFAULT_LIMIT, DEFAULT_OFFSET, RESULT_WINDOW } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, DEFAULT_LIMIT, DEFAULT_OFFSET, RESULT_WINDOW } from './chunk-EQ7BQ6VZ.mjs';
|
|
3
3
|
|
|
4
4
|
// src/search/hybrid-depth.ts
|
|
5
5
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { vectorsPerFile } from './chunk-
|
|
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-
|
|
3
|
-
import './chunk-
|
|
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-
|
|
5
|
-
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-
|
|
6
|
-
import { MAX_FILE_BYTES } from './chunk-
|
|
1
|
+
import { vectorsPerFile } from './chunk-Z2K5AGZL.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-XHRHOH2P.mjs';
|
|
3
|
+
import './chunk-3RXEGUGO.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-SCBBEQWD.mjs';
|
|
5
|
+
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-S7KNCVPU.mjs';
|
|
6
|
+
import { MAX_FILE_BYTES } from './chunk-RYWURYTW.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
8
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
8
|
+
import { NarsilError, ErrorCodes } from './chunk-EQ7BQ6VZ.mjs';
|
|
9
9
|
import { decode } from '@msgpack/msgpack';
|
|
10
10
|
|
|
11
11
|
// src/persistence/archive/memory-store.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
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-
|
|
3
|
-
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-3RXEGUGO.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-SCBBEQWD.mjs';
|
|
3
|
+
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-S7KNCVPU.mjs';
|
|
4
|
+
import './chunk-RYWURYTW.mjs';
|
|
5
5
|
import './chunk-JPTQZWJQ.mjs';
|
|
6
|
-
import { EXPORT_CHUNK_BYTES, NarsilError, ErrorCodes } from './chunk-
|
|
6
|
+
import { EXPORT_CHUNK_BYTES, NarsilError, ErrorCodes } from './chunk-EQ7BQ6VZ.mjs';
|
|
7
7
|
import { decode } from '@msgpack/msgpack';
|
|
8
8
|
|
|
9
9
|
// src/engine/export/json-line.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
|
|
2
|
-
import { C as ClusterNamespace } from './config-
|
|
3
|
-
import { h as TaskStore } from './tasks-
|
|
2
|
+
import { C as ClusterNamespace } from './config-Dc_8-byz.js';
|
|
3
|
+
import { h as TaskStore } from './tasks-B4B2cMK5.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Context handed to {@link OnRequestHook} for every inbound request, captured
|
|
@@ -1,17 +1,17 @@
|
|
|
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-
|
|
2
|
-
import { generateId, getLanguage } from './chunk-
|
|
3
|
-
import { readHeapStatistics, readResidentMemory } from './chunk-
|
|
4
|
-
import { GrowableUint32, bitsetHas, bitsetSet, createBitSet } from './chunk-
|
|
5
|
-
import { tokenizeOptions, getNestedValue, sameFields, visitDocumentSurfaceSpellings, visitDocumentSpellings } from './chunk-
|
|
6
|
-
import { schemaFieldsOf, partialFieldsOf, encodeDocument, validateDocument, validateDocumentStrict, extractVectorFieldsFromSchema } from './chunk-
|
|
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-C57FPCTL.mjs';
|
|
2
|
+
import { generateId, getLanguage } from './chunk-LWQTFKRS.mjs';
|
|
3
|
+
import { readHeapStatistics, readResidentMemory } from './chunk-SOADQINJ.mjs';
|
|
4
|
+
import { GrowableUint32, bitsetHas, bitsetSet, createBitSet } from './chunk-C55OFKU6.mjs';
|
|
5
|
+
import { tokenizeOptions, getNestedValue, sameFields, visitDocumentSurfaceSpellings, visitDocumentSpellings } from './chunk-62GK7UUS.mjs';
|
|
6
|
+
import { schemaFieldsOf, partialFieldsOf, encodeDocument, validateDocument, validateDocumentStrict, extractVectorFieldsFromSchema } from './chunk-AWZVJCCW.mjs';
|
|
7
7
|
import { fuzzyPrefixOf, boundedLevenshtein } from './chunk-GES7U2PM.mjs';
|
|
8
|
-
import { isWordIndexedBase } from './chunk-
|
|
9
|
-
import { resolveIndexAnalysis, synonymSearchModule } from './chunk-
|
|
10
|
-
import { visitTokens, codePointOrder, encodeStringBlob, encodeLookupKey, SEGMENT_TOKEN_TABLE_START, SEGMENT_POSTING_LOG_START, SEGMENT_POSITION_POOL_START, SEGMENT_FIELD_SCRATCH_START, FROZEN_REMOVAL_INDEX_MAX_PROCESS_FRACTION } from './chunk-
|
|
8
|
+
import { isWordIndexedBase } from './chunk-FV5CP3E2.mjs';
|
|
9
|
+
import { resolveIndexAnalysis, synonymSearchModule } from './chunk-5LP7OU6B.mjs';
|
|
10
|
+
import { visitTokens, codePointOrder, encodeStringBlob, encodeLookupKey, SEGMENT_TOKEN_TABLE_START, SEGMENT_POSTING_LOG_START, SEGMENT_POSITION_POOL_START, SEGMENT_FIELD_SCRATCH_START, FROZEN_REMOVAL_INDEX_MAX_PROCESS_FRACTION } from './chunk-NYWUBTMH.mjs';
|
|
11
11
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
12
|
-
import { loadedVectorCode, loadVectorCode, loadVectorCodeFor, requireLoadedVectorCode } from './chunk-
|
|
12
|
+
import { loadedVectorCode, loadVectorCode, loadVectorCodeFor, requireLoadedVectorCode } from './chunk-5W7ADHK7.mjs';
|
|
13
13
|
import { PROTOTYPE_POLLUTION_KEYS } from './chunk-L5ORED7V.mjs';
|
|
14
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
14
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
15
15
|
import { Decoder, decode } from '@msgpack/msgpack';
|
|
16
16
|
|
|
17
17
|
// src/core/synonyms/platform.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { readOldGenerationStatistics, processLimitBytes } from './chunk-
|
|
2
|
-
import { collectAndReturnPages, collectYoungGeneration } from './chunk-
|
|
1
|
+
import { readOldGenerationStatistics, processLimitBytes } from './chunk-SOADQINJ.mjs';
|
|
2
|
+
import { collectAndReturnPages, collectYoungGeneration } from './chunk-6OXNHLNZ.mjs';
|
|
3
3
|
import { REFUSAL_COLLECTION_MIN_INTERVAL_MS, REFUSAL_COLLECTION_TIME_MULTIPLE, REFUSAL_YOUNG_COLLECTION_MIN_INTERVAL_MS } from './chunk-ZXZ26WSO.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
5
5
|
|
|
6
6
|
// src/distribution/cluster-node/constants.ts
|
|
7
7
|
var DEFAULT_PARTITION_COUNT = 5;
|
|
@@ -86,6 +86,8 @@ var ANSWER_MEMORY_BLOCK_FRACTION = 0.95;
|
|
|
86
86
|
var ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE = 2;
|
|
87
87
|
var ANSWER_ENCODE_BYTES_PER_ESTIMATED_BYTE = 3;
|
|
88
88
|
var FETCH_GROUP_DOCUMENT_IDS = 256;
|
|
89
|
+
var SEARCH_CONTEXT_REAPER_INTERVAL_MS = 1e3;
|
|
90
|
+
var SEARCH_CONTEXT_ENTRY_HEAP_BYTES = 256;
|
|
89
91
|
|
|
90
92
|
// src/runtime/thread-heap.ts
|
|
91
93
|
var refusalListeners = /* @__PURE__ */ new Set();
|
|
@@ -151,7 +153,8 @@ var recentFigures = {
|
|
|
151
153
|
processLimitBytes: 0,
|
|
152
154
|
heapBytes: 0,
|
|
153
155
|
heapLimitBytes: 0,
|
|
154
|
-
youngHeapBytes: 0
|
|
156
|
+
youngHeapBytes: 0,
|
|
157
|
+
heapCommittedBytes: 0
|
|
155
158
|
};
|
|
156
159
|
function readFreshFigures() {
|
|
157
160
|
try {
|
|
@@ -166,7 +169,8 @@ function readFreshFigures() {
|
|
|
166
169
|
processLimitBytes: limitBytes,
|
|
167
170
|
heapBytes: heap.usedBytes,
|
|
168
171
|
heapLimitBytes: heap.limitBytes,
|
|
169
|
-
youngHeapBytes: heap.youngUsedBytes
|
|
172
|
+
youngHeapBytes: heap.youngUsedBytes,
|
|
173
|
+
heapCommittedBytes: Math.max(heap.committedBytes, heap.usedBytes)
|
|
170
174
|
};
|
|
171
175
|
} catch {
|
|
172
176
|
return null;
|
|
@@ -189,6 +193,7 @@ function readRecentMemoryFigures() {
|
|
|
189
193
|
recentFigures.processBytes = lastFigures.processBytes + admittedSince;
|
|
190
194
|
recentFigures.heapBytes = lastFigures.heapBytes + admittedSince;
|
|
191
195
|
recentFigures.youngHeapBytes = lastFigures.youngHeapBytes;
|
|
196
|
+
recentFigures.heapCommittedBytes = lastFigures.heapCommittedBytes + admittedSince;
|
|
192
197
|
return recentFigures;
|
|
193
198
|
}
|
|
194
199
|
|
|
@@ -290,7 +295,7 @@ function estimateForwardedBytes(operation) {
|
|
|
290
295
|
// src/distribution/cluster-node/memory/answer-room.ts
|
|
291
296
|
var RESPONSE_WOULD_FILL_MEMORY_REASON = "response_would_fill_memory";
|
|
292
297
|
function heapRoomIn(figures) {
|
|
293
|
-
return ANSWER_MEMORY_BLOCK_FRACTION * figures.heapLimitBytes - figures.
|
|
298
|
+
return ANSWER_MEMORY_BLOCK_FRACTION * figures.heapLimitBytes - figures.heapCommittedBytes - figures.youngHeapBytes;
|
|
294
299
|
}
|
|
295
300
|
function processRoomIn(figures) {
|
|
296
301
|
return ANSWER_MEMORY_BLOCK_FRACTION * figures.processLimitBytes - figures.processBytes;
|
|
@@ -303,7 +308,7 @@ function refusal(answerBytes, figures, collectedGarbage) {
|
|
|
303
308
|
const blockBytes = Math.floor(
|
|
304
309
|
ANSWER_MEMORY_BLOCK_FRACTION * (heapBound ? figures.heapLimitBytes : figures.processLimitBytes)
|
|
305
310
|
);
|
|
306
|
-
const usedBytes = heapBound ? figures.
|
|
311
|
+
const usedBytes = heapBound ? figures.heapCommittedBytes + figures.youngHeapBytes : figures.processBytes;
|
|
307
312
|
return new NarsilError(
|
|
308
313
|
ServerErrorCodes.TOO_MANY_REQUESTS,
|
|
309
314
|
`Building the next ${answerBytes} bytes of this answer would take the ${usedBytes} bytes already in use past the limit of ${blockBytes} bytes. Retry once the requests in progress finish, or ask for fewer documents.`,
|
|
@@ -311,6 +316,7 @@ function refusal(answerBytes, figures, collectedGarbage) {
|
|
|
311
316
|
reason: RESPONSE_WOULD_FILL_MEMORY_REASON,
|
|
312
317
|
answerBytes,
|
|
313
318
|
heapBytes: figures.heapBytes,
|
|
319
|
+
heapCommittedBytes: figures.heapCommittedBytes,
|
|
314
320
|
youngHeapBytes: figures.youngHeapBytes,
|
|
315
321
|
processBytes: figures.processBytes,
|
|
316
322
|
reservedBytes: reservedHeapBytes(),
|
|
@@ -341,4 +347,4 @@ function refuseEncodeWithoutRoom(documents) {
|
|
|
341
347
|
if (refusal2 !== null) throw refusal2;
|
|
342
348
|
}
|
|
343
349
|
|
|
344
|
-
export { ADMISSION_TIMEOUT_MS, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CASE_FOLD_EXPANSION_FACTOR, CATCH_UP_FEED_WINDOW_MS, CATCH_UP_TICK_MS, CLEAR_PAGE_SIZE, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, COPY_FAILURE_RETRY_DELAY_MS, DECOMMISSION_RECHECK_INTERVAL_MS, DEFAULT_BLOCK_WRITES_ABOVE, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, DEFAULT_CAPACITY, DEFAULT_CREATE_INDEX_WAIT_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_RESUME_WRITES_BELOW, DISTINCT_TERM_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, DOCUMENT_VALUE_HEAP_BYTES, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, ENUM_VALUE_HEAP_BYTES, FETCH_GROUP_DOCUMENT_IDS, FORWARD_RETRY_DELAY_CAP_MS, FORWARD_RETRY_INITIAL_DELAY_MS, FULL_MEMORY_COLLECTION_INTERVAL_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, MAX_DROP_ACKNOWLEDGE_WAIT_MS, MAX_NODE_LEFT_DELAY_MS, MAX_SOURCE_ID_LENGTH, MAX_SYNONYM_REPLACEMENT_ATTEMPTS, MAX_WAIT_FOR_ACTIVE_REPLICAS, MEMORY_SAMPLE_INTERVAL_MS, MIN_CONTROLLER_LEASE_TTL_MS, NORMALIZATION_EXPANSION_FACTOR, PARTIAL_SPELLING_HEAP_BYTES, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, PARTITION_WRITE_CONCURRENCY, PATTERN_RUN_HEAP_BYTES, PRIMARY_CHANGE_POLL_INTERVAL_MS, PRIMARY_CHANGE_RETRY_WINDOW_MS, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, ROLLBACK_RETRY_DELAY_CAP_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, SYNCED_POSITION_REPORT_TIMEOUT_MS, TERM_UNIT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, WRITE_APPLY_YIELD_INTERVAL_MS, WRITE_MEMORY_SAMPLE_MAX_AGE_MS, admitHeapBytes, answerRefusalOf, collectGarbageBeforeRefusal, collectYoungGenerationBeforeRefusal, createWritePressure, estimateDocumentBytes, estimateDocumentsBytes, estimateForwardedBytes, onRefusalAfterCollection, readMemoryFigures, readRecentMemoryFigures, refuseEncodeWithoutRoom, reportRefusalAfterCollection, reserveHeapBytes, reservedHeapBytes, withAdmittedWrite };
|
|
350
|
+
export { ADMISSION_TIMEOUT_MS, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CASE_FOLD_EXPANSION_FACTOR, CATCH_UP_FEED_WINDOW_MS, CATCH_UP_TICK_MS, CLEAR_PAGE_SIZE, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, COPY_FAILURE_RETRY_DELAY_MS, DECOMMISSION_RECHECK_INTERVAL_MS, DEFAULT_BLOCK_WRITES_ABOVE, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, DEFAULT_CAPACITY, DEFAULT_CREATE_INDEX_WAIT_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_RESUME_WRITES_BELOW, DISTINCT_TERM_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, DOCUMENT_VALUE_HEAP_BYTES, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, ENUM_VALUE_HEAP_BYTES, FETCH_GROUP_DOCUMENT_IDS, FORWARD_RETRY_DELAY_CAP_MS, FORWARD_RETRY_INITIAL_DELAY_MS, FULL_MEMORY_COLLECTION_INTERVAL_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, MAX_DROP_ACKNOWLEDGE_WAIT_MS, MAX_NODE_LEFT_DELAY_MS, MAX_SOURCE_ID_LENGTH, MAX_SYNONYM_REPLACEMENT_ATTEMPTS, MAX_WAIT_FOR_ACTIVE_REPLICAS, MEMORY_SAMPLE_INTERVAL_MS, MIN_CONTROLLER_LEASE_TTL_MS, NORMALIZATION_EXPANSION_FACTOR, PARTIAL_SPELLING_HEAP_BYTES, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, PARTITION_WRITE_CONCURRENCY, PATTERN_RUN_HEAP_BYTES, PRIMARY_CHANGE_POLL_INTERVAL_MS, PRIMARY_CHANGE_RETRY_WINDOW_MS, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, ROLLBACK_RETRY_DELAY_CAP_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, SEARCH_CONTEXT_ENTRY_HEAP_BYTES, SEARCH_CONTEXT_REAPER_INTERVAL_MS, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, SYNCED_POSITION_REPORT_TIMEOUT_MS, TERM_UNIT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, WRITE_APPLY_YIELD_INTERVAL_MS, WRITE_MEMORY_SAMPLE_MAX_AGE_MS, admitHeapBytes, answerRefusalOf, collectGarbageBeforeRefusal, collectYoungGenerationBeforeRefusal, createWritePressure, estimateDocumentBytes, estimateDocumentsBytes, estimateForwardedBytes, onRefusalAfterCollection, readMemoryFigures, readRecentMemoryFigures, refuseEncodeWithoutRoom, reportRefusalAfterCollection, reserveHeapBytes, reservedHeapBytes, withAdmittedWrite };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseSynonymRules, encodeSynonymRules, decodeSynonymRules, SYNONYM_EXPANSION_CACHE_ENTRIES, SYNONYMS_ADDED_PER_QUERY } from './chunk-7X5JST5L.mjs';
|
|
2
|
-
import { encodeStringBlob, tokenize, encodeLookupKey } from './chunk-
|
|
2
|
+
import { encodeStringBlob, tokenize, encodeLookupKey } from './chunk-NYWUBTMH.mjs';
|
|
3
3
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
5
5
|
|
|
6
6
|
// src/analysis/registry.ts
|
|
7
7
|
var tokenizers = /* @__PURE__ */ new Map();
|
|
@@ -14,7 +14,7 @@ function requireLoadedVectorCode() {
|
|
|
14
14
|
function loadVectorCode() {
|
|
15
15
|
if (loaded !== null) return Promise.resolve(loaded);
|
|
16
16
|
if (loading === null) {
|
|
17
|
-
loading = import('./module-
|
|
17
|
+
loading = import('./module-IYILOTU3.mjs').then(
|
|
18
18
|
(code) => {
|
|
19
19
|
loaded = code;
|
|
20
20
|
return code;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { flattenSchema } from './chunk-
|
|
1
|
+
import { flattenSchema } from './chunk-AWZVJCCW.mjs';
|
|
2
2
|
import { PARTIAL_WORD_MIN_CODE_POINTS, PARTIAL_WORDS_ADDED_PER_QUERY, DEFAULT_FUZZY_PREFIX_LENGTH } from './chunk-E74YLAIG.mjs';
|
|
3
3
|
import { fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
4
|
-
import { isWordIndexedBase } from './chunk-
|
|
5
|
-
import { encodeStringBlob, tokenize, resolveStopWords, transformToken, visitTokens, visitSurfaceSpellings } from './chunk-
|
|
4
|
+
import { isWordIndexedBase } from './chunk-FV5CP3E2.mjs';
|
|
5
|
+
import { encodeStringBlob, tokenize, resolveStopWords, transformToken, visitTokens, visitSurfaceSpellings } from './chunk-NYWUBTMH.mjs';
|
|
6
6
|
import { compareCodePoints, codePointCount } from './chunk-YTJCGKM4.mjs';
|
|
7
7
|
|
|
8
8
|
// src/core/partition/suggestions.ts
|
|
@@ -76,6 +76,7 @@ function readHeap() {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
function startIdleHeapCleanup() {
|
|
79
|
+
acquireCollector();
|
|
79
80
|
if (typeof performance.eventLoopUtilization !== "function") return () => void 0;
|
|
80
81
|
let lastReading = performance.eventLoopUtilization();
|
|
81
82
|
const cleaner = createIdleHeapCleaner({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-
|
|
2
|
-
import { requireValidFieldTypes } from './chunk-
|
|
1
|
+
import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-RSSLOFRP.mjs';
|
|
2
|
+
import { requireValidFieldTypes } from './chunk-AWZVJCCW.mjs';
|
|
3
3
|
import { VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
|
|
4
4
|
import { decode } from '@msgpack/msgpack';
|
|
5
5
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MAX_DOCUMENT_ENCODING_DEPTH, DOCUMENT_ENCODER_RETAINED_BUFFER_BYTES, DOCUMENT_REPLY_ENVELOPE_DEPTH } from './chunk-U476IXKQ.mjs';
|
|
2
2
|
import { EARLIER_RELEASE_MIN_M, MIN_M, MAX_M } from './chunk-VJS4JFBQ.mjs';
|
|
3
|
-
import { isWordIndexedBase, parseFieldType } from './chunk-
|
|
3
|
+
import { isWordIndexedBase, parseFieldType } from './chunk-FV5CP3E2.mjs';
|
|
4
4
|
import { compareCodePoints, holdsUnpairedSurrogate, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
5
|
import { DEFAULT_PATTERN_VALUE_LIMIT, isPlainObject, MAX_TEXT_FIELDS, MAX_VECTOR_DIMENSION, MAX_DOCUMENT_BYTES, MAX_NESTING_DEPTH, PROTOTYPE_POLLUTION_KEYS, FIELD_NAME_PATTERN, RESERVED_ROOT_FIELDS, MAX_DOCUMENT_NESTING_DEPTH, VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
6
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
7
7
|
import { Encoder, encode } from '@msgpack/msgpack';
|
|
8
8
|
|
|
9
9
|
// src/schema/validator/schema.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MAX_FILTER_ARRAY_SIZE } from './chunk-WQBCBKY3.mjs';
|
|
2
2
|
import { tabulatedLevenshtein } from './chunk-GES7U2PM.mjs';
|
|
3
|
-
import { parsedTypeOf } from './chunk-
|
|
3
|
+
import { parsedTypeOf } from './chunk-FV5CP3E2.mjs';
|
|
4
4
|
import { codePointCount, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
5
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
6
6
|
|
|
7
7
|
// src/core/bitset.ts
|
|
8
8
|
function createBitSet(capacity) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, bitsetHas, createBitSet, bitsetSet, bitsetIsEmpty, bitsetOrInto, bitsetAndNotInto, bitsetAndInto, bitsetFromSet, 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, bitsetHas, createBitSet, bitsetSet, bitsetIsEmpty, bitsetOrInto, bitsetAndNotInto, bitsetAndInto, bitsetFromSet, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-C55OFKU6.mjs';
|
|
2
2
|
import { GEO_UNIT_METRES, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, FILTER_OPERAND_COPY_DEPTH } from './chunk-WQBCBKY3.mjs';
|
|
3
|
-
import { expandTermPrefix, suggestDisplayTerms, getNestedValue, textFieldsChanged, getFlatSchema, tokenizeOptions, partialWordSearchModule, getOrCreateFieldNameIndex, partitionDocumentFrequency } from './chunk-
|
|
4
|
-
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, partialFieldsOf, schemaFieldsOf, flattenSchema, validateDocument, validateDocumentStrict, ANTIMERIDIAN_SPAN_DEGREES, FULL_TURN_DEGREES, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS, VINCENTY_CONVERGENCE_THRESHOLD, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, DEG_TO_RAD, VINCENTY_MAX_ITERATIONS } from './chunk-
|
|
3
|
+
import { expandTermPrefix, suggestDisplayTerms, getNestedValue, textFieldsChanged, getFlatSchema, tokenizeOptions, partialWordSearchModule, getOrCreateFieldNameIndex, partitionDocumentFrequency } from './chunk-62GK7UUS.mjs';
|
|
4
|
+
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, partialFieldsOf, schemaFieldsOf, flattenSchema, validateDocument, validateDocumentStrict, ANTIMERIDIAN_SPAN_DEGREES, FULL_TURN_DEGREES, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS, VINCENTY_CONVERGENCE_THRESHOLD, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, DEG_TO_RAD, VINCENTY_MAX_ITERATIONS } from './chunk-AWZVJCCW.mjs';
|
|
5
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-E74YLAIG.mjs';
|
|
6
6
|
import { fuzzyPrefixOf, boundedLevenshtein, fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
7
|
-
import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedBase, isWordIndexedFieldType, isListBase } from './chunk-
|
|
8
|
-
import { tokenize, SCORE_BUFFER_INITIAL_TOUCHED_CAPACITY, PRUNING_REJECTION_SLACK, visitTokens, SORT_COLUMN_MINIMUM_REBUILD_THRESHOLD, TARGET_BLOCK_ENTRIES, SORT_COLUMN_REBUILD_FRACTION_SHIFT } from './chunk-
|
|
7
|
+
import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedBase, isWordIndexedFieldType, isListBase } from './chunk-FV5CP3E2.mjs';
|
|
8
|
+
import { tokenize, SCORE_BUFFER_INITIAL_TOUCHED_CAPACITY, PRUNING_REJECTION_SLACK, visitTokens, SORT_COLUMN_MINIMUM_REBUILD_THRESHOLD, TARGET_BLOCK_ENTRIES, SORT_COLUMN_REBUILD_FRACTION_SHIFT } from './chunk-NYWUBTMH.mjs';
|
|
9
9
|
import { singleFoldTable, appendFoldedCodePoint, sortModeOf, defaultSortMode, SORT_VALUE_MAX_CODE_POINTS, toReducedSortValue, readSortField, compareComparableKeys, toComparableSortValue, isSortMode, SORT_MODES, compareSortValues, compareComparableValues, truncateSortString } from './chunk-R6A773WK.mjs';
|
|
10
10
|
import { compareCodePoints, exceedsCodePoints, codePointCount, holdsUnpairedSurrogate } from './chunk-YTJCGKM4.mjs';
|
|
11
11
|
import { isGeopointOrVectorType, PROTOTYPE_POLLUTION_KEYS } from './chunk-L5ORED7V.mjs';
|
|
12
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
12
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
13
13
|
|
|
14
14
|
// src/core/partition/partial-words/platform.ts
|
|
15
15
|
function platformPartialWordSearch() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { osqRecordBytes } from './chunk-37CD3OKS.mjs';
|
|
2
2
|
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-VJS4JFBQ.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
4
4
|
|
|
5
5
|
// src/vector/vector-index/dead-bits.ts
|
|
6
6
|
var NO_LIVE_VECTOR_AT_POSITION = -1;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes } from './chunk-
|
|
1
|
+
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes } from './chunk-VIXXQEX6.mjs';
|
|
2
2
|
import { WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
|
|
3
3
|
import { ReplicationMessageTypes } from './chunk-RPIE4QCL.mjs';
|
|
4
|
-
import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-
|
|
5
|
-
import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-
|
|
6
|
-
import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-
|
|
7
|
-
import { generateId, getLanguage } from './chunk-
|
|
8
|
-
import { extractVectorFieldsFromSchema, partialFieldsOf, messagePackUpperBoundBytes } from './chunk-
|
|
4
|
+
import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-ICZW4J3I.mjs';
|
|
5
|
+
import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-4GD43FSW.mjs';
|
|
6
|
+
import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-C57FPCTL.mjs';
|
|
7
|
+
import { generateId, getLanguage } from './chunk-LWQTFKRS.mjs';
|
|
8
|
+
import { extractVectorFieldsFromSchema, partialFieldsOf, messagePackUpperBoundBytes } from './chunk-AWZVJCCW.mjs';
|
|
9
9
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
10
|
-
import { resolveIndexAnalysis } from './chunk-
|
|
11
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
10
|
+
import { resolveIndexAnalysis } from './chunk-5LP7OU6B.mjs';
|
|
11
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
12
12
|
import { encode, decode } from '@msgpack/msgpack';
|
|
13
13
|
|
|
14
14
|
// src/persistence/durability/constants.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH } from './chunk-E74YLAIG.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
3
3
|
|
|
4
4
|
// src/search/hybrid-depth.ts
|
|
5
5
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PARSED_FIELD_TYPE_CACHE_ENTRIES, VECTOR_PATTERN, MAX_STORED_VECTOR_DIMENSION } from './chunk-L5ORED7V.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-S2CKO6PP.mjs';
|
|
3
3
|
|
|
4
4
|
// src/schema/validator/field-type.ts
|
|
5
5
|
var FIELD_OPTION_ORDER = ["sortable", "pattern", "partial"];
|