@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
package/dist/distribution.mjs
CHANGED
|
@@ -1,29 +1,44 @@
|
|
|
1
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-S4LQDSUL.mjs';
|
|
2
|
+
import { indexMetadataOf, loadPartitionSegments } from './chunk-CL4OM7GB.mjs';
|
|
1
3
|
import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
|
|
2
|
-
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
4
|
+
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-URGLSNKR.mjs';
|
|
5
|
+
import './chunk-MXS5HWIH.mjs';
|
|
6
|
+
import { decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-YCJLVNWR.mjs';
|
|
7
|
+
import './chunk-ULRPNYAG.mjs';
|
|
8
|
+
import './chunk-37CD3OKS.mjs';
|
|
9
|
+
import './chunk-DJHHF2L5.mjs';
|
|
10
|
+
import { validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, createForwardBatchResultMessage, readListedFile, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage, computeEntryChecksum, createEntryMessage, createEntryBatchMessage, createInsyncConfirmMessage, validateAckPayload, createInsyncRemoveMessage, validateInsyncConfirmPayload, createInsyncAddMessage } from './chunk-QAMUC2BJ.mjs';
|
|
11
|
+
import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-MWJIAREY.mjs';
|
|
5
12
|
import { ReplicationMessageTypes, TransportErrorCodes, ClusterMessageTypes, QueryMessageTypes, TransportError } from './chunk-GCM3JFVA.mjs';
|
|
6
|
-
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
13
|
+
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
|
|
14
|
+
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update } from './chunk-R6BMMQXH.mjs';
|
|
15
|
+
import { generateId, readHeapStatistics } from './chunk-EMXAYPTQ.mjs';
|
|
16
|
+
import { now, listBindingOf, requireSurfaceFormsForPartialFields, queryBindingOf, hitsKeptPerGroup, clampLimit, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-DCK4P5BI.mjs';
|
|
17
|
+
import { oversampledShardSize, resolveProjection, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, normalizeSort, sortModesOf, encodePageCursor, applyProjection, readSortValues, requireWithinResultWindow, fnv1a, sortSignatureEntry, FILTER_EXPRESSION_KEYS, filterTestCount, fnv1aUint32s, mergePartitionStats, FIELD_FILTER_OPERATORS } from './chunk-X4SEXL4U.mjs';
|
|
18
|
+
import { providedDocId } from './chunk-J2BPXTD7.mjs';
|
|
19
|
+
import { getLanguage } from './chunk-PR4O7CAP.mjs';
|
|
20
|
+
import './chunk-RVM7AODE.mjs';
|
|
21
|
+
import './chunk-AV4IJKD2.mjs';
|
|
22
|
+
import { DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, MAX_INDEX_NAME_LENGTH, MAX_DOC_ID_LENGTH, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, INDEX_NAME_PATTERN } from './chunk-Q5DC6WAB.mjs';
|
|
11
23
|
import './chunk-TGP5M5R7.mjs';
|
|
12
|
-
import './chunk-
|
|
24
|
+
import './chunk-Y2F66IQJ.mjs';
|
|
13
25
|
import { MIN_OVERSAMPLE } from './chunk-ZJ4CSAB2.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import { isPatternTolerance } from './chunk-
|
|
26
|
+
import './chunk-QZN3MIJ3.mjs';
|
|
27
|
+
import { isPatternTolerance } from './chunk-T6CNO72J.mjs';
|
|
16
28
|
import { MAX_FILTER_DEPTH, MAX_FILTER_TESTS, MAX_FILTER_ARRAY_SIZE } from './chunk-WQBCBKY3.mjs';
|
|
17
|
-
import './chunk-
|
|
18
|
-
import { validateSchema, requireCreatableSchema,
|
|
29
|
+
import './chunk-A3UB2MXL.mjs';
|
|
30
|
+
import { validateSchema, requireCreatableSchema, encodeDocument, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES } from './chunk-CVQWQVFX.mjs';
|
|
31
|
+
import { DEFAULT_PAGE_SIZE, MAX_SORT_FIELDS, MAX_CURSOR_LENGTH, MAX_TOLERANCE, MAX_PREFIX_LENGTH, RESULT_WINDOW } from './chunk-FGMGUDHX.mjs';
|
|
19
32
|
import './chunk-KEHK2O6P.mjs';
|
|
20
33
|
import './chunk-GES7U2PM.mjs';
|
|
21
|
-
import
|
|
34
|
+
import './chunk-BVOJIYRV.mjs';
|
|
22
35
|
import './chunk-U2BKYEC7.mjs';
|
|
23
36
|
import { toComparableSortValue, compareComparableKeys, isSortMode, SORT_MODES, compareSortValues } from './chunk-R6A773WK.mjs';
|
|
24
37
|
import { compareCodePoints, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
25
38
|
import { collectAndReturnPages } from './chunk-5XNIRLFC.mjs';
|
|
26
39
|
import './chunk-YRX6XMOQ.mjs';
|
|
40
|
+
import './chunk-R7OSDAFK.mjs';
|
|
41
|
+
import { MAX_STORED_VECTOR_DIMENSION, MAX_NESTING_DEPTH } from './chunk-L5ORED7V.mjs';
|
|
27
42
|
import { ErrorCodes, NarsilError, describeError } from './chunk-TPJU7NDJ.mjs';
|
|
28
43
|
import { decode, encode } from '@msgpack/msgpack';
|
|
29
44
|
import { randomUUID } from 'crypto';
|
|
@@ -5512,12 +5527,14 @@ async function applyLocalReplicationEntry(core, entry) {
|
|
|
5512
5527
|
}
|
|
5513
5528
|
return;
|
|
5514
5529
|
}
|
|
5515
|
-
|
|
5530
|
+
const removedSpellings = manager.removedSpellingsOf(entry.documentId);
|
|
5531
|
+
applyDeleteEntry(entry, manager, vecIndexes, removedSpellings);
|
|
5516
5532
|
await core.orchestrator.replicateToWorkers({
|
|
5517
5533
|
type: "remove",
|
|
5518
5534
|
indexName: entry.indexName,
|
|
5519
5535
|
docId: entry.documentId,
|
|
5520
|
-
requestId: `replicate-entry-remove-${entry.indexName}-${entry.partitionId}-${entry.seqNo}
|
|
5536
|
+
requestId: `replicate-entry-remove-${entry.indexName}-${entry.partitionId}-${entry.seqNo}`,
|
|
5537
|
+
removedSpellings
|
|
5521
5538
|
});
|
|
5522
5539
|
} finally {
|
|
5523
5540
|
release();
|
|
@@ -5701,28 +5718,13 @@ async function receiveArchive(indexName, partitionId, source, schema) {
|
|
|
5701
5718
|
if (received === null) restoreFailed("partition archive holds no manifest", { indexName, partitionId });
|
|
5702
5719
|
return { language, analysisRevision, manifest: received, store };
|
|
5703
5720
|
}
|
|
5704
|
-
function emptyPartition(manager, partitionId) {
|
|
5705
|
-
return {
|
|
5706
|
-
indexName: manager.indexName,
|
|
5707
|
-
partitionId,
|
|
5708
|
-
totalPartitions: manager.partitionCount,
|
|
5709
|
-
language: manager.language.name,
|
|
5710
|
-
schema: {},
|
|
5711
|
-
docCount: 0,
|
|
5712
|
-
avgDocLength: 0,
|
|
5713
|
-
documents: {},
|
|
5714
|
-
invertedIndex: {},
|
|
5715
|
-
fieldIndexes: { numeric: {}, boolean: {}, enum: {}, geopoint: {} },
|
|
5716
|
-
statistics: { totalDocuments: 0, totalFieldLengths: {}, averageFieldLengths: {}, docFrequencies: {} }
|
|
5717
|
-
};
|
|
5718
|
-
}
|
|
5719
5721
|
async function replacePartition(manager, partitionId, archive) {
|
|
5720
5722
|
const vectorIndexes = manager.getVectorIndexes();
|
|
5721
5723
|
const held = [...manager.getPartition(partitionId).docIds()];
|
|
5722
5724
|
for (const vectorIndex of vectorIndexes.values()) {
|
|
5723
5725
|
for (const docId of held) if (vectorIndex.has(docId)) vectorIndex.remove(docId);
|
|
5724
5726
|
}
|
|
5725
|
-
manager.deserializePartition(partitionId,
|
|
5727
|
+
manager.deserializePartition(partitionId, emptySerializablePartition(manager, partitionId));
|
|
5726
5728
|
const entry = archive.manifest.partitions[0];
|
|
5727
5729
|
if (entry !== void 0) {
|
|
5728
5730
|
await loadPartitionSegments(archive.store, entry, manager, {
|
|
@@ -5802,7 +5804,7 @@ async function restoreReplicationPartition(core, engine, indexName, partitionId,
|
|
|
5802
5804
|
async function createClusterLocalEngine(config, hooks) {
|
|
5803
5805
|
requireKnownConfig(config);
|
|
5804
5806
|
const runnableConfig = await resolveRunnableConfig(config);
|
|
5805
|
-
const core = createEngineCore(runnableConfig, hooks, "partition");
|
|
5807
|
+
const core = await createEngineCore(runnableConfig, hooks, "partition");
|
|
5806
5808
|
await startEngineCore(core, runnableConfig);
|
|
5807
5809
|
core.orchestrator.shareMainThread();
|
|
5808
5810
|
const engine = createNarsilFromCore(core, runnableConfig);
|