@delali/narsil 0.3.1-next.85 → 0.3.1-next.86
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/{chunk-NIWDQTZB.mjs → chunk-B3F7LZXM.mjs} +19 -12
- package/dist/{chunk-67MQF5CV.mjs → chunk-IDLP54FH.mjs} +2 -2
- package/dist/{chunk-RCSXJCI5.mjs → chunk-XPK3GB2P.mjs} +1 -1
- package/dist/{direct-executor-NY7ZTZIH.mjs → direct-executor-SI2QV4YI.mjs} +2 -2
- package/dist/distribution.mjs +3 -3
- package/dist/index.browser.mjs +19 -12
- package/dist/index.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.mjs +3 -3
- package/dist/vector/search-worker.mjs +1 -1
- package/dist/workers/entry.mjs +1 -1
- package/package.json +7 -7
|
@@ -391,9 +391,16 @@ function openVectorBlock(handle, threadSlot) {
|
|
|
391
391
|
const simd = storage.kind === "shared-memory" ? createSharedArenaSimd(storage.memory) : storage.kind === "private-memory" ? storage.simd : null;
|
|
392
392
|
const hasScratch = simd !== null && threadSlot >= 0 && threadSlot < VECTOR_SCRATCH_SLOTS;
|
|
393
393
|
const scratchSlot = hasScratch ? threadSlot : 0;
|
|
394
|
-
let float32View
|
|
395
|
-
let byteView
|
|
396
|
-
let dataView
|
|
394
|
+
let float32View;
|
|
395
|
+
let byteView;
|
|
396
|
+
let dataView;
|
|
397
|
+
function rebindViews() {
|
|
398
|
+
const buffer = blockBuffer(handle);
|
|
399
|
+
float32View = fixedView(buffer, Float32Array);
|
|
400
|
+
byteView = fixedView(buffer, Uint8Array);
|
|
401
|
+
dataView = new DataView(buffer, 0, byteView.length);
|
|
402
|
+
}
|
|
403
|
+
rebindViews();
|
|
397
404
|
return {
|
|
398
405
|
handle,
|
|
399
406
|
simd,
|
|
@@ -401,15 +408,15 @@ function openVectorBlock(handle, threadSlot) {
|
|
|
401
408
|
scratchByteOffset: scratchSlot * layout.scratchStride,
|
|
402
409
|
stagedOrdinal: NOTHING_STAGED,
|
|
403
410
|
float32(neededLength) {
|
|
404
|
-
if (neededLength > float32View.length)
|
|
411
|
+
if (neededLength > float32View.length) rebindViews();
|
|
405
412
|
return float32View;
|
|
406
413
|
},
|
|
407
414
|
bytes(neededLength) {
|
|
408
|
-
if (neededLength > byteView.length)
|
|
415
|
+
if (neededLength > byteView.length) rebindViews();
|
|
409
416
|
return byteView;
|
|
410
417
|
},
|
|
411
418
|
data(neededLength) {
|
|
412
|
-
if (neededLength >
|
|
419
|
+
if (neededLength > byteView.length) rebindViews();
|
|
413
420
|
return dataView;
|
|
414
421
|
}
|
|
415
422
|
};
|
|
@@ -3069,10 +3076,10 @@ function openSharedQuantizer(store, layout, metric) {
|
|
|
3069
3076
|
if (simd === null || !block.hasScratch) return generic;
|
|
3070
3077
|
const presentView = codePresent;
|
|
3071
3078
|
const limit = Math.min(presentView.length, capacity);
|
|
3072
|
-
const
|
|
3079
|
+
const { slotsOffset, slotStride } = layout;
|
|
3080
|
+
const data = block.data(slotsOffset + slotStride);
|
|
3073
3081
|
const dataLength = data.byteLength;
|
|
3074
3082
|
const queryOffset = block.scratchByteOffset;
|
|
3075
|
-
const { slotsOffset, slotStride } = layout;
|
|
3076
3083
|
return (ordinal) => {
|
|
3077
3084
|
if (ordinal < 0 || ordinal >= limit || block.stagedOrdinal !== QUERY_STAGED) return generic(ordinal);
|
|
3078
3085
|
if (presentView[ordinal] !== 1) return Number.POSITIVE_INFINITY;
|
|
@@ -3101,9 +3108,9 @@ function openSharedQuantizer(store, layout, metric) {
|
|
|
3101
3108
|
if (simd === null) return distanceBetween;
|
|
3102
3109
|
const presentView = codePresent;
|
|
3103
3110
|
const limit = Math.min(presentView.length, capacity);
|
|
3104
|
-
const data = block.data(0);
|
|
3105
|
-
const dataLength = data.byteLength;
|
|
3106
3111
|
const { slotsOffset, slotStride } = layout;
|
|
3112
|
+
const data = block.data(slotsOffset + slotStride);
|
|
3113
|
+
const dataLength = data.byteLength;
|
|
3107
3114
|
return (ordA, ordB) => {
|
|
3108
3115
|
if (ordA < 0 || ordB < 0 || ordA >= limit || ordB >= limit) return distanceBetween(ordA, ordB);
|
|
3109
3116
|
if (presentView[ordA] !== 1 || presentView[ordB] !== 1) return Number.POSITIVE_INFINITY;
|
|
@@ -3329,7 +3336,7 @@ function openSharedVectorStore(initial, threadSlot) {
|
|
|
3329
3336
|
if (block.stagedOrdinal === ordinal) return true;
|
|
3330
3337
|
const source = vectorFor(ordinal, coldScratchA);
|
|
3331
3338
|
if (source === null) return false;
|
|
3332
|
-
block.float32(
|
|
3339
|
+
block.float32(block.scratchByteOffset / 4 + dimension).set(source, block.scratchByteOffset / 4);
|
|
3333
3340
|
block.stagedOrdinal = ordinal;
|
|
3334
3341
|
return true;
|
|
3335
3342
|
}
|
|
@@ -3343,7 +3350,7 @@ function openSharedVectorStore(initial, threadSlot) {
|
|
|
3343
3350
|
function stageQuery(block) {
|
|
3344
3351
|
if (currentQuery === null) return false;
|
|
3345
3352
|
if (block.stagedOrdinal !== QUERY_STAGED) {
|
|
3346
|
-
block.float32(
|
|
3353
|
+
block.float32(block.scratchByteOffset / 4 + dimension).set(currentQuery, block.scratchByteOffset / 4);
|
|
3347
3354
|
block.stagedOrdinal = QUERY_STAGED;
|
|
3348
3355
|
}
|
|
3349
3356
|
return true;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, queryBindingOf, executeQuery, executePreflight, executeSuggest, executeListDocuments, validateDocId } from './chunk-4D6OH4EF.mjs';
|
|
2
2
|
import { ReplicationMessageTypes } from './chunk-GCM3JFVA.mjs';
|
|
3
3
|
import { WIRE_BATCH_BUDGET, resolveVectorText, bindEngineCore, restoredConfigFields, restoredEmbedding, collectRequiredFieldFailures, embedChunkDocuments, providedDocId, requireDocumentObject, admitInsert, asBatchInsertError, requireMatchingDocId, embedDocumentFields, assertDocumentCarriesMappedVectors, admitBufferedUpsert, createPendingAdmissions, recordPendingAdmission } from './chunk-2453RJYK.mjs';
|
|
4
|
-
import { NATIVE_CRC32_MIN_BYTES, generateId, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, splitWorkerBudget, resolveWorkerCount, createDirectExecutor, createPartitionRouter, MAX_FILE_BYTES, resolveWorkerEntry, missingWorkerEntry, readHeapStatistics, nodeThreadId, CHECKSUM_YIELD_CHUNK_BYTES, resolvePartitionInsertOptions, resolveIndexAnalysis, createPartitionManager, buildSegmentPayload, createFrozenSegment, resolveRequestThreadCount, vectorsPerFile, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, createPartitionIndex, selectionKeeps, decodeMapWithoutFields, isCompositePartition, segmentArraysOf, mergeSegmentContents, survivorDocumentsOf, partitionStateOf, VECTOR_FILE_MAX_VECTORS, deadBytesFor, mergeFrozenSegments, workerResourceLimits, decodeVectorIndexParts, bytesToVectors, freezeSegmentShared, DEFAULT_BACKPRESSURE_LIMIT, DEFAULT_REQUEST_TIMEOUT_MS, SHUTDOWN_TIMEOUT_MS, decodeVectorFilePayload, decodeVectorGraphPartPayload, assembleGraphParts, countDead, encodeSegmentState, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH, VALID_HNSW_METRICS, spawnNodeWorker, decodeVectorGraphPayload, graphPartsOfEarlierPayload, decodeStoredDocument, isDead } from './chunk-
|
|
4
|
+
import { NATIVE_CRC32_MIN_BYTES, generateId, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, splitWorkerBudget, resolveWorkerCount, createDirectExecutor, createPartitionRouter, MAX_FILE_BYTES, resolveWorkerEntry, missingWorkerEntry, readHeapStatistics, nodeThreadId, CHECKSUM_YIELD_CHUNK_BYTES, resolvePartitionInsertOptions, resolveIndexAnalysis, createPartitionManager, buildSegmentPayload, createFrozenSegment, resolveRequestThreadCount, vectorsPerFile, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, createPartitionIndex, selectionKeeps, decodeMapWithoutFields, isCompositePartition, segmentArraysOf, mergeSegmentContents, survivorDocumentsOf, partitionStateOf, VECTOR_FILE_MAX_VECTORS, deadBytesFor, mergeFrozenSegments, workerResourceLimits, decodeVectorIndexParts, bytesToVectors, freezeSegmentShared, DEFAULT_BACKPRESSURE_LIMIT, DEFAULT_REQUEST_TIMEOUT_MS, SHUTDOWN_TIMEOUT_MS, decodeVectorFilePayload, decodeVectorGraphPartPayload, assembleGraphParts, countDead, encodeSegmentState, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH, VALID_HNSW_METRICS, spawnNodeWorker, decodeVectorGraphPayload, graphPartsOfEarlierPayload, decodeStoredDocument, isDead } from './chunk-XPK3GB2P.mjs';
|
|
5
5
|
import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, oversampledFacetConfig, fnv1a, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, setNestedValue } from './chunk-XYDP7CCJ.mjs';
|
|
6
6
|
import { detectRuntime, getLanguage } from './chunk-OLXM65YH.mjs';
|
|
7
7
|
import { MAX_INDEX_CONFIGURATION_BYTES, STATISTICS_BROADCAST_INTERVAL_MS, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, HEAP_PRESSURE_WARNING_FRACTION, MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, FOREIGN_STATS_TTL_MS, MAX_IMPORT_REFUSALS_REPORTED, BATCH_CHUNK_SIZE, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION, EXPORT_CHUNK_BYTES } from './chunk-ZCKPRCYI.mjs';
|
|
8
|
-
import { releaseLocksHeldBy } from './chunk-
|
|
8
|
+
import { releaseLocksHeldBy } from './chunk-B3F7LZXM.mjs';
|
|
9
9
|
import { requireSearchBackendSettings } from './chunk-NFF5TDRG.mjs';
|
|
10
10
|
import { DEFAULT_PATTERN_WORK_CAP, MATCHER_STATE_BUDGET_BYTES } from './chunk-SREPGC6O.mjs';
|
|
11
11
|
import { getNestedValue, parseVectorDimension } from './chunk-4VBG6PEH.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createGrowingPartialWords, requirePatternSearchFor, requirePartialWordSearchFor, buildPartialWordTableFrom, patternIndexOf, encodePartialSpellingsOf, countPartialSpelling, joinPatternWorkMeter, countsWithoutScores, fanOutMatchCount, fanOutQuery, sanitizeGlobalStats, expandPartialWords, computeFacets, cloneProjected, projectionKeepsField, setNestedValue, fnv1a, partialSpellingsOfDocuments, createFrozenPartialWords, requirePatternSearch, PATTERN_HOST, validatedFilterOf, everyValueFacetConfig, mergeFacets, kWayMerge, polygonContainment, polygonBoxes, radiusBoxes, locationCode, undeclaredFilterField, coveringRanges } from './chunk-XYDP7CCJ.mjs';
|
|
2
2
|
import { getLanguage, detectRuntime } from './chunk-OLXM65YH.mjs';
|
|
3
3
|
import { MAX_DOC_ID_LENGTH } from './chunk-ZCKPRCYI.mjs';
|
|
4
|
-
import { SCRATCH_SLOTS_PER_THREAD_POOL, osqRecordBytes, openSharedVectorField, osqBitsOf, createVectorStore, DISK_STORAGE_BLOCK_BYTES, createOsqQuantizer, STORE_UNPLACED_COUNT, STORE_REMOVED_COUNT, STORE_LIVE_COUNT, ordinalFilterValues, UNPLACED_FLAG_CHUNK_ORDINALS, magnitude, graphWithoutNodes, createHNSWIndex, nativeStoreScratchBytes, nativeScoresOf, toScore, ordinalFilterHas, createOrdinalFilter, addToOrdinalFilter, removeFromOrdinalFilter, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, topLayerInParts, STORE_CALIBRATION_GENERATION, toDistance, sharedMemoryAvailable, requireWholeNeighbourLists, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, releaseLocksHeldBy, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_INSERT_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS } from './chunk-
|
|
4
|
+
import { SCRATCH_SLOTS_PER_THREAD_POOL, osqRecordBytes, openSharedVectorField, osqBitsOf, createVectorStore, DISK_STORAGE_BLOCK_BYTES, createOsqQuantizer, STORE_UNPLACED_COUNT, STORE_REMOVED_COUNT, STORE_LIVE_COUNT, ordinalFilterValues, UNPLACED_FLAG_CHUNK_ORDINALS, magnitude, graphWithoutNodes, createHNSWIndex, nativeStoreScratchBytes, nativeScoresOf, toScore, ordinalFilterHas, createOrdinalFilter, addToOrdinalFilter, removeFromOrdinalFilter, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, topLayerInParts, STORE_CALIBRATION_GENERATION, toDistance, sharedMemoryAvailable, requireWholeNeighbourLists, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, releaseLocksHeldBy, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_INSERT_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS } from './chunk-B3F7LZXM.mjs';
|
|
5
5
|
import { noteFallback } from './chunk-NFF5TDRG.mjs';
|
|
6
6
|
import { GrowableUint32, bitsetHas, createBitSet, bitsetSet, bitsetOrInto, bitsetAndNotInto, bitsetAndInto, bitsetFromSet, bitsetIsEmpty } from './chunk-SREPGC6O.mjs';
|
|
7
7
|
import { GEO_UNIT_METRES } from './chunk-WQBCBKY3.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { createDirectExecutor } from './chunk-
|
|
1
|
+
export { createDirectExecutor } from './chunk-XPK3GB2P.mjs';
|
|
2
2
|
import './chunk-XYDP7CCJ.mjs';
|
|
3
3
|
import './chunk-OLXM65YH.mjs';
|
|
4
4
|
import './chunk-ZCKPRCYI.mjs';
|
|
5
5
|
import './chunk-TGP5M5R7.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-B3F7LZXM.mjs';
|
|
7
7
|
import './chunk-ZJ4CSAB2.mjs';
|
|
8
8
|
import './chunk-NFF5TDRG.mjs';
|
|
9
9
|
import './chunk-SREPGC6O.mjs';
|
package/dist/distribution.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
|
|
2
2
|
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-GNYXCLJS.mjs';
|
|
3
|
-
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, buildArchiveFromMemory, indexMetadataOf, archiveStream, applyIndexEntry, applyDeleteEntry, requireConfigurationWithinSizeLimit, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, createForwardBatchResultMessage, memoryCheckpointStore, readSnapshotArchive, createByteReader, openChecksummedEnvelope, loadPartitionSegments, readListedFile, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage, validateReplicationEntry, crc32Init, crc32Final, crc32Update, computeEntryChecksum, createEntryMessage, createEntryBatchMessage, createInsyncConfirmMessage, validateAckPayload, createInsyncRemoveMessage, validateInsyncConfirmPayload, createInsyncAddMessage } from './chunk-
|
|
3
|
+
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, buildArchiveFromMemory, indexMetadataOf, archiveStream, applyIndexEntry, applyDeleteEntry, requireConfigurationWithinSizeLimit, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, createForwardBatchResultMessage, memoryCheckpointStore, readSnapshotArchive, createByteReader, openChecksummedEnvelope, loadPartitionSegments, readListedFile, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage, validateReplicationEntry, crc32Init, crc32Final, crc32Update, computeEntryChecksum, createEntryMessage, createEntryBatchMessage, createInsyncConfirmMessage, validateAckPayload, createInsyncRemoveMessage, validateInsyncConfirmPayload, createInsyncAddMessage } from './chunk-IDLP54FH.mjs';
|
|
4
4
|
import { now, listBindingOf, requireSurfaceFormsForPartialFields, queryBindingOf, hitsKeptPerGroup, clampLimit, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-4D6OH4EF.mjs';
|
|
5
5
|
import { ReplicationMessageTypes, TransportErrorCodes, ClusterMessageTypes, QueryMessageTypes, TransportError } from './chunk-GCM3JFVA.mjs';
|
|
6
6
|
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET, providedDocId } from './chunk-2453RJYK.mjs';
|
|
7
|
-
import { generateId, readHeapStatistics, decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-
|
|
7
|
+
import { generateId, readHeapStatistics, decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-XPK3GB2P.mjs';
|
|
8
8
|
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-XYDP7CCJ.mjs';
|
|
9
9
|
import { getLanguage } from './chunk-OLXM65YH.mjs';
|
|
10
10
|
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-ZCKPRCYI.mjs';
|
|
11
11
|
import './chunk-TGP5M5R7.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-B3F7LZXM.mjs';
|
|
13
13
|
import { MIN_OVERSAMPLE } from './chunk-ZJ4CSAB2.mjs';
|
|
14
14
|
import './chunk-NFF5TDRG.mjs';
|
|
15
15
|
import { isPatternTolerance } from './chunk-SREPGC6O.mjs';
|
package/dist/index.browser.mjs
CHANGED
|
@@ -12146,9 +12146,16 @@ function openVectorBlock(handle, threadSlot) {
|
|
|
12146
12146
|
const simd = storage.kind === "shared-memory" ? createSharedArenaSimd(storage.memory) : storage.kind === "private-memory" ? storage.simd : null;
|
|
12147
12147
|
const hasScratch = simd !== null && threadSlot >= 0 && threadSlot < VECTOR_SCRATCH_SLOTS;
|
|
12148
12148
|
const scratchSlot = hasScratch ? threadSlot : 0;
|
|
12149
|
-
let float32View
|
|
12150
|
-
let byteView
|
|
12151
|
-
let dataView
|
|
12149
|
+
let float32View;
|
|
12150
|
+
let byteView;
|
|
12151
|
+
let dataView;
|
|
12152
|
+
function rebindViews() {
|
|
12153
|
+
const buffer = blockBuffer(handle);
|
|
12154
|
+
float32View = fixedView(buffer, Float32Array);
|
|
12155
|
+
byteView = fixedView(buffer, Uint8Array);
|
|
12156
|
+
dataView = new DataView(buffer, 0, byteView.length);
|
|
12157
|
+
}
|
|
12158
|
+
rebindViews();
|
|
12152
12159
|
return {
|
|
12153
12160
|
handle,
|
|
12154
12161
|
simd,
|
|
@@ -12156,15 +12163,15 @@ function openVectorBlock(handle, threadSlot) {
|
|
|
12156
12163
|
scratchByteOffset: scratchSlot * layout.scratchStride,
|
|
12157
12164
|
stagedOrdinal: NOTHING_STAGED,
|
|
12158
12165
|
float32(neededLength) {
|
|
12159
|
-
if (neededLength > float32View.length)
|
|
12166
|
+
if (neededLength > float32View.length) rebindViews();
|
|
12160
12167
|
return float32View;
|
|
12161
12168
|
},
|
|
12162
12169
|
bytes(neededLength) {
|
|
12163
|
-
if (neededLength > byteView.length)
|
|
12170
|
+
if (neededLength > byteView.length) rebindViews();
|
|
12164
12171
|
return byteView;
|
|
12165
12172
|
},
|
|
12166
12173
|
data(neededLength) {
|
|
12167
|
-
if (neededLength >
|
|
12174
|
+
if (neededLength > byteView.length) rebindViews();
|
|
12168
12175
|
return dataView;
|
|
12169
12176
|
}
|
|
12170
12177
|
};
|
|
@@ -12806,10 +12813,10 @@ function openSharedQuantizer(store, layout, metric) {
|
|
|
12806
12813
|
if (simd === null || !block.hasScratch) return generic;
|
|
12807
12814
|
const presentView = codePresent;
|
|
12808
12815
|
const limit = Math.min(presentView.length, capacity);
|
|
12809
|
-
const
|
|
12816
|
+
const { slotsOffset, slotStride } = layout;
|
|
12817
|
+
const data = block.data(slotsOffset + slotStride);
|
|
12810
12818
|
const dataLength = data.byteLength;
|
|
12811
12819
|
const queryOffset = block.scratchByteOffset;
|
|
12812
|
-
const { slotsOffset, slotStride } = layout;
|
|
12813
12820
|
return (ordinal) => {
|
|
12814
12821
|
if (ordinal < 0 || ordinal >= limit || block.stagedOrdinal !== QUERY_STAGED) return generic(ordinal);
|
|
12815
12822
|
if (presentView[ordinal] !== 1) return Number.POSITIVE_INFINITY;
|
|
@@ -12838,9 +12845,9 @@ function openSharedQuantizer(store, layout, metric) {
|
|
|
12838
12845
|
if (simd === null) return distanceBetween;
|
|
12839
12846
|
const presentView = codePresent;
|
|
12840
12847
|
const limit = Math.min(presentView.length, capacity);
|
|
12841
|
-
const data = block.data(0);
|
|
12842
|
-
const dataLength = data.byteLength;
|
|
12843
12848
|
const { slotsOffset, slotStride } = layout;
|
|
12849
|
+
const data = block.data(slotsOffset + slotStride);
|
|
12850
|
+
const dataLength = data.byteLength;
|
|
12844
12851
|
return (ordA, ordB) => {
|
|
12845
12852
|
if (ordA < 0 || ordB < 0 || ordA >= limit || ordB >= limit) return distanceBetween(ordA, ordB);
|
|
12846
12853
|
if (presentView[ordA] !== 1 || presentView[ordB] !== 1) return Number.POSITIVE_INFINITY;
|
|
@@ -13304,7 +13311,7 @@ function openSharedVectorStore(initial, threadSlot) {
|
|
|
13304
13311
|
if (block.stagedOrdinal === ordinal) return true;
|
|
13305
13312
|
const source = vectorFor(ordinal, coldScratchA);
|
|
13306
13313
|
if (source === null) return false;
|
|
13307
|
-
block.float32(
|
|
13314
|
+
block.float32(block.scratchByteOffset / 4 + dimension).set(source, block.scratchByteOffset / 4);
|
|
13308
13315
|
block.stagedOrdinal = ordinal;
|
|
13309
13316
|
return true;
|
|
13310
13317
|
}
|
|
@@ -13318,7 +13325,7 @@ function openSharedVectorStore(initial, threadSlot) {
|
|
|
13318
13325
|
function stageQuery(block) {
|
|
13319
13326
|
if (currentQuery === null) return false;
|
|
13320
13327
|
if (block.stagedOrdinal !== QUERY_STAGED) {
|
|
13321
|
-
block.float32(
|
|
13328
|
+
block.float32(block.scratchByteOffset / 4 + dimension).set(currentQuery, block.scratchByteOffset / 4);
|
|
13322
13329
|
block.stagedOrdinal = QUERY_STAGED;
|
|
13323
13330
|
}
|
|
13324
13331
|
return true;
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-IDLP54FH.mjs';
|
|
2
2
|
import './chunk-4D6OH4EF.mjs';
|
|
3
3
|
import './chunk-GCM3JFVA.mjs';
|
|
4
4
|
import './chunk-2453RJYK.mjs';
|
|
5
|
-
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-
|
|
5
|
+
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-XPK3GB2P.mjs';
|
|
6
6
|
export { registerPartialWordSearch, registerPatternSearch } from './chunk-XYDP7CCJ.mjs';
|
|
7
7
|
export { getLanguage, registerLanguage } from './chunk-OLXM65YH.mjs';
|
|
8
8
|
import './chunk-ZCKPRCYI.mjs';
|
|
9
9
|
import './chunk-TGP5M5R7.mjs';
|
|
10
|
-
export { isSimdAvailable } from './chunk-
|
|
10
|
+
export { isSimdAvailable } from './chunk-B3F7LZXM.mjs';
|
|
11
11
|
import './chunk-ZJ4CSAB2.mjs';
|
|
12
12
|
import './chunk-NFF5TDRG.mjs';
|
|
13
13
|
import './chunk-SREPGC6O.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-
|
|
1
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-IDLP54FH.mjs';
|
|
2
2
|
import '../../chunk-4D6OH4EF.mjs';
|
|
3
3
|
import '../../chunk-GCM3JFVA.mjs';
|
|
4
4
|
import '../../chunk-2453RJYK.mjs';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-XPK3GB2P.mjs';
|
|
6
6
|
import '../../chunk-XYDP7CCJ.mjs';
|
|
7
7
|
import '../../chunk-OLXM65YH.mjs';
|
|
8
8
|
import '../../chunk-ZCKPRCYI.mjs';
|
|
9
9
|
import '../../chunk-TGP5M5R7.mjs';
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-B3F7LZXM.mjs';
|
|
11
11
|
import '../../chunk-ZJ4CSAB2.mjs';
|
|
12
12
|
import '../../chunk-NFF5TDRG.mjs';
|
|
13
13
|
import '../../chunk-SREPGC6O.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-
|
|
1
|
+
import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-B3F7LZXM.mjs';
|
|
2
2
|
import '../chunk-ZJ4CSAB2.mjs';
|
|
3
3
|
import '../chunk-NFF5TDRG.mjs';
|
|
4
4
|
import '../chunk-KEHK2O6P.mjs';
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -102,7 +102,7 @@ async function setup() {
|
|
|
102
102
|
} catch {
|
|
103
103
|
parentPort = null;
|
|
104
104
|
}
|
|
105
|
-
const { createDirectExecutor } = await import('../direct-executor-
|
|
105
|
+
const { createDirectExecutor } = await import('../direct-executor-SI2QV4YI.mjs');
|
|
106
106
|
const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
|
|
107
107
|
if (parentPort) {
|
|
108
108
|
const port = parentPort;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delali/narsil",
|
|
3
|
-
"version": "0.3.1-next.
|
|
3
|
+
"version": "0.3.1-next.86",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Distributed search engine with full-text, vector, hybrid, and geosearch. One engine, embedded or on a server, with a cross-language .nrsl format.",
|
|
6
6
|
"author": "Delali (https://sondelali.com)",
|
|
@@ -246,11 +246,11 @@
|
|
|
246
246
|
}
|
|
247
247
|
},
|
|
248
248
|
"optionalDependencies": {
|
|
249
|
-
"@delali/narsil-native-darwin-arm64": "0.3.1-next.
|
|
250
|
-
"@delali/narsil-native-darwin-x64": "0.3.1-next.
|
|
251
|
-
"@delali/narsil-native-linux-arm64": "0.3.1-next.
|
|
252
|
-
"@delali/narsil-native-linux-x64": "0.3.1-next.
|
|
253
|
-
"@delali/narsil-native-win32-arm64": "0.3.1-next.
|
|
254
|
-
"@delali/narsil-native-win32-x64": "0.3.1-next.
|
|
249
|
+
"@delali/narsil-native-darwin-arm64": "0.3.1-next.86",
|
|
250
|
+
"@delali/narsil-native-darwin-x64": "0.3.1-next.86",
|
|
251
|
+
"@delali/narsil-native-linux-arm64": "0.3.1-next.86",
|
|
252
|
+
"@delali/narsil-native-linux-x64": "0.3.1-next.86",
|
|
253
|
+
"@delali/narsil-native-win32-arm64": "0.3.1-next.86",
|
|
254
|
+
"@delali/narsil-native-win32-x64": "0.3.1-next.86"
|
|
255
255
|
}
|
|
256
256
|
}
|