@delali/narsil 0.3.1-next.129 → 0.3.1-next.131
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-26A5JFT2.mjs +89 -0
- package/dist/browser/{chunk-5D6NJD6C.mjs → chunk-2Y3CO4EQ.mjs} +342 -201
- package/dist/browser/{chunk-WLD6DDIX.mjs → chunk-AIIJDWMG.mjs} +1 -1
- package/dist/browser/{chunk-YAGXZU4W.mjs → chunk-D7WQF6DV.mjs} +2 -2
- package/dist/browser/{chunk-WZBTVTSU.mjs → chunk-M5UAAXGU.mjs} +2 -2
- package/dist/browser/{chunk-XTFJZHQP.mjs → chunk-NSCSR6MA.mjs} +15 -5
- package/dist/browser/{chunk-3NVZD52E.mjs → chunk-UDGB2MWT.mjs} +5 -28
- package/dist/browser/{chunk-II5POT55.mjs → chunk-VBBLTD7O.mjs} +4 -3
- package/dist/browser/chunk-VEGHFP2P.mjs +30 -0
- package/dist/browser/{durability-wiring-HCCC6BJB.mjs → durability-wiring-FNZSRH4N.mjs} +8 -6
- package/dist/browser/{module-S2VDU2JE.mjs → module-4HIMOQM5.mjs} +6 -5
- package/dist/browser/phrase-module-WESYVU7K.mjs +327 -0
- package/dist/browser/{restore-queue-BZ7WWEC4.mjs → restore-queue-GEZ54CA5.mjs} +1 -1
- package/dist/browser/{runtime-PL4TTFJE.mjs → runtime-3X7ZJ5T3.mjs} +2 -1
- package/dist/browser/{snapshot-RTUCHI2L.mjs → snapshot-V7VF6BN6.mjs} +25 -10
- package/dist/browser/{write-IMU7G5NU.mjs → write-YIC2MKRY.mjs} +7 -5
- package/dist/{capabilities-BTjv-tK8.d.ts → capabilities-B6WxrWxt.d.ts} +3 -10
- package/dist/{chunk-3XHFVYIQ.mjs → chunk-2C3WXBQS.mjs} +1 -1
- package/dist/{chunk-37RTD6KD.mjs → chunk-2JWNJSNE.mjs} +8 -8
- package/dist/{chunk-K76F5YYX.mjs → chunk-2MKX2SCO.mjs} +219 -58
- package/dist/{chunk-AN3CUMPZ.mjs → chunk-2SEL6SBS.mjs} +4 -95
- package/dist/{chunk-OPO5SE4J.mjs → chunk-2WBY4Y4M.mjs} +1 -1
- package/dist/{chunk-PTIJAZWL.mjs → chunk-4GDLFDPZ.mjs} +1 -1
- package/dist/chunk-4UMZ7KQL.mjs +17 -0
- package/dist/{chunk-TY64A3ZW.mjs → chunk-5LX6MOIB.mjs} +2 -2
- package/dist/{chunk-3LJVM6XM.mjs → chunk-5W7AEVTH.mjs} +2 -2
- package/dist/{chunk-PCRWCOZC.mjs → chunk-6M6SDH3S.mjs} +43 -23
- package/dist/{chunk-MGD7XETB.mjs → chunk-6SSVIW7Y.mjs} +19 -3
- package/dist/{chunk-5LC5VMDQ.mjs → chunk-7OIQ2SIO.mjs} +4 -4
- package/dist/{chunk-4XEVROSP.mjs → chunk-7XY6VD7B.mjs} +1 -1
- package/dist/{chunk-WI5Q3L43.mjs → chunk-CZ7ISLXA.mjs} +2 -0
- package/dist/{chunk-RC27KF7F.mjs → chunk-D5TFRB5G.mjs} +3 -15
- package/dist/{chunk-F4UKMTKM.mjs → chunk-EUCX5K74.mjs} +4 -4
- package/dist/{chunk-CTF6WFTX.mjs → chunk-F6AAXI7T.mjs} +3 -3
- package/dist/{chunk-DX2FI4LU.mjs → chunk-FQBFZAWG.mjs} +3 -1
- package/dist/{chunk-XTER67YM.mjs → chunk-HCGJKDZV.mjs} +1 -1
- package/dist/{chunk-WQYB4TNR.mjs → chunk-JJ6EUMXB.mjs} +2 -2
- package/dist/{chunk-2HQQ7Y5D.mjs → chunk-JT3YZGCE.mjs} +2 -2
- package/dist/chunk-JUKYYXSP.mjs +93 -0
- package/dist/{chunk-WUIDPBSY.mjs → chunk-K77FJXKS.mjs} +17 -7
- package/dist/{chunk-CSSCLRGY.mjs → chunk-NMXRXFGZ.mjs} +2 -2
- package/dist/{chunk-44TB6AIZ.mjs → chunk-NNO7CO3A.mjs} +1 -1
- package/dist/{chunk-EZIGAOUJ.mjs → chunk-OGLV4I3L.mjs} +6 -5
- package/dist/{chunk-FRSWYMXH.mjs → chunk-PATMDIMN.mjs} +1 -1
- package/dist/{chunk-AFOZR4ZQ.mjs → chunk-PU6SKH7O.mjs} +2 -2
- package/dist/{chunk-TB7YMDD5.mjs → chunk-RCMNL7RI.mjs} +650 -100
- package/dist/{chunk-Y4NOHICF.mjs → chunk-RNSC4NFI.mjs} +1 -1
- package/dist/{chunk-RYH3PASD.mjs → chunk-RWESFSJI.mjs} +21 -11
- package/dist/{chunk-QQS4QZQA.mjs → chunk-SOHMMNCH.mjs} +4 -4
- package/dist/{chunk-K73PZTBR.mjs → chunk-SZGRYEIC.mjs} +4 -4
- package/dist/{chunk-43Q7HAI2.mjs → chunk-T4OFG4IQ.mjs} +4 -4
- package/dist/{chunk-2YOAGAGF.mjs → chunk-TGHNXN7W.mjs} +59 -30
- package/dist/{chunk-J4LRE5Q7.mjs → chunk-WVRDRLIC.mjs} +6 -6
- package/dist/{chunk-XRXBCOA4.mjs → chunk-X5CNUKD5.mjs} +2 -2
- package/dist/{chunk-Y4US5EGH.mjs → chunk-Y2U5VVWX.mjs} +1 -1
- package/dist/{chunk-5VSTAJET.mjs → chunk-Y4BVTQ53.mjs} +2 -2
- package/dist/{chunk-M6MBSVIJ.mjs → chunk-ZR4VM4A6.mjs} +1 -1
- package/dist/{client-BOcveV7A.d.ts → client-gNAfaHcE.d.ts} +3 -3
- package/dist/client.d.ts +7 -8
- package/dist/client.mjs +2 -0
- package/dist/{config-CPmIY3aH.d.ts → config-CmYJO34X.d.ts} +3 -3
- package/dist/{events-pM0lna7M.d.ts → config-D1cDv3sE.d.ts} +431 -3
- package/dist/direct-executor-HQ4QVDX7.mjs +28 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +7 -8
- package/dist/distribution.mjs +85 -45
- package/dist/{durability-wiring-6R26AJDI.mjs → durability-wiring-S7OX2MAI.mjs} +27 -25
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-JjRAXpT3.d.ts → engine-m_Ddr1bz.d.ts} +2 -2
- package/dist/{index-DkQ2DlgR.d.ts → index-HYnqS1SE.d.ts} +2 -2
- package/dist/index.browser.mjs +5 -3
- package/dist/index.d.ts +6 -7
- package/dist/index.mjs +20 -18
- package/dist/{long-query-thread-6VLA6YJI.mjs → long-query-thread-BSL25PD6.mjs} +17 -15
- package/dist/{module-S4WGMFNW.mjs → module-2E4XYSGT.mjs} +11 -11
- package/dist/partial-words.mjs +7 -6
- package/dist/pattern.mjs +4 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +23 -21
- package/dist/phrase-module-JERF2IDG.mjs +329 -0
- package/dist/react.d.ts +11 -8
- package/dist/react.mjs +2 -0
- package/dist/{rerank-V4J4MIWR.mjs → rerank-DMMT4FZA.mjs} +6 -6
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{restore-queue-PUGWCPCX.mjs → restore-queue-JAMNRC6T.mjs} +1 -1
- package/dist/{runtime-TBFBQQQO.mjs → runtime-7MLQ7J64.mjs} +7 -7
- package/dist/{schema-DGAP_8HJ.d.ts → schema-BTXbHCqA.d.ts} +8 -5
- package/dist/server.d.ts +198 -11
- package/dist/server.mjs +30 -19
- package/dist/{snapshot-PUVSMV7E.mjs → snapshot-DOQLGGEX.mjs} +44 -29
- package/dist/synonyms.mjs +4 -3
- package/dist/tasks-Co8HfRD7.d.ts +704 -0
- package/dist/{thread-TA7QQBWP.mjs → thread-SKO7CN3R.mjs} +16 -14
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-TGKYT3C4.mjs → write-ZKR7SNRT.mjs} +22 -20
- package/openapi.json +5215 -0
- package/package.json +16 -8
- package/dist/config-C3YXk5Rn.d.ts +0 -412
- package/dist/direct-executor-ULA6V5HC.mjs +0 -26
- package/dist/tasks-txGvNz6h.d.ts +0 -302
package/dist/partial-words.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { partialWordSearchModule } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { partialWordSearchModule } from './chunk-EUCX5K74.mjs';
|
|
2
|
+
import './chunk-PU6SKH7O.mjs';
|
|
3
3
|
import './chunk-U476IXKQ.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-FQBFZAWG.mjs';
|
|
5
5
|
import './chunk-VJS4JFBQ.mjs';
|
|
6
6
|
import './chunk-GES7U2PM.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import './chunk-7XY6VD7B.mjs';
|
|
8
|
+
import './chunk-D5TFRB5G.mjs';
|
|
9
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
9
10
|
import './chunk-R6A773WK.mjs';
|
|
10
11
|
import './chunk-YTJCGKM4.mjs';
|
|
11
12
|
import './chunk-L5ORED7V.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
+
import './chunk-CZ7ISLXA.mjs';
|
|
13
14
|
|
|
14
15
|
// src/partial-words/index.ts
|
|
15
16
|
var partialWordSearch = partialWordSearchModule;
|
package/dist/pattern.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { patternSearchModule } from './chunk-
|
|
1
|
+
import { patternSearchModule } from './chunk-2SEL6SBS.mjs';
|
|
2
2
|
import './chunk-WQBCBKY3.mjs';
|
|
3
|
+
import './chunk-JUKYYXSP.mjs';
|
|
3
4
|
import './chunk-GES7U2PM.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
+
import './chunk-7XY6VD7B.mjs';
|
|
5
6
|
import './chunk-YTJCGKM4.mjs';
|
|
6
7
|
import './chunk-L5ORED7V.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
+
import './chunk-CZ7ISLXA.mjs';
|
|
8
9
|
|
|
9
10
|
// src/pattern/index.ts
|
|
10
11
|
var patternSearch = patternSearchModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as BM25FieldParams, P as PartitionConfig, e as ScoringMode, V as VectorIndexConfig } from '../../schema-
|
|
1
|
+
import { c as BM25FieldParams, P as PartitionConfig, e as ScoringMode, V as VectorIndexConfig } from '../../schema-BTXbHCqA.js';
|
|
2
2
|
import '../../adapters-BQFQ4PRz.js';
|
|
3
3
|
import '../../synonyms-CpOAHPa-.js';
|
|
4
4
|
|
|
@@ -192,6 +192,7 @@ interface IndexMetadata {
|
|
|
192
192
|
/** Persisted so recovered indexes keep collecting surface forms. */
|
|
193
193
|
surfaceForms?: boolean;
|
|
194
194
|
analysisRevision?: string;
|
|
195
|
+
arrayPositionGap?: number;
|
|
195
196
|
tokenizer?: string;
|
|
196
197
|
stopWords?: string;
|
|
197
198
|
stopWordList?: string[];
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
import { createDurableDirectory } from '../../chunk-
|
|
1
|
+
import { createDurableDirectory } from '../../chunk-NMXRXFGZ.mjs';
|
|
2
2
|
import '../../chunk-W55X2BYN.mjs';
|
|
3
3
|
import '../../chunk-HLPRHOSO.mjs';
|
|
4
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-2JWNJSNE.mjs';
|
|
5
|
+
import '../../chunk-7OIQ2SIO.mjs';
|
|
6
6
|
import '../../chunk-P36MUFEJ.mjs';
|
|
7
7
|
import '../../chunk-YH5OIL7B.mjs';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-TGHNXN7W.mjs';
|
|
9
|
+
import '../../chunk-6M6SDH3S.mjs';
|
|
10
|
+
import '../../chunk-JT3YZGCE.mjs';
|
|
11
|
+
import '../../chunk-NNO7CO3A.mjs';
|
|
12
12
|
import '../../chunk-AV4IJKD2.mjs';
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-RWESFSJI.mjs';
|
|
14
|
+
import '../../chunk-2MKX2SCO.mjs';
|
|
15
|
+
import '../../chunk-ZR4VM4A6.mjs';
|
|
16
16
|
import '../../chunk-ZATRDAYU.mjs';
|
|
17
17
|
import '../../chunk-EBIHRL7B.mjs';
|
|
18
18
|
import '../../chunk-HJSN7UYG.mjs';
|
|
19
|
-
import '../../chunk-
|
|
19
|
+
import '../../chunk-RNSC4NFI.mjs';
|
|
20
20
|
import '../../chunk-TGP5M5R7.mjs';
|
|
21
21
|
import '../../chunk-U2BKYEC7.mjs';
|
|
22
22
|
import '../../chunk-KOKM4PQN.mjs';
|
|
23
23
|
import '../../chunk-QSK35UC2.mjs';
|
|
24
|
-
import '../../chunk-
|
|
25
|
-
import '../../chunk-
|
|
24
|
+
import '../../chunk-2C3WXBQS.mjs';
|
|
25
|
+
import '../../chunk-2SEL6SBS.mjs';
|
|
26
26
|
import '../../chunk-WQBCBKY3.mjs';
|
|
27
|
-
import '../../chunk-
|
|
28
|
-
import '../../chunk-
|
|
27
|
+
import '../../chunk-JUKYYXSP.mjs';
|
|
28
|
+
import '../../chunk-EUCX5K74.mjs';
|
|
29
|
+
import '../../chunk-PU6SKH7O.mjs';
|
|
29
30
|
import '../../chunk-U476IXKQ.mjs';
|
|
30
|
-
import '../../chunk-
|
|
31
|
+
import '../../chunk-FQBFZAWG.mjs';
|
|
31
32
|
import '../../chunk-VJS4JFBQ.mjs';
|
|
32
33
|
import '../../chunk-GES7U2PM.mjs';
|
|
33
|
-
import '../../chunk-
|
|
34
|
-
import '../../chunk-
|
|
34
|
+
import '../../chunk-7XY6VD7B.mjs';
|
|
35
|
+
import '../../chunk-6SSVIW7Y.mjs';
|
|
35
36
|
import '../../chunk-X5CV2E2B.mjs';
|
|
36
37
|
import '../../chunk-7X5JST5L.mjs';
|
|
37
|
-
import '../../chunk-
|
|
38
|
+
import '../../chunk-D5TFRB5G.mjs';
|
|
39
|
+
import '../../chunk-4UMZ7KQL.mjs';
|
|
38
40
|
import '../../chunk-R6A773WK.mjs';
|
|
39
41
|
import '../../chunk-YTJCGKM4.mjs';
|
|
40
42
|
import '../../chunk-UJWGQIXU.mjs';
|
|
41
|
-
import '../../chunk-
|
|
43
|
+
import '../../chunk-HCGJKDZV.mjs';
|
|
42
44
|
import '../../chunk-22YPZVMG.mjs';
|
|
43
45
|
import '../../chunk-RFBLQLLZ.mjs';
|
|
44
46
|
import '../../chunk-L5ORED7V.mjs';
|
|
45
|
-
import '../../chunk-
|
|
47
|
+
import '../../chunk-CZ7ISLXA.mjs';
|
|
46
48
|
|
|
47
49
|
// src/persistence/durability/rebuild.ts
|
|
48
50
|
async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = [], keepsWriteRecords = false) {
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { createBitSet, bitsetIsEmpty, GrowableUint32, bitsetHas, bitsetSet } from './chunk-JUKYYXSP.mjs';
|
|
2
|
+
import { MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-FQBFZAWG.mjs';
|
|
3
|
+
import { PHRASE_ROWS_START, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-4UMZ7KQL.mjs';
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
|
|
5
|
+
|
|
6
|
+
// src/core/partition/phrase-matching.ts
|
|
7
|
+
var UINT32_BITS = 32;
|
|
8
|
+
var WorkTally = class {
|
|
9
|
+
constructor(meter) {
|
|
10
|
+
this.meter = meter;
|
|
11
|
+
}
|
|
12
|
+
pending = 0;
|
|
13
|
+
add(units) {
|
|
14
|
+
this.pending += units;
|
|
15
|
+
if (this.meter !== void 0 && this.pending >= this.meter.flushUnits) this.flush();
|
|
16
|
+
}
|
|
17
|
+
tickClock(units) {
|
|
18
|
+
this.meter?.clock?.tick(units);
|
|
19
|
+
}
|
|
20
|
+
flush() {
|
|
21
|
+
const units = this.pending;
|
|
22
|
+
this.pending = 0;
|
|
23
|
+
this.meter?.add(units);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function placeRowsByDigit(docIds, from, to, shift, starts, tally) {
|
|
27
|
+
const count = from.length;
|
|
28
|
+
const mask = starts.length - 1;
|
|
29
|
+
starts.fill(0);
|
|
30
|
+
for (let row = 0; row < count; row++) starts[docIds[row] >>> shift & mask]++;
|
|
31
|
+
let next = 0;
|
|
32
|
+
for (let digit = 0; digit < starts.length; digit++) {
|
|
33
|
+
const held = starts[digit];
|
|
34
|
+
starts[digit] = next;
|
|
35
|
+
next += held;
|
|
36
|
+
}
|
|
37
|
+
for (let begin = 0; begin < count; begin += PHRASE_SORT_CLOCK_ROWS) {
|
|
38
|
+
const end = Math.min(count, begin + PHRASE_SORT_CLOCK_ROWS);
|
|
39
|
+
for (let at = begin; at < end; at++) {
|
|
40
|
+
const row = from[at];
|
|
41
|
+
to[starts[docIds[row] >>> shift & mask]++] = row;
|
|
42
|
+
}
|
|
43
|
+
tally.tickClock(end - begin);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function sortedRowOrder(docIds, count, tally) {
|
|
47
|
+
let order = new Uint32Array(count);
|
|
48
|
+
for (let row = 0; row < count; row++) order[row] = row;
|
|
49
|
+
let spare = new Uint32Array(count);
|
|
50
|
+
const starts = new Uint32Array(1 << PHRASE_SORT_RADIX_BITS);
|
|
51
|
+
for (let shift = 0; shift < UINT32_BITS; shift += PHRASE_SORT_RADIX_BITS) {
|
|
52
|
+
placeRowsByDigit(docIds, order, spare, shift, starts, tally);
|
|
53
|
+
const placed = spare;
|
|
54
|
+
spare = order;
|
|
55
|
+
order = placed;
|
|
56
|
+
}
|
|
57
|
+
return order;
|
|
58
|
+
}
|
|
59
|
+
function tokenRowsOf(list, tally) {
|
|
60
|
+
const store = list.positionStore ?? null;
|
|
61
|
+
if (store === null) return null;
|
|
62
|
+
const count = list.length;
|
|
63
|
+
const docIds = list.docIds;
|
|
64
|
+
if (list.ordered) {
|
|
65
|
+
return { list, keys: docIds, order: null, fields: list.fieldNameIndices, store, count, cursor: 0, positionRow: 0 };
|
|
66
|
+
}
|
|
67
|
+
tally.add(count);
|
|
68
|
+
const order = sortedRowOrder(docIds, count, tally);
|
|
69
|
+
const keys = new Uint32Array(count);
|
|
70
|
+
for (let row = 0; row < count; row++) keys[row] = docIds[order[row]];
|
|
71
|
+
return { list, keys, order, fields: list.fieldNameIndices, store, count, cursor: 0, positionRow: 0 };
|
|
72
|
+
}
|
|
73
|
+
function resolvePhrase(index, phrase, sharedRows, tally) {
|
|
74
|
+
const entryRows = [];
|
|
75
|
+
const rows = [];
|
|
76
|
+
for (const token of phrase.tokens) {
|
|
77
|
+
let found = sharedRows.get(token);
|
|
78
|
+
if (found === void 0) {
|
|
79
|
+
const list = index.lookupReadOnce?.(token) ?? index.lookup(token);
|
|
80
|
+
if (list === void 0) return null;
|
|
81
|
+
const built = tokenRowsOf(list, tally);
|
|
82
|
+
if (built === null) return null;
|
|
83
|
+
found = built;
|
|
84
|
+
sharedRows.set(token, found);
|
|
85
|
+
}
|
|
86
|
+
if (!rows.includes(found)) rows.push(found);
|
|
87
|
+
entryRows.push(found);
|
|
88
|
+
}
|
|
89
|
+
let leadEntry = 0;
|
|
90
|
+
for (let entry = 1; entry < entryRows.length; entry++) {
|
|
91
|
+
if (entryRows[entry].count < entryRows[leadEntry].count) leadEntry = entry;
|
|
92
|
+
}
|
|
93
|
+
return { phrase, rows, entryRows, lead: entryRows[leadEntry], leadOffset: phrase.offsets[leadEntry] };
|
|
94
|
+
}
|
|
95
|
+
function firstRowFor(rows, doc) {
|
|
96
|
+
const { keys, count } = rows;
|
|
97
|
+
let low = rows.cursor < count && keys[rows.cursor] <= doc ? rows.cursor : 0;
|
|
98
|
+
let high = low;
|
|
99
|
+
let step = 1;
|
|
100
|
+
while (high < count && keys[high] < doc) {
|
|
101
|
+
low = high + 1;
|
|
102
|
+
high += step;
|
|
103
|
+
step *= 2;
|
|
104
|
+
}
|
|
105
|
+
if (high > count) high = count;
|
|
106
|
+
while (low < high) {
|
|
107
|
+
const middle = low + high >>> 1;
|
|
108
|
+
if (keys[middle] < doc) low = middle + 1;
|
|
109
|
+
else high = middle;
|
|
110
|
+
}
|
|
111
|
+
rows.cursor = low;
|
|
112
|
+
return low;
|
|
113
|
+
}
|
|
114
|
+
function positionRowFor(rows, doc, field) {
|
|
115
|
+
const { keys, order, fields, count } = rows;
|
|
116
|
+
for (let at = firstRowFor(rows, doc); at < count && keys[at] === doc; at++) {
|
|
117
|
+
const row = order === null ? at : order[at];
|
|
118
|
+
if (fields[row] === field) return row;
|
|
119
|
+
}
|
|
120
|
+
return -1;
|
|
121
|
+
}
|
|
122
|
+
function countPhraseStarts(resolved, leadRow, cursors, ends, tally) {
|
|
123
|
+
const { entryRows, lead, leadOffset, phrase } = resolved;
|
|
124
|
+
const offsets = phrase.offsets;
|
|
125
|
+
for (let entry = 0; entry < entryRows.length; entry++) {
|
|
126
|
+
const rows = entryRows[entry];
|
|
127
|
+
const start = rows.list.positionStartAt?.(rows.positionRow) ?? 0;
|
|
128
|
+
cursors[entry] = start;
|
|
129
|
+
ends[entry] = start + (rows.list.positionCountAt?.(rows.positionRow) ?? 0);
|
|
130
|
+
}
|
|
131
|
+
const leadStore = lead.store;
|
|
132
|
+
const leadStart = lead.list.positionStartAt?.(leadRow) ?? 0;
|
|
133
|
+
const leadEnd = leadStart + (lead.list.positionCountAt?.(leadRow) ?? 0);
|
|
134
|
+
let starts = 0;
|
|
135
|
+
for (let at = leadStart; at < leadEnd; at++) {
|
|
136
|
+
const anchor = leadStore[at] - leadOffset;
|
|
137
|
+
if (anchor < 0) continue;
|
|
138
|
+
let holdsEveryEntry = true;
|
|
139
|
+
for (let entry = 0; entry < entryRows.length; entry++) {
|
|
140
|
+
const store = entryRows[entry].store;
|
|
141
|
+
const wanted = anchor + offsets[entry];
|
|
142
|
+
let cursor = cursors[entry];
|
|
143
|
+
const end = ends[entry];
|
|
144
|
+
let compared = 1;
|
|
145
|
+
while (cursor < end && store[cursor] < wanted) {
|
|
146
|
+
cursor++;
|
|
147
|
+
compared++;
|
|
148
|
+
}
|
|
149
|
+
cursors[entry] = cursor;
|
|
150
|
+
tally.add(compared);
|
|
151
|
+
if (cursor === end) {
|
|
152
|
+
return starts;
|
|
153
|
+
}
|
|
154
|
+
if (store[cursor] !== wanted) {
|
|
155
|
+
holdsEveryEntry = false;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (holdsEveryEntry) starts++;
|
|
160
|
+
}
|
|
161
|
+
return starts;
|
|
162
|
+
}
|
|
163
|
+
function collectPhraseRows(resolved, searchable, allowed, capacity, keepRows, tally) {
|
|
164
|
+
const hits = createBitSet(capacity);
|
|
165
|
+
const collected = {
|
|
166
|
+
phrase: resolved.phrase,
|
|
167
|
+
lists: resolved.entryRows.map((rows2) => rows2.list),
|
|
168
|
+
docIds: new GrowableUint32(PHRASE_ROWS_START),
|
|
169
|
+
fieldIndices: new GrowableUint32(PHRASE_ROWS_START),
|
|
170
|
+
frequencies: new GrowableUint32(PHRASE_ROWS_START)
|
|
171
|
+
};
|
|
172
|
+
const { lead, rows } = resolved;
|
|
173
|
+
const leadList = lead.list;
|
|
174
|
+
const docIds = leadList.docIds;
|
|
175
|
+
const fields = leadList.fieldNameIndices;
|
|
176
|
+
const deleted = leadList.deletedDocs;
|
|
177
|
+
const hasDeleted = deleted.size > 0;
|
|
178
|
+
const cursors = new Int32Array(resolved.entryRows.length);
|
|
179
|
+
const ends = new Int32Array(resolved.entryRows.length);
|
|
180
|
+
for (const each of rows) each.cursor = 0;
|
|
181
|
+
for (let leadRow = 0; leadRow < lead.count; leadRow++) {
|
|
182
|
+
tally.add(1);
|
|
183
|
+
const doc = docIds[leadRow];
|
|
184
|
+
const field = fields[leadRow];
|
|
185
|
+
if (searchable[field] === 0) continue;
|
|
186
|
+
if (hasDeleted && deleted.has(doc)) continue;
|
|
187
|
+
if (allowed !== void 0 && !bitsetHas(allowed, doc)) continue;
|
|
188
|
+
let holdsEveryToken = true;
|
|
189
|
+
for (const each of rows) {
|
|
190
|
+
if (each === lead) {
|
|
191
|
+
each.positionRow = leadRow;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const row = positionRowFor(each, doc, field);
|
|
195
|
+
if (row === -1) {
|
|
196
|
+
holdsEveryToken = false;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
each.positionRow = row;
|
|
200
|
+
}
|
|
201
|
+
if (!holdsEveryToken) continue;
|
|
202
|
+
const starts = countPhraseStarts(resolved, leadRow, cursors, ends, tally);
|
|
203
|
+
if (starts === 0) continue;
|
|
204
|
+
bitsetSet(hits, doc);
|
|
205
|
+
if (keepRows) {
|
|
206
|
+
collected.docIds.push(doc);
|
|
207
|
+
collected.fieldIndices.push(field);
|
|
208
|
+
collected.frequencies.push(starts);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return { hits, rows: collected };
|
|
212
|
+
}
|
|
213
|
+
function matchPhrases(index, phrases, searchable, filterBitset, capacity, meter, keepRows) {
|
|
214
|
+
const tally = new WorkTally(meter);
|
|
215
|
+
const sharedRows = /* @__PURE__ */ new Map();
|
|
216
|
+
const resolved = [];
|
|
217
|
+
for (const phrase of phrases) {
|
|
218
|
+
const found = resolvePhrase(index, phrase, sharedRows, tally);
|
|
219
|
+
if (found === null) {
|
|
220
|
+
tally.flush();
|
|
221
|
+
return { matched: createBitSet(capacity), rows: [] };
|
|
222
|
+
}
|
|
223
|
+
resolved.push(found);
|
|
224
|
+
}
|
|
225
|
+
resolved.sort((first, second) => first.lead.count - second.lead.count);
|
|
226
|
+
const rows = [];
|
|
227
|
+
let allowed = filterBitset;
|
|
228
|
+
for (const each of resolved) {
|
|
229
|
+
const collected = collectPhraseRows(each, searchable, allowed, capacity, keepRows, tally);
|
|
230
|
+
allowed = collected.hits;
|
|
231
|
+
rows.push(collected.rows);
|
|
232
|
+
if (bitsetIsEmpty(allowed)) break;
|
|
233
|
+
}
|
|
234
|
+
tally.flush();
|
|
235
|
+
return { matched: allowed ?? createBitSet(capacity), rows };
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/search/phrase-analysis.ts
|
|
239
|
+
function phraseKeyOf(tokens, offsets) {
|
|
240
|
+
const slots = [];
|
|
241
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
242
|
+
const gap = index === 0 ? 0 : offsets[index] - offsets[index - 1] - 1;
|
|
243
|
+
for (let missing = 0; missing < gap; missing++) slots.push("?");
|
|
244
|
+
slots.push(tokens[index]);
|
|
245
|
+
}
|
|
246
|
+
return `"${slots.join(" ")}"`;
|
|
247
|
+
}
|
|
248
|
+
function identityOf(tokens, offsets) {
|
|
249
|
+
return JSON.stringify([tokens, offsets]);
|
|
250
|
+
}
|
|
251
|
+
function analyseQueryPhrases(parts, analyseText) {
|
|
252
|
+
const wordParts = [];
|
|
253
|
+
const phrases = [];
|
|
254
|
+
const seen = /* @__PURE__ */ new Set();
|
|
255
|
+
let keptPhraseCount = 0;
|
|
256
|
+
let largestPhraseSize = 0;
|
|
257
|
+
let largestTokenCount = 0;
|
|
258
|
+
let wordsAfterLastPhrase = "";
|
|
259
|
+
for (let index = 0; index < parts.length; index++) {
|
|
260
|
+
const part = parts[index];
|
|
261
|
+
if (index % 2 === 0) {
|
|
262
|
+
wordParts.push(part);
|
|
263
|
+
wordsAfterLastPhrase = `${wordsAfterLastPhrase} ${part}`;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
if (part.trim().length === 0) continue;
|
|
267
|
+
const entries = analyseText(part);
|
|
268
|
+
if (entries.length === 0) continue;
|
|
269
|
+
const ordered = [...entries].sort((first, second) => first.position - second.position);
|
|
270
|
+
const firstPosition = ordered[0].position;
|
|
271
|
+
const size = ordered[ordered.length - 1].position - firstPosition + 1;
|
|
272
|
+
keptPhraseCount++;
|
|
273
|
+
wordsAfterLastPhrase = "";
|
|
274
|
+
if (size > largestPhraseSize) largestPhraseSize = size;
|
|
275
|
+
if (ordered.length > largestTokenCount) largestTokenCount = ordered.length;
|
|
276
|
+
const tokens = ordered.map((entry) => entry.token);
|
|
277
|
+
const offsets = ordered.map((entry) => entry.position - firstPosition);
|
|
278
|
+
const identity = identityOf(tokens, offsets);
|
|
279
|
+
if (seen.has(identity)) continue;
|
|
280
|
+
seen.add(identity);
|
|
281
|
+
phrases.push({ key: phraseKeyOf(tokens, offsets), tokens, offsets });
|
|
282
|
+
}
|
|
283
|
+
const endsWithPhrase = keptPhraseCount > 0 && (wordsAfterLastPhrase.trim().length === 0 || analyseText(wordsAfterLastPhrase).length === 0);
|
|
284
|
+
return {
|
|
285
|
+
words: wordParts.join(" "),
|
|
286
|
+
phrases,
|
|
287
|
+
keptPhraseCount,
|
|
288
|
+
largestPhraseSize,
|
|
289
|
+
largestTokenCount,
|
|
290
|
+
endsWithPhrase
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function withWordsOnly(params, phrases) {
|
|
294
|
+
return { ...params, term: phrases.words, prefix: phrases.endsWithPhrase ? false : params.prefix };
|
|
295
|
+
}
|
|
296
|
+
function refusePhraseUntilRebuilt(indexName, rebuildMode) {
|
|
297
|
+
const remedy = rebuildMode === "manual" ? "This engine leaves the rebuild to its caller, so somebody has to start it with rebuildAnalysis" : "Try the query again once the rebuild finishes";
|
|
298
|
+
throw new NarsilError(
|
|
299
|
+
ErrorCodes.SEARCH_PHRASE_NOT_READY,
|
|
300
|
+
`Index "${indexName}" holds array fields whose terms need a rebuild, so it cannot match a phrase yet. ${remedy}`,
|
|
301
|
+
{ indexName, rebuild: rebuildMode }
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
function requirePhrasesWithinLimits(phrases, trackPositions) {
|
|
305
|
+
if (phrases.keptPhraseCount === 0) return;
|
|
306
|
+
if (phrases.keptPhraseCount > MAX_QUERY_PHRASES) {
|
|
307
|
+
throw new NarsilError(
|
|
308
|
+
ErrorCodes.SEARCH_INVALID_PHRASE,
|
|
309
|
+
`A query takes at most ${MAX_QUERY_PHRASES} phrases, while this query holds ${phrases.keptPhraseCount}`,
|
|
310
|
+
{ limit: MAX_QUERY_PHRASES, phrases: phrases.keptPhraseCount }
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
if (phrases.largestPhraseSize > MAX_PHRASE_WORDS || phrases.largestTokenCount > MAX_PHRASE_WORDS) {
|
|
314
|
+
throw new NarsilError(
|
|
315
|
+
ErrorCodes.SEARCH_INVALID_PHRASE,
|
|
316
|
+
`A phrase takes at most ${MAX_PHRASE_WORDS} words, counting the stop words between its first and last word, while this query holds one of ${Math.max(phrases.largestPhraseSize, phrases.largestTokenCount)}`,
|
|
317
|
+
{ limit: MAX_PHRASE_WORDS, words: Math.max(phrases.largestPhraseSize, phrases.largestTokenCount) }
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
if (!trackPositions) {
|
|
321
|
+
throw new NarsilError(
|
|
322
|
+
ErrorCodes.SEARCH_INVALID_PHRASE,
|
|
323
|
+
"This index stores no word positions because its trackPositions setting is off, so it cannot match a phrase. Remove the quotes, or create the index with trackPositions on",
|
|
324
|
+
{ trackPositions: false }
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export { analyseQueryPhrases, matchPhrases, refusePhraseUntilRebuilt, requirePhrasesWithinLimits, withWordsOnly };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { N as NarsilError, L as ListParams,
|
|
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 './
|
|
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, f as ListResult, I as IndexInfo, k as IndexStats, Q as QueryParams, j as PreflightResult, m as QueryResult, g as SuggestParams, h as SuggestResult } from './config-D1cDv3sE.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 './config-D1cDv3sE.js';
|
|
3
|
+
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-Co8HfRD7.js';
|
|
4
|
+
export { E as ErrorDetail, I as ImportError, f as TaskStatus, g as TaskType } from './tasks-Co8HfRD7.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-
|
|
8
|
-
import { A as AnyDocument } from './schema-
|
|
9
|
-
import './synonyms-CpOAHPa-.js';
|
|
6
|
+
import { N as Narsil } from './engine-m_Ddr1bz.js';
|
|
7
|
+
import { N as NarsilClient, I as ImportSource } from './client-gNAfaHcE.js';
|
|
8
|
+
import { A as AnyDocument } from './schema-BTXbHCqA.js';
|
|
10
9
|
import './adapters-BQFQ4PRz.js';
|
|
10
|
+
import './synonyms-CpOAHPa-.js';
|
|
11
|
+
import './index-HYnqS1SE.js';
|
|
12
|
+
import './config-CmYJO34X.js';
|
|
13
|
+
import './types-DvncmvuQ.js';
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
16
|
* These settings apply to {@link NarsilProvider} whether it holds a client or
|
package/dist/react.mjs
CHANGED
|
@@ -34,6 +34,8 @@ var ErrorCodes = {
|
|
|
34
34
|
SEARCH_INVALID_CURSOR: "SEARCH_INVALID_CURSOR",
|
|
35
35
|
SEARCH_RESULT_WINDOW_EXCEEDED: "SEARCH_RESULT_WINDOW_EXCEEDED",
|
|
36
36
|
SEARCH_WORK_CAP_EXCEEDED: "SEARCH_WORK_CAP_EXCEEDED",
|
|
37
|
+
SEARCH_INVALID_PHRASE: "SEARCH_INVALID_PHRASE",
|
|
38
|
+
SEARCH_PHRASE_NOT_READY: "SEARCH_PHRASE_NOT_READY",
|
|
37
39
|
BM25_NOT_READY: "BM25_NOT_READY",
|
|
38
40
|
LANGUAGE_NOT_SUPPORTED: "LANGUAGE_NOT_SUPPORTED",
|
|
39
41
|
ENVELOPE_VERSION_MISMATCH: "ENVELOPE_VERSION_MISMATCH",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { runRerankedQuery, rerankTextOf } from './chunk-
|
|
1
|
+
import { runRerankedQuery, rerankTextOf } from './chunk-SZGRYEIC.mjs';
|
|
2
2
|
import './chunk-KZ3NX2P7.mjs';
|
|
3
|
-
import { rerankOnHost } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { rerankOnHost } from './chunk-PATMDIMN.mjs';
|
|
4
|
+
import './chunk-5LX6MOIB.mjs';
|
|
5
5
|
import './chunk-HJSN7UYG.mjs';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
6
|
+
import './chunk-RNSC4NFI.mjs';
|
|
7
|
+
import './chunk-FQBFZAWG.mjs';
|
|
8
|
+
import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
|
|
9
9
|
|
|
10
10
|
// src/distribution/cluster-node/reads/rerank.ts
|
|
11
11
|
async function rerankClusterQuery(deps, indexName, params, firstStage, readDocuments, host) {
|
package/dist/rerankers/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-
|
|
2
|
-
import { ErrorCodes, NarsilError } from '../chunk-
|
|
1
|
+
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-2WBY4Y4M.mjs';
|
|
2
|
+
import { ErrorCodes, NarsilError } from '../chunk-CZ7ISLXA.mjs';
|
|
3
3
|
|
|
4
4
|
// src/rerankers/constants.ts
|
|
5
5
|
var DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
|
|
@@ -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-DOQLGGEX.mjs');
|
|
22
22
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
23
|
});
|
|
24
24
|
const settled = restored.then(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { runRerankedQuery, rerankTextOf } from './chunk-
|
|
1
|
+
import { runRerankedQuery, rerankTextOf } from './chunk-SZGRYEIC.mjs';
|
|
2
2
|
export { withRerankQueryText } from './chunk-KZ3NX2P7.mjs';
|
|
3
|
-
import { rerankOnHost } from './chunk-
|
|
4
|
-
export { rerankOnHost } from './chunk-
|
|
5
|
-
import { fixedHybridDepthOf, requireWithinHybridDepth, pageByPosition } from './chunk-
|
|
3
|
+
import { rerankOnHost } from './chunk-PATMDIMN.mjs';
|
|
4
|
+
export { rerankOnHost } from './chunk-PATMDIMN.mjs';
|
|
5
|
+
import { fixedHybridDepthOf, requireWithinHybridDepth, pageByPosition } from './chunk-5LX6MOIB.mjs';
|
|
6
6
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-HJSN7UYG.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import { HYBRID_RESCORE_WINDOW } from './chunk-
|
|
9
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
7
|
+
import './chunk-RNSC4NFI.mjs';
|
|
8
|
+
import { HYBRID_RESCORE_WINDOW } from './chunk-FQBFZAWG.mjs';
|
|
9
|
+
import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
|
|
10
10
|
|
|
11
11
|
// src/engine/query/hybrid-depth.ts
|
|
12
12
|
function countOfUnion(text, vectorScored) {
|
|
@@ -186,8 +186,11 @@ interface VectorIndexConfig {
|
|
|
186
186
|
filterThreshold?: number;
|
|
187
187
|
/** These settings shape the graph: neighbours per node, build-time exploration, and the metric that ranks results. */
|
|
188
188
|
hnswConfig?: {
|
|
189
|
+
/** The graph keeps this many neighbours per node. */
|
|
189
190
|
m?: number;
|
|
191
|
+
/** The engine explores this many candidates as it builds the graph. */
|
|
190
192
|
efConstruction?: number;
|
|
193
|
+
/** This metric ranks the results. */
|
|
191
194
|
metric?: 'cosine' | 'dotProduct' | 'euclidean';
|
|
192
195
|
};
|
|
193
196
|
/** The engine codes the promoted vectors in this mode. When this is unset, it picks the mode by the field's dimension. Set `none` to rank by the vectors alone. */
|
|
@@ -245,10 +248,10 @@ interface IndexConfig {
|
|
|
245
248
|
/** This replaces the language's tokeniser, either inline or by the name a tokeniser registered under. */
|
|
246
249
|
tokenizer?: CustomTokenizer | string;
|
|
247
250
|
/**
|
|
248
|
-
* Setting this records term positions in each posting, which
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
251
|
+
* Setting this records term positions in each posting, which phrase search
|
|
252
|
+
* compares. An index that opts out stores less, and the engine refuses a
|
|
253
|
+
* phrase on it with `SEARCH_INVALID_PHRASE`. Highlighting works either way,
|
|
254
|
+
* because the engine's highlighter analyses the stored text again.
|
|
252
255
|
*/
|
|
253
256
|
trackPositions?: boolean;
|
|
254
257
|
/** These settings control when vector fields move to an HNSW graph, and how that graph is built. */
|
|
@@ -382,4 +385,4 @@ interface InsertOptions extends WriteOptions {
|
|
|
382
385
|
skipClone?: boolean;
|
|
383
386
|
}
|
|
384
387
|
|
|
385
|
-
export type { AnyDocument as A, BM25Params as B, CustomTokenizer as C, EmbeddingFieldConfig as E,
|
|
388
|
+
export type { AnyDocument as A, BM25Params as B, CustomTokenizer as C, EmbeddingFieldConfig as E, FieldType as F, InsertOptions as I, PartitionConfig as P, SchemaDefinition as S, TextFieldOption as T, VectorIndexConfig as V, WriteOptions as W, IndexConfig as a, StopWordOverride as b, BM25FieldParams as c, FieldOptionChain as d, ScoringMode as e, VectorQuantizationMode as f, VectorStorageMode as g };
|