@delali/narsil 0.3.1-next.74 → 0.3.1-next.75
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/{capabilities-CAMzmkAg.d.ts → capabilities-BHNksicw.d.ts} +16 -2
- package/dist/{chunk-Z3DQPOJQ.mjs → chunk-356UOTK2.mjs} +1 -1
- package/dist/chunk-7ODNRREZ.mjs +2050 -0
- package/dist/{chunk-T5ZWEWVD.mjs → chunk-AIUOAN7Y.mjs} +2 -2
- package/dist/{chunk-PO53FV4Q.mjs → chunk-AMGDG4ZJ.mjs} +1 -1
- package/dist/{chunk-LX4JERXI.mjs → chunk-BT62MUM5.mjs} +1 -1
- package/dist/{chunk-NOZUQM7J.mjs → chunk-BT6BI4GV.mjs} +41 -3
- package/dist/{chunk-LJYTW7GT.mjs → chunk-IBR6634K.mjs} +1 -1
- package/dist/{chunk-CUZOX6CN.mjs → chunk-LOARLB4F.mjs} +31 -27
- package/dist/{chunk-VKX2BPXD.mjs → chunk-NAMGDK45.mjs} +98 -19
- package/dist/{chunk-TVFLHM7M.mjs → chunk-PXDY5VRT.mjs} +3 -3
- package/dist/{chunk-I23G3IZC.mjs → chunk-UOJIV2NG.mjs} +1 -1
- package/dist/{chunk-3DDUNI6N.mjs → chunk-V3B24XR7.mjs} +7 -1
- package/dist/{chunk-CTOSGRM7.mjs → chunk-WL2GDSCV.mjs} +5 -5
- package/dist/{chunk-BVBIQQKG.mjs → chunk-YOVS4EV5.mjs} +16 -61
- package/dist/{client-C-I70ArH.d.ts → client-D4sXFS9f.d.ts} +2 -2
- package/dist/client.d.ts +6 -6
- package/dist/{config-C6Iw5rCX.d.ts → config-B-GRonqw.d.ts} +1 -1
- package/dist/{config-DJPH3IQB.d.ts → config-C1kbq1X2.d.ts} +1 -1
- package/dist/direct-executor-AVNWB73C.mjs +16 -0
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.mjs +1 -1
- package/dist/distribution.d.ts +5 -5
- package/dist/distribution.mjs +15 -15
- package/dist/{engine-B8eRPO7m.d.ts → engine-DcGSd5vh.d.ts} +1 -1
- package/dist/index.browser.mjs +72 -26
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +12 -13
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/{memory-DJEwWoCi.d.ts → memory-M9kPmYP8.d.ts} +78 -24
- package/dist/partial-words.mjs +4 -4
- package/dist/pattern.mjs +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +12 -13
- package/dist/react.d.ts +6 -6
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +34 -11
- package/dist/{tasks-BVmAKYBh.d.ts → tasks-A8se0J98.d.ts} +1 -1
- package/dist/{thread-W6DPKEF6.mjs → thread-BSIKT6ED.mjs} +14 -10
- package/dist/vector/search-worker.mjs +2 -2
- package/dist/workers/entry.mjs +3 -3
- package/package.json +8 -7
- package/dist/chunk-XW25X6AU.mjs +0 -614
- package/dist/chunk-ZKRV5M2P.mjs +0 -75
- package/dist/direct-executor-KFAGILJC.mjs +0 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NarsilConfig } from './config-
|
|
1
|
+
import { N as NarsilConfig } from './config-C1kbq1X2.js';
|
|
2
2
|
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './types-ChrVy4lH.js';
|
|
3
3
|
import { N as NodeTransport } from './types-Cb9kiY5P.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
-
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-
|
|
2
|
+
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-M9kPmYP8.js';
|
|
3
3
|
import { I as IndexConfig, A as AnyDocument } from './schema-DgyDijhf.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { createDirectExecutor } from './chunk-YOVS4EV5.mjs';
|
|
2
|
+
import './chunk-NAMGDK45.mjs';
|
|
3
|
+
import './chunk-4MQ5F4IL.mjs';
|
|
4
|
+
import './chunk-V3B24XR7.mjs';
|
|
5
|
+
import './chunk-TGP5M5R7.mjs';
|
|
6
|
+
import './chunk-AMGDG4ZJ.mjs';
|
|
7
|
+
import './chunk-ZJ4CSAB2.mjs';
|
|
8
|
+
import './chunk-2E35UM3G.mjs';
|
|
9
|
+
import './chunk-7ODNRREZ.mjs';
|
|
10
|
+
import './chunk-AIUOAN7Y.mjs';
|
|
11
|
+
import './chunk-UOJIV2NG.mjs';
|
|
12
|
+
import './chunk-356UOTK2.mjs';
|
|
13
|
+
import './chunk-KEHK2O6P.mjs';
|
|
14
|
+
import './chunk-U2BKYEC7.mjs';
|
|
15
|
+
import './chunk-IBR6634K.mjs';
|
|
16
|
+
import './chunk-I64LXKO3.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MAX_NODE_ID_LENGTH, MAX_WATCHERS } from '../../chunk-ORBLD3EL.mjs';
|
|
2
|
-
import { compareCodePoints } from '../../chunk-
|
|
2
|
+
import { compareCodePoints } from '../../chunk-IBR6634K.mjs';
|
|
3
3
|
import { NarsilError, ErrorCodes } from '../../chunk-I64LXKO3.mjs';
|
|
4
4
|
import { decode, encode } from '@msgpack/msgpack';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NODE_HEARTBEAT_TTL_MS } from '../../chunk-ORBLD3EL.mjs';
|
|
2
|
-
import { compareCodePoints } from '../../chunk-
|
|
2
|
+
import { compareCodePoints } from '../../chunk-IBR6634K.mjs';
|
|
3
3
|
|
|
4
4
|
// src/distribution/coordinator/in-memory.ts
|
|
5
5
|
var NODE_HEARTBEAT_PREFIX = "_narsil/node/";
|
package/dist/distribution.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-
|
|
2
|
-
export { c as ClusterControllerConfig, d as ClusterNodeInfo, e as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-
|
|
3
|
-
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-
|
|
1
|
+
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-B-GRonqw.js';
|
|
2
|
+
export { c as ClusterControllerConfig, d as ClusterNodeInfo, e as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-B-GRonqw.js';
|
|
3
|
+
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-M9kPmYP8.js';
|
|
4
4
|
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-DgyDijhf.js';
|
|
5
5
|
import { b as NodeCapacity, N as NodeRole } from './types-ChrVy4lH.js';
|
|
6
6
|
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, e as NodeEvent, a as NodeRegistration, P as PartitionAssignment, f as PartitionState, S as SchemaEvent, U as UnassignedReason } from './types-ChrVy4lH.js';
|
|
7
|
-
import { N as Narsil } from './engine-
|
|
7
|
+
import { N as Narsil } from './engine-DcGSd5vh.js';
|
|
8
8
|
export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-Cb9kiY5P.js';
|
|
9
|
-
import './config-
|
|
9
|
+
import './config-C1kbq1X2.js';
|
|
10
10
|
import './adapters-79OIa4xm.js';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/distribution.mjs
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
|
|
2
|
-
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-
|
|
3
|
-
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, buildArchiveFromMemory, indexMetadataOf, encodeIndexConfiguration, 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-
|
|
4
|
-
import { now, listBindingOf, requireSurfaceFormsForPartialFields, queryBindingOf, hitsKeptPerGroup, clampLimit, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-
|
|
2
|
+
import { validateIndexName, indexConfigKey, withPartitionCount, indexSettingsOf, putIndexMetadata, getIndexMetadata, getClusterIndexConfig } from './chunk-PXDY5VRT.mjs';
|
|
3
|
+
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, buildArchiveFromMemory, indexMetadataOf, encodeIndexConfiguration, 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-LOARLB4F.mjs';
|
|
4
|
+
import { now, listBindingOf, requireSurfaceFormsForPartialFields, queryBindingOf, hitsKeptPerGroup, clampLimit, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-WL2GDSCV.mjs';
|
|
5
5
|
import { ReplicationMessageTypes, TransportErrorCodes, ClusterMessageTypes, QueryMessageTypes, TransportError } from './chunk-GCM3JFVA.mjs';
|
|
6
|
-
import { providedDocId, MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-
|
|
7
|
-
import { generateId, decodeVectorFilePayload, bytesToVectors, isDead, FILTER_EXPRESSION_KEYS, FIELD_FILTER_OPERATORS } from './chunk-
|
|
8
|
-
import { oversampledShardSize, resolveProjection, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, normalizeSort, sortModesOf, encodePageCursor, applyProjection, readSortValues, requireWithinResultWindow, fnv1a, sortSignatureEntry,
|
|
6
|
+
import { providedDocId, MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-BT62MUM5.mjs';
|
|
7
|
+
import { generateId, decodeVectorFilePayload, bytesToVectors, isDead, FILTER_EXPRESSION_KEYS, FIELD_FILTER_OPERATORS } from './chunk-YOVS4EV5.mjs';
|
|
8
|
+
import { oversampledShardSize, resolveProjection, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, normalizeSort, sortModesOf, encodePageCursor, applyProjection, readSortValues, requireWithinResultWindow, fnv1a, sortSignatureEntry, filterTestCount, fnv1aUint32s, mergePartitionStats } from './chunk-NAMGDK45.mjs';
|
|
9
9
|
import { getLanguage } from './chunk-4MQ5F4IL.mjs';
|
|
10
|
-
import { DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, DEFAULT_PAGE_SIZE, MAX_SUGGEST_SCATTER_LIMIT, MAX_INDEX_NAME_LENGTH, MAX_SORT_FIELDS, MAX_DOC_ID_LENGTH, MAX_CURSOR_LENGTH, MAX_TOLERANCE, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, INDEX_NAME_PATTERN, MAX_PREFIX_LENGTH, RESULT_WINDOW } from './chunk-
|
|
10
|
+
import { DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, DEFAULT_PAGE_SIZE, MAX_SUGGEST_SCATTER_LIMIT, MAX_INDEX_NAME_LENGTH, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, MAX_SORT_FIELDS, MAX_DOC_ID_LENGTH, MAX_CURSOR_LENGTH, MAX_TOLERANCE, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, INDEX_NAME_PATTERN, MAX_PREFIX_LENGTH, RESULT_WINDOW, MAX_FILTER_ARRAY_SIZE } from './chunk-V3B24XR7.mjs';
|
|
11
11
|
import './chunk-TGP5M5R7.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-AMGDG4ZJ.mjs';
|
|
13
13
|
import { MIN_OVERSAMPLE } from './chunk-ZJ4CSAB2.mjs';
|
|
14
14
|
import './chunk-2E35UM3G.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './chunk-
|
|
19
|
-
import { validateSchema, requireCreatableSchema, encodeDocument, MAX_STORED_VECTOR_DIMENSION, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MAX_NESTING_DEPTH } from './chunk-Z3DQPOJQ.mjs';
|
|
15
|
+
import './chunk-7ODNRREZ.mjs';
|
|
16
|
+
import './chunk-AIUOAN7Y.mjs';
|
|
17
|
+
import './chunk-UOJIV2NG.mjs';
|
|
18
|
+
import { validateSchema, requireCreatableSchema, encodeDocument, MAX_STORED_VECTOR_DIMENSION, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MAX_NESTING_DEPTH } from './chunk-356UOTK2.mjs';
|
|
20
19
|
import './chunk-KEHK2O6P.mjs';
|
|
21
20
|
import './chunk-U2BKYEC7.mjs';
|
|
22
|
-
import { compareCodePoints, toComparableSortValue, compareComparableKeys, isSortMode, SORT_MODES, exceedsCodePoints, compareSortValues } from './chunk-
|
|
21
|
+
import { compareCodePoints, toComparableSortValue, compareComparableKeys, isSortMode, SORT_MODES, exceedsCodePoints, compareSortValues } from './chunk-IBR6634K.mjs';
|
|
23
22
|
import './chunk-POWOTUKJ.mjs';
|
|
24
23
|
import { ErrorCodes, NarsilError, describeError } from './chunk-I64LXKO3.mjs';
|
|
25
24
|
import { encode, decode } from '@msgpack/msgpack';
|
|
@@ -6601,6 +6600,7 @@ function validateFetchResultPayload(decoded) {
|
|
|
6601
6600
|
|
|
6602
6601
|
// src/distribution/query/validators/filters.ts
|
|
6603
6602
|
var GEO_UNITS = ["km", "mi", "m"];
|
|
6603
|
+
var TEXT_OPERATORS = /* @__PURE__ */ new Set(["startsWith", "endsWith", "contains", "wildcard", "regex"]);
|
|
6604
6604
|
function throwTooLong(value, fieldLabel, errorCode) {
|
|
6605
6605
|
throwInvalid(
|
|
6606
6606
|
errorCode,
|
|
@@ -6773,7 +6773,7 @@ function validateLeafOperator(opKey, opValue, leafLabel, errorCode) {
|
|
|
6773
6773
|
validateBetween(opValue, opLabel, errorCode);
|
|
6774
6774
|
return;
|
|
6775
6775
|
}
|
|
6776
|
-
if (opKey
|
|
6776
|
+
if (TEXT_OPERATORS.has(opKey)) {
|
|
6777
6777
|
validateBoundedString(opValue, opLabel, errorCode);
|
|
6778
6778
|
return;
|
|
6779
6779
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
-
import { B as BatchResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, L as ListParams, h as ListResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, m as NarsilEventMap } from './memory-
|
|
2
|
+
import { B as BatchResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, L as ListParams, h as ListResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, m as NarsilEventMap } from './memory-M9kPmYP8.js';
|
|
3
3
|
import { A as AnyDocument, a as InsertOptions, W as WriteOptions, I as IndexConfig, P as PartitionConfig } from './schema-DgyDijhf.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.browser.mjs
CHANGED
|
@@ -852,7 +852,7 @@ function platformPatternSearch() {
|
|
|
852
852
|
// src/core/pattern-index/registry.ts
|
|
853
853
|
var registered2 = null;
|
|
854
854
|
function isPatternSearchModule(value) {
|
|
855
|
-
return value !== null && typeof value === "object" && value.name === "pattern" && "createIndex" in value && typeof value.createIndex === "function" && "readArrays" in value && typeof value.readArrays === "function" && "mergeArrays" in value && typeof value.mergeArrays === "function" && "matchInto" in value && typeof value.matchInto === "function";
|
|
855
|
+
return value !== null && typeof value === "object" && value.name === "pattern" && "createIndex" in value && typeof value.createIndex === "function" && "readArrays" in value && typeof value.readArrays === "function" && "mergeArrays" in value && typeof value.mergeArrays === "function" && "matchInto" in value && typeof value.matchInto === "function" && "checkExpression" in value && typeof value.checkExpression === "function" && "expressionFootprint" in value && typeof value.expressionFootprint === "function";
|
|
856
856
|
}
|
|
857
857
|
function registerPatternSearch(module) {
|
|
858
858
|
if (!isPatternSearchModule(module)) {
|
|
@@ -2632,6 +2632,7 @@ var MATCHER_STATE_OVERHEAD_BYTES = 96;
|
|
|
2632
2632
|
var PATTERN_WORK_FLUSH_UNITS = 65536;
|
|
2633
2633
|
var PATTERN_RUN_CODE_POINTS = 3;
|
|
2634
2634
|
var PATTERN_TEST_OPERATORS = ["eq", "ne", "in", "nin", "startsWith", "endsWith", "contains"];
|
|
2635
|
+
var PATTERN_EXPRESSION_OPERATORS = ["wildcard", "regex"];
|
|
2635
2636
|
|
|
2636
2637
|
// src/geo/constants.ts
|
|
2637
2638
|
var DEG_TO_RAD = Math.PI / 180;
|
|
@@ -4406,7 +4407,24 @@ function computeFacets(state, matched, config, schema) {
|
|
|
4406
4407
|
}
|
|
4407
4408
|
|
|
4408
4409
|
// src/core/pattern-index/host.ts
|
|
4409
|
-
var
|
|
4410
|
+
var NO_SOURCES = [];
|
|
4411
|
+
var foldSources = null;
|
|
4412
|
+
function sourcesByFold() {
|
|
4413
|
+
if (foldSources !== null) return foldSources;
|
|
4414
|
+
const sources = /* @__PURE__ */ new Map();
|
|
4415
|
+
const add = (source, folded) => {
|
|
4416
|
+
const known = sources.get(folded);
|
|
4417
|
+
if (known === void 0) sources.set(folded, [source]);
|
|
4418
|
+
else known.push(source);
|
|
4419
|
+
};
|
|
4420
|
+
for (const [source, folded] of singleFoldTable()) add(source, folded);
|
|
4421
|
+
foldSources = sources;
|
|
4422
|
+
return sources;
|
|
4423
|
+
}
|
|
4424
|
+
function singleFoldSources(folded) {
|
|
4425
|
+
return sourcesByFold().get(folded) ?? NO_SOURCES;
|
|
4426
|
+
}
|
|
4427
|
+
var PATTERN_HOST = { appendFoldedCodePoint, singleFoldSources };
|
|
4410
4428
|
function patternIndexOf(indexes, fieldPath) {
|
|
4411
4429
|
let index = indexes.get(fieldPath);
|
|
4412
4430
|
if (index === void 0) {
|
|
@@ -5739,6 +5757,8 @@ function evaluatePatternTests(fieldPath, filter, context, bitsets) {
|
|
|
5739
5757
|
if (typeof filter.startsWith === "string") bitsets.push(matching("startsWith", [filter.startsWith]));
|
|
5740
5758
|
if (typeof filter.endsWith === "string") bitsets.push(matching("endsWith", [filter.endsWith]));
|
|
5741
5759
|
if (typeof filter.contains === "string") bitsets.push(matching("contains", [filter.contains]));
|
|
5760
|
+
if (typeof filter.wildcard === "string") bitsets.push(matching("wildcard", [filter.wildcard]));
|
|
5761
|
+
if (typeof filter.regex === "string") bitsets.push(matching("regex", [filter.regex]));
|
|
5742
5762
|
}
|
|
5743
5763
|
|
|
5744
5764
|
// src/filters/field-tests.ts
|
|
@@ -5943,6 +5963,8 @@ var FIELD_FILTER_OPERATORS = [
|
|
|
5943
5963
|
"startsWith",
|
|
5944
5964
|
"endsWith",
|
|
5945
5965
|
"contains",
|
|
5966
|
+
"wildcard",
|
|
5967
|
+
"regex",
|
|
5946
5968
|
"caseFold",
|
|
5947
5969
|
"containsAll",
|
|
5948
5970
|
"matchesAny",
|
|
@@ -6158,14 +6180,16 @@ function requirePatternField(fieldPath, operator, type) {
|
|
|
6158
6180
|
operator
|
|
6159
6181
|
);
|
|
6160
6182
|
}
|
|
6183
|
+
function requireTextLength(fieldPath, operator, text) {
|
|
6184
|
+
if (!exceedsCodePoints(text, MAX_PATTERN_TEXT_CODE_POINTS)) return;
|
|
6185
|
+
invalid(
|
|
6186
|
+
`The text of "${operator}" on pattern field "${fieldPath}" holds more than ${MAX_PATTERN_TEXT_CODE_POINTS} code points`,
|
|
6187
|
+
fieldPath,
|
|
6188
|
+
operator
|
|
6189
|
+
);
|
|
6190
|
+
}
|
|
6161
6191
|
function requirePatternText(fieldPath, operator, text, caseFold) {
|
|
6162
|
-
|
|
6163
|
-
invalid(
|
|
6164
|
-
`The text of "${operator}" on pattern field "${fieldPath}" holds more than ${MAX_PATTERN_TEXT_CODE_POINTS} code points`,
|
|
6165
|
-
fieldPath,
|
|
6166
|
-
operator
|
|
6167
|
-
);
|
|
6168
|
-
}
|
|
6192
|
+
requireTextLength(fieldPath, operator, text);
|
|
6169
6193
|
if (caseFold && foldedCodePointCount(text) > MAX_PATTERN_POSITIONS) {
|
|
6170
6194
|
invalid(
|
|
6171
6195
|
`The text of "${operator}" on pattern field "${fieldPath}" has a case fold of more than ${MAX_PATTERN_POSITIONS} code points, while a pattern holds at most ${MAX_PATTERN_POSITIONS} positions`,
|
|
@@ -6175,6 +6199,23 @@ function requirePatternText(fieldPath, operator, text, caseFold) {
|
|
|
6175
6199
|
}
|
|
6176
6200
|
}
|
|
6177
6201
|
var ELEMENT_OPERATORS2 = ["matchesAny", "containsAll"];
|
|
6202
|
+
function requireExpressions(fieldPath, filter, type) {
|
|
6203
|
+
for (const operator of PATTERN_EXPRESSION_OPERATORS) {
|
|
6204
|
+
const pattern = filter[operator];
|
|
6205
|
+
if (pattern === void 0) continue;
|
|
6206
|
+
if (typeof pattern !== "string")
|
|
6207
|
+
invalid(`"${operator}" on field "${fieldPath}" must be a string`, fieldPath, operator);
|
|
6208
|
+
requirePatternField(fieldPath, operator, type);
|
|
6209
|
+
requireTextLength(fieldPath, operator, pattern);
|
|
6210
|
+
requirePatternSearch(fieldPath).checkExpression(
|
|
6211
|
+
operator,
|
|
6212
|
+
pattern,
|
|
6213
|
+
filter.caseFold === true,
|
|
6214
|
+
fieldPath,
|
|
6215
|
+
PATTERN_HOST
|
|
6216
|
+
);
|
|
6217
|
+
}
|
|
6218
|
+
}
|
|
6178
6219
|
function requirePatternOperands(fieldPath, filter, type) {
|
|
6179
6220
|
if (filter.contains !== void 0) {
|
|
6180
6221
|
if (typeof filter.contains !== "string") {
|
|
@@ -6188,6 +6229,7 @@ function requirePatternOperands(fieldPath, filter, type) {
|
|
|
6188
6229
|
}
|
|
6189
6230
|
requirePatternField(fieldPath, "caseFold", type);
|
|
6190
6231
|
}
|
|
6232
|
+
requireExpressions(fieldPath, filter, type);
|
|
6191
6233
|
if (parsedTypeOf(type)?.pattern !== true) return;
|
|
6192
6234
|
const caseFold = filter.caseFold === true;
|
|
6193
6235
|
for (const operator of PATTERN_TEST_OPERATORS) {
|
|
@@ -30653,57 +30695,61 @@ var POSITIONS_PER_WORD = 32;
|
|
|
30653
30695
|
function positionWords(positions) {
|
|
30654
30696
|
return Math.max(1, Math.ceil(positions / POSITIONS_PER_WORD));
|
|
30655
30697
|
}
|
|
30656
|
-
function automatonBytes(positions) {
|
|
30657
|
-
return 2 * positionWords(positions) * Uint32Array.BYTES_PER_ELEMENT + positions * MATCHER_CODE_POINT_BYTES;
|
|
30658
|
-
}
|
|
30659
30698
|
function smallestMatcherBytes(positions) {
|
|
30660
|
-
return
|
|
30699
|
+
return 2 * positionWords(positions) * Uint32Array.BYTES_PER_ELEMENT + positions * MATCHER_CODE_POINT_BYTES + positions * MATCHER_SIMULATION_BYTES_PER_POSITION + MATCHER_STATE_OVERHEAD_BYTES + positions * Uint32Array.BYTES_PER_ELEMENT;
|
|
30661
30700
|
}
|
|
30662
|
-
function widestPatternSplit(
|
|
30663
|
-
return Math.max(1, Math.floor(MATCHER_STATE_BUDGET_BYTES /
|
|
30701
|
+
function widestPatternSplit(footprintBytes) {
|
|
30702
|
+
return Math.max(1, Math.floor(MATCHER_STATE_BUDGET_BYTES / Math.max(1, footprintBytes)));
|
|
30664
30703
|
}
|
|
30665
30704
|
|
|
30666
30705
|
// src/core/pattern-index/query-positions.ts
|
|
30667
30706
|
function isRecord6(value) {
|
|
30668
30707
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
30669
30708
|
}
|
|
30670
|
-
function
|
|
30671
|
-
if (typeof text !== "string") return
|
|
30672
|
-
return caseFold ? foldedCodePointCount(text) : codePointCount(text);
|
|
30709
|
+
function literalFootprint(text, caseFold) {
|
|
30710
|
+
if (typeof text !== "string") return null;
|
|
30711
|
+
return smallestMatcherBytes(caseFold ? foldedCodePointCount(text) : codePointCount(text));
|
|
30673
30712
|
}
|
|
30674
30713
|
function larger(left, right) {
|
|
30675
30714
|
if (left === null) return right;
|
|
30676
30715
|
if (right === null) return left;
|
|
30677
30716
|
return Math.max(left, right);
|
|
30678
30717
|
}
|
|
30679
|
-
function largestTestOf(filter) {
|
|
30718
|
+
function largestTestOf(filter, module) {
|
|
30680
30719
|
const caseFold = filter.caseFold === true;
|
|
30681
30720
|
let largest = null;
|
|
30682
30721
|
for (const operator of PATTERN_TEST_OPERATORS) {
|
|
30683
30722
|
const operand = filter[operator];
|
|
30684
30723
|
if (operand === void 0) continue;
|
|
30685
30724
|
const texts = Array.isArray(operand) ? operand : [operand];
|
|
30686
|
-
for (const text of texts) largest = larger(largest,
|
|
30725
|
+
for (const text of texts) largest = larger(largest, literalFootprint(text, caseFold));
|
|
30726
|
+
}
|
|
30727
|
+
for (const operator of PATTERN_EXPRESSION_OPERATORS) {
|
|
30728
|
+
const pattern = filter[operator];
|
|
30729
|
+
if (typeof pattern !== "string") continue;
|
|
30730
|
+
largest = larger(largest, module.expressionFootprint(operator, pattern, caseFold, PATTERN_HOST));
|
|
30687
30731
|
}
|
|
30688
30732
|
return largest;
|
|
30689
30733
|
}
|
|
30690
|
-
function largestIn(expression, patternFields) {
|
|
30734
|
+
function largestIn(expression, patternFields, module) {
|
|
30691
30735
|
let largest = null;
|
|
30692
30736
|
if (isRecord6(expression.fields)) {
|
|
30693
30737
|
for (const [fieldPath, filter] of Object.entries(expression.fields)) {
|
|
30694
|
-
if (patternFields.has(fieldPath) && isRecord6(filter)) largest = larger(largest, largestTestOf(filter));
|
|
30738
|
+
if (patternFields.has(fieldPath) && isRecord6(filter)) largest = larger(largest, largestTestOf(filter, module));
|
|
30695
30739
|
}
|
|
30696
30740
|
}
|
|
30697
30741
|
const nested = [...expression.and ?? [], ...expression.or ?? []];
|
|
30698
30742
|
if (expression.not !== void 0) nested.push(expression.not);
|
|
30699
|
-
for (const child of nested) largest = larger(largest, largestIn(child, patternFields));
|
|
30743
|
+
for (const child of nested) largest = larger(largest, largestIn(child, patternFields, module));
|
|
30700
30744
|
return largest;
|
|
30701
30745
|
}
|
|
30702
|
-
function
|
|
30746
|
+
function largestPatternFootprint(expression, schema) {
|
|
30703
30747
|
if (expression === void 0) return null;
|
|
30748
|
+
const module = availablePatternSearch();
|
|
30749
|
+
if (module === null) return null;
|
|
30704
30750
|
const patternFields = /* @__PURE__ */ new Set();
|
|
30705
30751
|
for (const { path, pattern } of schemaFieldsOf(schema)) if (pattern) patternFields.add(path);
|
|
30706
|
-
return patternFields.size === 0 ? null : largestIn(expression, patternFields);
|
|
30752
|
+
return patternFields.size === 0 ? null : largestIn(expression, patternFields, module);
|
|
30707
30753
|
}
|
|
30708
30754
|
|
|
30709
30755
|
// src/engine/orchestration/search.ts
|
|
@@ -30770,7 +30816,7 @@ function isWorkCapError(err) {
|
|
|
30770
30816
|
function patternSplitWidth(state, indexName, params) {
|
|
30771
30817
|
const schema = state.indexRegistry.get(indexName)?.config.schema;
|
|
30772
30818
|
if (schema === void 0) return Number.POSITIVE_INFINITY;
|
|
30773
|
-
const largest =
|
|
30819
|
+
const largest = largestPatternFootprint(params.filters, schema);
|
|
30774
30820
|
if (largest === null) return Number.POSITIVE_INFINITY;
|
|
30775
30821
|
if (typeof SharedArrayBuffer !== "function") return 1;
|
|
30776
30822
|
return widestPatternSplit(largest);
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import { P as PartialWordSearch } from './partial-words-DTIHO8G4.js';
|
|
|
4
4
|
import { P as PatternSearch } from './pattern-Cledccbl.js';
|
|
5
5
|
import { L as LanguageModule } from './language-DB8KG1z5.js';
|
|
6
6
|
export { T as TokenizerConfig } from './language-DB8KG1z5.js';
|
|
7
|
-
export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, n as ComparisonFilter, D as DocumentImportResult, o as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, p as FacetResult, q as FieldFilter, r as FilterExpression, G as GeoFilter, s as GeoPolygonFilter, t as GeoRadiusFilter, u as GroupConfig, v as GroupReducer, w as GroupResult, H as HighlightConfig, x as HighlightMatch, y as Hit, z as HybridConfig, I as IndexInfo, g as IndexStats, L as ListParams, h as ListResult, J as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, f as NarsilEventHandlers, m as NarsilEventMap, P as PartitionStatsResult, j as PreflightResult, K as PresenceFilter, O as ProcessMemoryReport, R as QueryCoverage, Q as QueryParams, e as QueryResult, T as ScoreComponents, U as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, W as SortField, X as SortSpec, Y as StringFilter, k as SuggestParams, l as SuggestResult, Z as TermMatchPolicy, V as VectorMaintenanceResult, _ as VectorQueryConfig, $ as WorkerCopyReport, i as isNarsilError } from './memory-
|
|
8
|
-
import { N as NarsilConfig } from './config-
|
|
9
|
-
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-
|
|
10
|
-
import { N as Narsil } from './engine-
|
|
11
|
-
export { B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations } from './engine-
|
|
7
|
+
export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, n as ComparisonFilter, D as DocumentImportResult, o as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, p as FacetResult, q as FieldFilter, r as FilterExpression, G as GeoFilter, s as GeoPolygonFilter, t as GeoRadiusFilter, u as GroupConfig, v as GroupReducer, w as GroupResult, H as HighlightConfig, x as HighlightMatch, y as Hit, z as HybridConfig, I as IndexInfo, g as IndexStats, L as ListParams, h as ListResult, J as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, f as NarsilEventHandlers, m as NarsilEventMap, P as PartitionStatsResult, j as PreflightResult, K as PresenceFilter, O as ProcessMemoryReport, R as QueryCoverage, Q as QueryParams, e as QueryResult, T as ScoreComponents, U as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, W as SortField, X as SortSpec, Y as StringFilter, k as SuggestParams, l as SuggestResult, Z as TermMatchPolicy, V as VectorMaintenanceResult, _ as VectorQueryConfig, $ as WorkerCopyReport, i as isNarsilError } from './memory-M9kPmYP8.js';
|
|
8
|
+
import { N as NarsilConfig } from './config-C1kbq1X2.js';
|
|
9
|
+
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-C1kbq1X2.js';
|
|
10
|
+
import { N as Narsil } from './engine-DcGSd5vh.js';
|
|
11
|
+
export { B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations } from './engine-DcGSd5vh.js';
|
|
12
12
|
export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter } from './adapters-79OIa4xm.js';
|
|
13
13
|
export { i as isSimdAvailable } from './simd-DW5AtJ6B.js';
|
|
14
14
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-LOARLB4F.mjs';
|
|
2
|
+
import './chunk-WL2GDSCV.mjs';
|
|
3
3
|
import './chunk-GCM3JFVA.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
-
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerPartialWordSearch,
|
|
6
|
-
|
|
4
|
+
import './chunk-BT62MUM5.mjs';
|
|
5
|
+
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerPartialWordSearch, registerStopWords, registerTokenizer } from './chunk-YOVS4EV5.mjs';
|
|
6
|
+
export { registerPatternSearch } from './chunk-NAMGDK45.mjs';
|
|
7
7
|
export { getLanguage, registerLanguage } from './chunk-4MQ5F4IL.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-V3B24XR7.mjs';
|
|
9
9
|
import './chunk-TGP5M5R7.mjs';
|
|
10
|
-
export { isSimdAvailable } from './chunk-
|
|
10
|
+
export { isSimdAvailable } from './chunk-AMGDG4ZJ.mjs';
|
|
11
11
|
import './chunk-ZJ4CSAB2.mjs';
|
|
12
12
|
import './chunk-2E35UM3G.mjs';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import './chunk-Z3DQPOJQ.mjs';
|
|
13
|
+
import './chunk-7ODNRREZ.mjs';
|
|
14
|
+
import './chunk-AIUOAN7Y.mjs';
|
|
15
|
+
export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-UOJIV2NG.mjs';
|
|
16
|
+
import './chunk-356UOTK2.mjs';
|
|
18
17
|
import './chunk-KEHK2O6P.mjs';
|
|
19
18
|
import './chunk-U2BKYEC7.mjs';
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-IBR6634K.mjs';
|
|
21
20
|
import './chunk-POWOTUKJ.mjs';
|
|
22
21
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-I64LXKO3.mjs';
|
|
@@ -28,33 +28,43 @@ type ComparisonFilter = {
|
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* The engine tests a text field against this filter for equality, for a text
|
|
31
|
-
* range, or with the set and
|
|
31
|
+
* range, or with the set, prefix, and pattern tests.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* `contains`
|
|
36
|
-
*
|
|
33
|
+
* On a `string[]`, `verbatim[]`, or `enum[]` field, the engine tests each
|
|
34
|
+
* element of the list on its own. A document passes `eq`, `in`, `startsWith`,
|
|
35
|
+
* `endsWith`, `contains`, `wildcard`, or `regex` when one element passes the
|
|
36
|
+
* test. However, a document passes `ne` or `nin` only when every element
|
|
37
|
+
* differs from the values.
|
|
37
38
|
*
|
|
38
39
|
* The engine applies the range tests `gt`, `gte`, `lt`, `lte`, and `between`
|
|
39
|
-
* to a single `string` or `verbatim` field whose type includes `sortable
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* first and their raw code points only where the folds are
|
|
40
|
+
* to a single `string` or `verbatim` field whose type includes `sortable`. It
|
|
41
|
+
* throws `SEARCH_INVALID_FILTER` for a text range on any other field. It
|
|
42
|
+
* orders the values as a sort on the field does, so it compares their case
|
|
43
|
+
* folds first and compares their raw code points only where the folds are
|
|
44
|
+
* equal.
|
|
43
45
|
*
|
|
44
46
|
* A pattern field is a `verbatim` or `verbatim[]` field, or a `string` or
|
|
45
|
-
* `string[]` field whose type includes `pattern`. On
|
|
46
|
-
* answers `eq`, `ne`, `in`, `nin`, `startsWith`, `endsWith`,
|
|
47
|
-
* from the field's pattern index
|
|
47
|
+
* `string[]` field whose type includes `pattern`. On a pattern field, the
|
|
48
|
+
* engine answers `eq`, `ne`, `in`, `nin`, `startsWith`, `endsWith`,
|
|
49
|
+
* `contains`, `wildcard`, and `regex` from the field's pattern index, and
|
|
50
|
+
* `caseFold` applies to each of those tests. The engine compares the code
|
|
51
|
+
* points of each value as they are stored, with no Unicode normalisation.
|
|
52
|
+
*
|
|
48
53
|
* On an `enum` or `enum[]` field, the engine answers `eq`, `ne`, `in`, `nin`,
|
|
49
|
-
* `startsWith`, and `endsWith` from the field's index of values.
|
|
50
|
-
* `
|
|
51
|
-
*
|
|
52
|
-
* `
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
54
|
+
* `startsWith`, and `endsWith` from the field's index of values. A `string` or
|
|
55
|
+
* `string[]` field whose type leaves out `pattern` keeps no index of whole
|
|
56
|
+
* values, so the engine throws `SEARCH_INVALID_FILTER` for those six tests,
|
|
57
|
+
* and for `matchesAny` and `containsAll`, on such a field.
|
|
58
|
+
*
|
|
59
|
+
* The engine also throws `SEARCH_INVALID_FILTER` in these cases:
|
|
60
|
+
*
|
|
61
|
+
* - The filter sets `contains`, `wildcard`, `regex`, or `caseFold` on a field
|
|
62
|
+
* that is not a pattern field.
|
|
63
|
+
* - The text or the pattern of a test on a pattern field holds more than 1,024
|
|
64
|
+
* code points.
|
|
65
|
+
* - A literal test under `caseFold` has a text whose case fold holds more than
|
|
66
|
+
* 2,048 code points.
|
|
67
|
+
* - A `wildcard` or `regex` pattern breaks its syntax or one of its limits.
|
|
58
68
|
*
|
|
59
69
|
* @public
|
|
60
70
|
*/
|
|
@@ -79,11 +89,55 @@ type StringFilter = Pick<ComparisonFilter, 'eq' | 'ne'> & {
|
|
|
79
89
|
endsWith?: string;
|
|
80
90
|
/** This matches a pattern field whose value holds the text anywhere in it. */
|
|
81
91
|
contains?: string;
|
|
92
|
+
/**
|
|
93
|
+
* This matches a pattern field when the whole value matches the wildcard
|
|
94
|
+
* pattern. For example, `INV-*-2024` matches `INV-0042-2024`.
|
|
95
|
+
*
|
|
96
|
+
* In the pattern, `*` matches any sequence of code points, including an
|
|
97
|
+
* empty one, and `?` matches exactly one code point. Write `\` before a code
|
|
98
|
+
* point to match that code point itself, so `\*` matches an asterisk.
|
|
99
|
+
*
|
|
100
|
+
* The engine throws `SEARCH_INVALID_FILTER` for a pattern that ends in a
|
|
101
|
+
* `\` with no code point after it. It throws the same error for a pattern
|
|
102
|
+
* with more than 2,048 positions. Each `*`, each `?`, and each other code
|
|
103
|
+
* point counts as one position, except that under `caseFold` a code point
|
|
104
|
+
* counts once for each code point of its case fold.
|
|
105
|
+
*/
|
|
106
|
+
wildcard?: string;
|
|
107
|
+
/**
|
|
108
|
+
* This matches a pattern field when some part of the value matches the
|
|
109
|
+
* regular expression. `^` and `$` match only at the start and at the end of
|
|
110
|
+
* the whole value.
|
|
111
|
+
*
|
|
112
|
+
* The engine accepts literal code points, `.`, `\d`, `\w`, and `\s`, sets
|
|
113
|
+
* such as `[a-z]` and `[^0-9]`, groups, and `|`. It also accepts the repeats
|
|
114
|
+
* `*`, `+`, `?`, `{n}`, `{n,}`, and `{n,m}`, the anchors `^` and `$`, the
|
|
115
|
+
* word edge `\b`, and number ranges such as `<1-65535>`. A number range
|
|
116
|
+
* matches the digits of any whole number from its low end to its high end.
|
|
117
|
+
* Write `\` before an ASCII punctuation mark to match the mark itself. The
|
|
118
|
+
* `.` matches any code point, including a line break.
|
|
119
|
+
*
|
|
120
|
+
* The matcher never backtracks, so it checks a value in at most as many
|
|
121
|
+
* steps as the value's code points multiplied by the pattern's positions.
|
|
122
|
+
*
|
|
123
|
+
* The engine throws `SEARCH_INVALID_FILTER` for any construct outside that
|
|
124
|
+
* syntax, such as a back-reference, a lookaround, a lazy repeat, or an inline
|
|
125
|
+
* flag. It throws the same error when the groups of a pattern nest more than
|
|
126
|
+
* 32 deep, when a count is above 2,048, and when a pattern holds more than
|
|
127
|
+
* 2,048 positions. When the operator of an HTTP server sets its `allowRegex`
|
|
128
|
+
* option to false, the server refuses every `regex` test.
|
|
129
|
+
*/
|
|
130
|
+
regex?: string;
|
|
82
131
|
/**
|
|
83
132
|
* When this is true, the engine compares the case fold of each value of a
|
|
84
|
-
* pattern field with the case fold of the text, so a test for `error`
|
|
85
|
-
* `ERROR`. It applies to `eq`, `ne`, `in`, `nin`, `startsWith`,
|
|
86
|
-
* and `
|
|
133
|
+
* pattern field with the case fold of the text, so a test for `error`
|
|
134
|
+
* matches `ERROR`. It applies to `eq`, `ne`, `in`, `nin`, `startsWith`,
|
|
135
|
+
* `endsWith`, `contains`, `wildcard`, and `regex`.
|
|
136
|
+
*
|
|
137
|
+
* Under `caseFold`, a set that does not open with `^` can also match a
|
|
138
|
+
* sequence of code points. When a member that the set holds on its own folds
|
|
139
|
+
* to several code points, the set matches that whole fold, so `[ß]` matches
|
|
140
|
+
* `ss`.
|
|
87
141
|
*/
|
|
88
142
|
caseFold?: boolean;
|
|
89
143
|
};
|
package/dist/partial-words.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { partialWordSearchModule } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { partialWordSearchModule } from './chunk-AIUOAN7Y.mjs';
|
|
2
|
+
import './chunk-UOJIV2NG.mjs';
|
|
3
|
+
import './chunk-356UOTK2.mjs';
|
|
4
4
|
import './chunk-KEHK2O6P.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-IBR6634K.mjs';
|
|
6
6
|
import './chunk-I64LXKO3.mjs';
|
|
7
7
|
|
|
8
8
|
// src/partial-words/index.ts
|
package/dist/pattern.mjs
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-LOARLB4F.mjs';
|
|
2
|
+
import '../../chunk-WL2GDSCV.mjs';
|
|
3
3
|
import '../../chunk-GCM3JFVA.mjs';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-BT62MUM5.mjs';
|
|
5
|
+
import '../../chunk-YOVS4EV5.mjs';
|
|
6
|
+
import '../../chunk-NAMGDK45.mjs';
|
|
7
7
|
import '../../chunk-4MQ5F4IL.mjs';
|
|
8
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-V3B24XR7.mjs';
|
|
9
9
|
import '../../chunk-TGP5M5R7.mjs';
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-AMGDG4ZJ.mjs';
|
|
11
11
|
import '../../chunk-ZJ4CSAB2.mjs';
|
|
12
12
|
import '../../chunk-2E35UM3G.mjs';
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
16
|
-
import '../../chunk-
|
|
17
|
-
import '../../chunk-Z3DQPOJQ.mjs';
|
|
13
|
+
import '../../chunk-7ODNRREZ.mjs';
|
|
14
|
+
import '../../chunk-AIUOAN7Y.mjs';
|
|
15
|
+
import '../../chunk-UOJIV2NG.mjs';
|
|
16
|
+
import '../../chunk-356UOTK2.mjs';
|
|
18
17
|
import '../../chunk-KEHK2O6P.mjs';
|
|
19
18
|
import '../../chunk-U2BKYEC7.mjs';
|
|
20
|
-
import '../../chunk-
|
|
19
|
+
import '../../chunk-IBR6634K.mjs';
|
|
21
20
|
import '../../chunk-POWOTUKJ.mjs';
|
|
22
21
|
import '../../chunk-I64LXKO3.mjs';
|
|
23
22
|
|
package/dist/react.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { N as NarsilError, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, Q as QueryParams, j as PreflightResult, e as QueryResult, k as SuggestParams, l as SuggestResult } from './memory-
|
|
2
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-
|
|
3
|
-
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-
|
|
4
|
-
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-
|
|
1
|
+
import { N as NarsilError, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, Q as QueryParams, j as PreflightResult, e as QueryResult, k as SuggestParams, l as SuggestResult } from './memory-M9kPmYP8.js';
|
|
2
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-M9kPmYP8.js';
|
|
3
|
+
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-A8se0J98.js';
|
|
4
|
+
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-A8se0J98.js';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
import { N as Narsil } from './engine-
|
|
7
|
-
import { N as NarsilClient, I as ImportSource } from './client-
|
|
6
|
+
import { N as Narsil } from './engine-DcGSd5vh.js';
|
|
7
|
+
import { N as NarsilClient, I as ImportSource } from './client-D4sXFS9f.js';
|
|
8
8
|
import { A as AnyDocument } from './schema-DgyDijhf.js';
|
|
9
9
|
import './adapters-79OIa4xm.js';
|
|
10
10
|
|