@delali/narsil 0.3.1-next.131 → 0.3.1-next.140

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.
Files changed (113) hide show
  1. package/dist/adapters/filesystem.mjs +1 -1
  2. package/dist/adapters/indexeddb.mjs +1 -1
  3. package/dist/analysis-change-JN23AZQP.mjs +43 -0
  4. package/dist/analysis-change-entry-5JSIMEKG.mjs +1 -0
  5. package/dist/browser/analysis-change-57MIRJWR.mjs +499 -0
  6. package/dist/browser/analysis-change-entry-ICGRR3IN.mjs +1 -0
  7. package/dist/browser/{chunk-UDGB2MWT.mjs → chunk-35B42UFM.mjs} +4 -0
  8. package/dist/browser/{chunk-VBBLTD7O.mjs → chunk-3EYDURFD.mjs} +39 -27
  9. package/dist/browser/{chunk-AIIJDWMG.mjs → chunk-4MFH226Q.mjs} +1 -1
  10. package/dist/browser/{chunk-D7WQF6DV.mjs → chunk-5LYWZJE2.mjs} +2 -2
  11. package/dist/browser/chunk-67KSBUYR.mjs +173 -0
  12. package/dist/browser/{chunk-M5UAAXGU.mjs → chunk-6BSB4N6B.mjs} +2 -2
  13. package/dist/browser/{chunk-NSCSR6MA.mjs → chunk-CGVBGHBX.mjs} +81 -6
  14. package/dist/browser/chunk-E5SFTOQR.mjs +21 -0
  15. package/dist/browser/{chunk-VEGHFP2P.mjs → chunk-MZI3TEOW.mjs} +4 -2
  16. package/dist/browser/chunk-OIZS5KIX.mjs +6 -0
  17. package/dist/browser/chunk-QHNNULPW.mjs +265 -0
  18. package/dist/browser/chunk-XVMOQQ34.mjs +384 -0
  19. package/dist/browser/{chunk-2Y3CO4EQ.mjs → chunk-ZAIZQOTM.mjs} +256 -777
  20. package/dist/browser/{durability-wiring-FNZSRH4N.mjs → durability-wiring-MTIAN6VT.mjs} +145 -50
  21. package/dist/browser/import-Q7MXD6BS.mjs +8 -0
  22. package/dist/browser/{module-4HIMOQM5.mjs → module-5J3PEUEB.mjs} +7 -6
  23. package/dist/browser/{phrase-module-WESYVU7K.mjs → phrase-module-HGVBO24W.mjs} +1 -1
  24. package/dist/{restore-queue-JAMNRC6T.mjs → browser/restore-queue-DISFECE4.mjs} +8 -2
  25. package/dist/browser/{runtime-3X7ZJ5T3.mjs → runtime-VEUH674B.mjs} +2 -2
  26. package/dist/browser/{snapshot-V7VF6BN6.mjs → snapshot-YBJ5MF2M.mjs} +36 -167
  27. package/dist/browser/{write-YIC2MKRY.mjs → write-RTWI5MXL.mjs} +8 -6
  28. package/dist/{capabilities-B6WxrWxt.d.ts → capabilities-DXAmysqJ.d.ts} +10 -3
  29. package/dist/{chunk-NMXRXFGZ.mjs → chunk-4GCN34JV.mjs} +2 -2
  30. package/dist/{chunk-SOHMMNCH.mjs → chunk-6VHWXAOI.mjs} +4 -4
  31. package/dist/{chunk-2C3WXBQS.mjs → chunk-74XB2SXI.mjs} +1 -1
  32. package/dist/{chunk-OGLV4I3L.mjs → chunk-B5I3IL4H.mjs} +12 -7
  33. package/dist/chunk-BDIDUW2B.mjs +387 -0
  34. package/dist/{chunk-5LX6MOIB.mjs → chunk-C3YDYX6C.mjs} +1 -1
  35. package/dist/{chunk-Y4BVTQ53.mjs → chunk-CCCGEPJM.mjs} +2 -2
  36. package/dist/{chunk-2JWNJSNE.mjs → chunk-CPCGEIOM.mjs} +11 -8
  37. package/dist/chunk-CZQ33DLW.mjs +78 -0
  38. package/dist/{chunk-4GDLFDPZ.mjs → chunk-DD2673TX.mjs} +3 -2
  39. package/dist/{chunk-RNSC4NFI.mjs → chunk-EEBCDP36.mjs} +3 -1
  40. package/dist/{chunk-HCGJKDZV.mjs → chunk-FFVLPCLH.mjs} +1 -1
  41. package/dist/{chunk-WVRDRLIC.mjs → chunk-FKARMUWH.mjs} +6 -6
  42. package/dist/{chunk-PATMDIMN.mjs → chunk-HJJWY6PT.mjs} +1 -1
  43. package/dist/chunk-HMDT3I63.mjs +21 -0
  44. package/dist/{chunk-CZ7ISLXA.mjs → chunk-HNHCNTVG.mjs} +4 -0
  45. package/dist/{chunk-RWESFSJI.mjs → chunk-IBATGS3J.mjs} +87 -61
  46. package/dist/{chunk-Y2U5VVWX.mjs → chunk-ICW45TTU.mjs} +1 -1
  47. package/dist/{chunk-T4OFG4IQ.mjs → chunk-IP4HJOGC.mjs} +90 -16
  48. package/dist/{chunk-EUCX5K74.mjs → chunk-J3EHATEZ.mjs} +3 -3
  49. package/dist/{chunk-X5CNUKD5.mjs → chunk-K3AQOZVM.mjs} +37 -20
  50. package/dist/chunk-LK3MOTXF.mjs +174 -0
  51. package/dist/{chunk-7OIQ2SIO.mjs → chunk-LLDFIKGP.mjs} +4 -4
  52. package/dist/{chunk-K77FJXKS.mjs → chunk-MTQTX4BP.mjs} +81 -8
  53. package/dist/{chunk-ZR4VM4A6.mjs → chunk-N37VMC62.mjs} +1 -18
  54. package/dist/{chunk-2WBY4Y4M.mjs → chunk-NOT5QOHU.mjs} +1 -1
  55. package/dist/{chunk-D5TFRB5G.mjs → chunk-NPNK57CA.mjs} +1 -1
  56. package/dist/{chunk-6SSVIW7Y.mjs → chunk-O4LJQI4G.mjs} +31 -5
  57. package/dist/{chunk-JJ6EUMXB.mjs → chunk-PNNVTKMT.mjs} +2 -2
  58. package/dist/{chunk-2SEL6SBS.mjs → chunk-RKAVHNRW.mjs} +2 -2
  59. package/dist/{chunk-RCMNL7RI.mjs → chunk-SBMAWTRG.mjs} +41 -4
  60. package/dist/chunk-TCWQJL7O.mjs +188 -0
  61. package/dist/{chunk-2MKX2SCO.mjs → chunk-U4X4AWKL.mjs} +7 -7
  62. package/dist/{chunk-PU6SKH7O.mjs → chunk-UBXJQJII.mjs} +2 -2
  63. package/dist/chunk-UEV53BBO.mjs +480 -0
  64. package/dist/{chunk-NNO7CO3A.mjs → chunk-UIKN2OTQ.mjs} +1 -1
  65. package/dist/{chunk-F6AAXI7T.mjs → chunk-VSUYTPME.mjs} +3 -3
  66. package/dist/{chunk-TGHNXN7W.mjs → chunk-W2XDK66Z.mjs} +180 -541
  67. package/dist/{chunk-7X5JST5L.mjs → chunk-WNBRW4Q2.mjs} +16 -2
  68. package/dist/{chunk-6M6SDH3S.mjs → chunk-XMQNOD5V.mjs} +8 -8
  69. package/dist/{chunk-SZGRYEIC.mjs → chunk-XS2VM7UE.mjs} +3 -3
  70. package/dist/{chunk-JT3YZGCE.mjs → chunk-XXKWEG53.mjs} +3 -188
  71. package/dist/{chunk-5W7AEVTH.mjs → chunk-ZMBFWQXN.mjs} +2 -2
  72. package/dist/{chunk-7XY6VD7B.mjs → chunk-ZSWHPKGM.mjs} +1 -1
  73. package/dist/{client-gNAfaHcE.d.ts → client-DApBeLbk.d.ts} +17 -2
  74. package/dist/client.d.ts +5 -5
  75. package/dist/client.mjs +11 -1
  76. package/dist/{config-D1cDv3sE.d.ts → config-B0H-vp4U.d.ts} +4 -0
  77. package/dist/{config-CmYJO34X.d.ts → config-Brysl9NO.d.ts} +1 -1
  78. package/dist/{direct-executor-HQ4QVDX7.mjs → direct-executor-J5UDLPL3.mjs} +14 -14
  79. package/dist/distribution/coordinator/etcd.mjs +1 -1
  80. package/dist/distribution/transport/grpc.mjs +1 -1
  81. package/dist/distribution.d.ts +21 -5
  82. package/dist/distribution.mjs +882 -192
  83. package/dist/{durability-wiring-S7OX2MAI.mjs → durability-wiring-AYOTAPNQ.mjs} +165 -70
  84. package/dist/embeddings/openai.mjs +2 -2
  85. package/dist/{engine-m_Ddr1bz.d.ts → engine-CuLMbH1-.d.ts} +63 -6
  86. package/dist/import-QRZAQ5RH.mjs +43 -0
  87. package/dist/index.browser.mjs +4 -4
  88. package/dist/index.d.ts +4 -4
  89. package/dist/index.mjs +20 -20
  90. package/dist/{long-query-thread-BSL25PD6.mjs → long-query-thread-U7K5A72G.mjs} +14 -14
  91. package/dist/{module-2E4XYSGT.mjs → module-L2OZO5PQ.mjs} +11 -11
  92. package/dist/partial-words.mjs +5 -5
  93. package/dist/pattern.mjs +3 -3
  94. package/dist/persistence/durability/checkpoint-worker.d.ts +11 -0
  95. package/dist/persistence/durability/checkpoint-worker.mjs +23 -23
  96. package/dist/{phrase-module-JERF2IDG.mjs → phrase-module-5QHBD2VJ.mjs} +1 -1
  97. package/dist/react.d.ts +7 -7
  98. package/dist/react.mjs +4 -0
  99. package/dist/{rerank-DMMT4FZA.mjs → rerank-KTLC3E6N.mjs} +5 -5
  100. package/dist/rerankers/http.mjs +2 -2
  101. package/dist/{browser/restore-queue-GEZ54CA5.mjs → restore-queue-RYSRRFS4.mjs} +8 -2
  102. package/dist/{runtime-7MLQ7J64.mjs → runtime-DYV75DCB.mjs} +6 -6
  103. package/dist/server.d.ts +10 -8
  104. package/dist/server.mjs +51 -19
  105. package/dist/{snapshot-DOQLGGEX.mjs → snapshot-BTRZ3MZK.mjs} +59 -190
  106. package/dist/synonyms.mjs +6 -4
  107. package/dist/{tasks-Co8HfRD7.d.ts → tasks-DjGjK70Y.d.ts} +22 -6
  108. package/dist/{thread-SKO7CN3R.mjs → thread-USB3GOPY.mjs} +13 -13
  109. package/dist/vector/search-worker.mjs +5 -5
  110. package/dist/workers/entry.mjs +7 -7
  111. package/dist/{write-ZKR7SNRT.mjs → write-GHTA56OW.mjs} +25 -22
  112. package/openapi.json +101 -6
  113. package/package.json +7 -7
@@ -1,6 +1,20 @@
1
+ import { english } from './chunk-TGP5M5R7.mjs';
2
+ import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
1
3
  import { encode, decode } from '@msgpack/msgpack';
2
4
 
3
- // src/core/synonyms/rules.ts
5
+ // src/languages/registry.ts
6
+ var languages = /* @__PURE__ */ new Map();
7
+ languages.set("english", english);
8
+ function registerLanguage(module) {
9
+ languages.set(module.name, module);
10
+ }
11
+ function getLanguage(name) {
12
+ const lang = languages.get(name);
13
+ if (!lang) {
14
+ throw new NarsilError(ErrorCodes.LANGUAGE_NOT_SUPPORTED, `Language "${name}" is not registered`, { language: name });
15
+ }
16
+ return lang;
17
+ }
4
18
 
5
19
  // src/core/synonyms/constants.ts
6
20
  var MAX_SYNONYM_RULES = 1e5;
@@ -111,4 +125,4 @@ function decodeSynonymRules(bytes, raise) {
111
125
  return parseSynonymRules(decoded, raise);
112
126
  }
113
127
 
114
- export { SYNONYMS_ADDED_PER_QUERY, SYNONYM_EXPANSION_CACHE_ENTRIES, decodeSynonymRules, encodeSynonymRules, parseSynonymRules };
128
+ export { SYNONYMS_ADDED_PER_QUERY, SYNONYM_EXPANSION_CACHE_ENTRIES, decodeSynonymRules, encodeSynonymRules, getLanguage, parseSynonymRules, registerLanguage };
@@ -1,15 +1,15 @@
1
- import { normalizeSort, requireMatchingCursor, encodePageCursor, decodePageCursor, projectionKeepsField, resolveProjection, clampRowCount, bm25SetsValue, sortSignatureOf, requireSortableFields, analyseQueryPhrases, requireLoadedPhraseCode, fanOutQuery, loadPhraseCodeFor, requireWithinResultWindow, sortModesOf, applySorting, applyPagination, countsWithoutScores, fanOutMatchCount, FNV_OFFSET_BASIS, validatedFilterOf, createPatternWorkMeter, partialWordsToHighlight, partialWordHighlighter, pruneStatsToQueryTerms, mergeBM25Levels, everyValueFacetConfig, fulltextMatches, mergeFacets, applyPartitionFiltersBitset, fnv1aContinue, partitionsIn, fnv1aContinueTaggedNumbers, undeclaredFieldOnStrictIndex, MAX_BM25_K1, MAX_BM25_B } from './chunk-2MKX2SCO.mjs';
2
- import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, MAX_DOC_ID_LENGTH, DEFAULT_LIMIT, DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, DEFAULT_OFFSET } from './chunk-RNSC4NFI.mjs';
1
+ import { normalizeSort, requireMatchingCursor, encodePageCursor, decodePageCursor, projectionKeepsField, resolveProjection, clampRowCount, bm25SetsValue, sortSignatureOf, requireSortableFields, analyseQueryPhrases, requireLoadedPhraseCode, fanOutQuery, loadPhraseCodeFor, requireWithinResultWindow, sortModesOf, applySorting, applyPagination, countsWithoutScores, fanOutMatchCount, FNV_OFFSET_BASIS, validatedFilterOf, createPatternWorkMeter, partialWordsToHighlight, partialWordHighlighter, pruneStatsToQueryTerms, mergeBM25Levels, everyValueFacetConfig, fulltextMatches, mergeFacets, applyPartitionFiltersBitset, fnv1aContinue, partitionsIn, fnv1aContinueTaggedNumbers, undeclaredFieldOnStrictIndex, MAX_BM25_K1, MAX_BM25_B } from './chunk-U4X4AWKL.mjs';
2
+ import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, MAX_DOC_ID_LENGTH, DEFAULT_LIMIT, DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, DEFAULT_OFFSET } from './chunk-EEBCDP36.mjs';
3
3
  import { MIN_OVERSAMPLE, MAX_RENUMBERED_SEARCH_ATTEMPTS } from './chunk-QSK35UC2.mjs';
4
- import { flattenSchema, partialFieldsOf } from './chunk-PU6SKH7O.mjs';
4
+ import { flattenSchema, partialFieldsOf } from './chunk-UBXJQJII.mjs';
5
5
  import { DEFAULT_MAX_PER_GROUP, DEFAULT_FUZZY_PREFIX_LENGTH, BM25_DISPLAYED_NAME_LENGTH, DEFAULT_LINEAR_ALPHA, MIN_LINEAR_ALPHA, MAX_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT, MIN_RANK_CONSTANT, RESULT_WINDOW, MAX_TOLERANCE, MAX_PREFIX_LENGTH } from './chunk-FQBFZAWG.mjs';
6
6
  import { fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
7
- import { isStringValuedBase, parsedTypeOf, isWordIndexedFieldType } from './chunk-7XY6VD7B.mjs';
8
- import { tokenize } from './chunk-D5TFRB5G.mjs';
7
+ import { isStringValuedBase, parsedTypeOf, isWordIndexedFieldType } from './chunk-ZSWHPKGM.mjs';
8
+ import { tokenize } from './chunk-NPNK57CA.mjs';
9
9
  import { compareComparableKeys } from './chunk-R6A773WK.mjs';
10
10
  import { compareCodePoints, holdsUnpairedSurrogate } from './chunk-YTJCGKM4.mjs';
11
11
  import { MIN_PATTERN_VALUE_LIMIT, MAX_PATTERN_VALUE_LIMIT, isPlainObject, isGeopointOrVectorType, VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
12
- import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
12
+ import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
13
13
 
14
14
  // src/search/cursor-binding.ts
15
15
  var ABSENT_TAG = 0;
@@ -1550,7 +1550,7 @@ function requireCursorDepth(cursor, signature, binding) {
1550
1550
  }
1551
1551
  function hybridSearchOf(params, context, limit, offset, cursorDepth) {
1552
1552
  if ((params.hybrid?.depth ?? null) === null) return executeHybridSearch(params, context, limit, offset, cursorDepth);
1553
- return import('./runtime-7MLQ7J64.mjs').then(
1553
+ return import('./runtime-DYV75DCB.mjs').then(
1554
1554
  (runtime) => runtime.searchFixedDepthHybrid(params, context, { cursorDepth: cursorDepth ?? 0, offset, limit }, runtimeHost)
1555
1555
  );
1556
1556
  }
@@ -1560,7 +1560,7 @@ function executeQuery(request, callerContext) {
1560
1560
  if (loadingPhraseCode === null) return runQuery(request, callerContext);
1561
1561
  return loadingPhraseCode.then(() => runQuery(request, callerContext));
1562
1562
  }
1563
- return import('./runtime-7MLQ7J64.mjs').then(
1563
+ return import('./runtime-DYV75DCB.mjs').then(
1564
1564
  (runtime) => runtime.executeRerankedQuery(request, callerContext, executeQuery, runtimeHost)
1565
1565
  );
1566
1566
  }
@@ -1,9 +1,9 @@
1
1
  import { rerankQueryTextOf } from './chunk-KZ3NX2P7.mjs';
2
- import { fixedHybridDepthOf, pageByPosition, requireWithinHybridDepth } from './chunk-5LX6MOIB.mjs';
2
+ import { fixedHybridDepthOf, pageByPosition, requireWithinHybridDepth } from './chunk-C3YDYX6C.mjs';
3
3
  import { DEFAULT_RERANK_WINDOW, MIN_RERANK_WINDOW } from './chunk-HJSN7UYG.mjs';
4
- import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-RNSC4NFI.mjs';
4
+ import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-EEBCDP36.mjs';
5
5
  import { RESULT_WINDOW } from './chunk-FQBFZAWG.mjs';
6
- import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
6
+ import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
7
7
 
8
8
  // src/rerank/params.ts
9
9
  function invalid(message, details = {}) {
@@ -1,5 +1,5 @@
1
- import { requireDocumentWithinSizeLimit, validateRequiredFields } from './chunk-PU6SKH7O.mjs';
2
- import { ErrorCodes, NarsilError } from './chunk-CZ7ISLXA.mjs';
1
+ import { requireDocumentWithinSizeLimit, validateRequiredFields } from './chunk-UBXJQJII.mjs';
2
+ import { ErrorCodes, NarsilError } from './chunk-HNHCNTVG.mjs';
3
3
 
4
4
  // src/narsil/internals.ts
5
5
  var engineCores = /* @__PURE__ */ new WeakMap();
@@ -19,191 +19,6 @@ function rerankWindowCapOf(owner) {
19
19
  return rerankWindowSources.get(owner)?.();
20
20
  }
21
21
 
22
- // src/engine/snapshot/restore-config.ts
23
- function rejectSnapshot(message) {
24
- throw new NarsilError(ErrorCodes.DOC_VALIDATION_FAILED, `Invalid snapshot: ${message}`);
25
- }
26
- function isPlainObject(value) {
27
- return value !== null && typeof value === "object" && !Array.isArray(value);
28
- }
29
- function restoredBm25(raw, reject) {
30
- if (raw === void 0) {
31
- return void 0;
32
- }
33
- if (!isPlainObject(raw)) {
34
- reject("bm25 must be an object");
35
- }
36
- const fields = restoredBm25Fields(raw.fields, reject);
37
- return {
38
- ...restoredBm25Pair(raw, "bm25", reject),
39
- ...fields !== void 0 ? { fields } : {}
40
- };
41
- }
42
- function restoredBm25Pair(raw, label, reject) {
43
- const { k1, b } = raw;
44
- if (k1 !== void 0 && (typeof k1 !== "number" || !Number.isFinite(k1))) {
45
- reject(`${label} k1 must be a finite number`);
46
- }
47
- if (b !== void 0 && (typeof b !== "number" || !Number.isFinite(b))) {
48
- reject(`${label} b must be a finite number`);
49
- }
50
- return {
51
- ...k1 !== void 0 ? { k1 } : {},
52
- ...b !== void 0 ? { b } : {}
53
- };
54
- }
55
- function restoredBm25Fields(raw, reject) {
56
- if (raw === void 0) return void 0;
57
- if (!isPlainObject(raw)) reject("bm25 fields must be an object");
58
- const source = raw;
59
- const fields = /* @__PURE__ */ Object.create(null);
60
- for (const name of Object.keys(source)) {
61
- const pair = source[name];
62
- if (!isPlainObject(pair)) reject("bm25 fields must map each field to an object");
63
- fields[name] = restoredBm25Pair(pair, "bm25 field", reject);
64
- }
65
- return fields;
66
- }
67
- function restoredStopWords(name, list, reject) {
68
- if (name !== void 0 && typeof name !== "string") {
69
- reject("stopWords must be a name");
70
- }
71
- if (list !== void 0 && (!Array.isArray(list) || !list.every((word) => typeof word === "string"))) {
72
- reject("stopWordList must be a list of words");
73
- }
74
- if (typeof name === "string" && Array.isArray(list)) {
75
- reject("stopWords and stopWordList cannot both be present");
76
- }
77
- if (typeof name === "string") {
78
- return name;
79
- }
80
- if (Array.isArray(list)) {
81
- return new Set(list);
82
- }
83
- return void 0;
84
- }
85
- function restoredPartitionConfig(raw, reject = rejectSnapshot) {
86
- if (raw === void 0) {
87
- return void 0;
88
- }
89
- if (!isPlainObject(raw)) {
90
- reject("partitionConfig must be an object");
91
- }
92
- const { maxDocsPerPartition, maxPartitions, watermark } = raw;
93
- if (maxDocsPerPartition !== void 0 && (typeof maxDocsPerPartition !== "number" || !Number.isInteger(maxDocsPerPartition) || maxDocsPerPartition < 1)) {
94
- reject("partitionConfig maxDocsPerPartition must be a positive integer");
95
- }
96
- if (maxPartitions !== void 0 && (typeof maxPartitions !== "number" || !Number.isInteger(maxPartitions) || maxPartitions < 1)) {
97
- reject("partitionConfig maxPartitions must be a positive integer");
98
- }
99
- if (watermark !== void 0 && (typeof watermark !== "number" || !(watermark > 0) || watermark > 1)) {
100
- reject("partitionConfig watermark must be above 0 and at most 1");
101
- }
102
- return {
103
- ...typeof maxDocsPerPartition === "number" ? { maxDocsPerPartition } : {},
104
- ...typeof maxPartitions === "number" ? { maxPartitions } : {},
105
- ...typeof watermark === "number" ? { watermark } : {}
106
- };
107
- }
108
- function restoredScoring(raw, reject) {
109
- if (raw === void 0) {
110
- return void 0;
111
- }
112
- if (raw !== "local" && raw !== "dfs" && raw !== "broadcast") {
113
- reject("defaultScoring must be 'local', 'dfs', or 'broadcast'");
114
- }
115
- return raw;
116
- }
117
- function restoredBoolean(raw, field, reject) {
118
- if (raw === void 0) {
119
- return void 0;
120
- }
121
- if (typeof raw !== "boolean") {
122
- reject(`${field} must be a boolean`);
123
- }
124
- return raw;
125
- }
126
- function restoredRequired(raw, reject) {
127
- if (raw === void 0) {
128
- return void 0;
129
- }
130
- if (!Array.isArray(raw) || !raw.every((field) => typeof field === "string")) {
131
- reject("required must be a list of field paths");
132
- }
133
- return raw;
134
- }
135
- function restoredVectorPromotion(raw, reject) {
136
- if (raw === void 0) {
137
- return void 0;
138
- }
139
- if (!isPlainObject(raw) || raw.hnswConfig !== void 0 && !isPlainObject(raw.hnswConfig)) {
140
- reject("vectorPromotion must be an object");
141
- }
142
- return raw;
143
- }
144
- function restoredEmbedding(raw, reject = rejectSnapshot) {
145
- if (raw === void 0) {
146
- return void 0;
147
- }
148
- if (!isPlainObject(raw)) {
149
- reject("embedding must be an object");
150
- }
151
- const { fields, adapter } = raw;
152
- if (adapter !== void 0 && typeof adapter !== "string") {
153
- reject("embedding adapter must be a name");
154
- }
155
- if (!isPlainObject(fields)) {
156
- reject("embedding fields must be an object");
157
- }
158
- for (const value of Object.values(fields)) {
159
- const isPath = typeof value === "string";
160
- const isPathList = Array.isArray(value) && value.every((path) => typeof path === "string");
161
- if (!isPath && !isPathList) {
162
- reject("embedding fields must map vector fields to source paths");
163
- }
164
- }
165
- return {
166
- fields,
167
- ...adapter !== void 0 ? { adapter } : {}
168
- };
169
- }
170
- function readSharedConfigFields(source, reject) {
171
- if (source.tokenizer !== void 0 && typeof source.tokenizer !== "string") {
172
- reject("tokenizer must be a name");
173
- }
174
- const stopWords = restoredStopWords(source.stopWords, source.stopWordList, reject);
175
- const bm25 = restoredBm25(source.bm25, reject);
176
- const surfaceForms = restoredBoolean(source.surfaceForms, "surfaceForms", reject);
177
- const defaultScoring = restoredScoring(source.defaultScoring, reject);
178
- const trackPositions = restoredBoolean(source.trackPositions, "trackPositions", reject);
179
- const strict = restoredBoolean(source.strict, "strict", reject);
180
- const required = restoredRequired(source.required, reject);
181
- const vectorPromotion = restoredVectorPromotion(source.vectorPromotion, reject);
182
- if (source.patternValueLimit !== void 0 && typeof source.patternValueLimit !== "number") {
183
- reject("patternValueLimit must be a number");
184
- }
185
- return {
186
- ...typeof source.tokenizer === "string" ? { tokenizer: source.tokenizer } : {},
187
- ...stopWords !== void 0 ? { stopWords } : {},
188
- ...bm25 !== void 0 ? { bm25 } : {},
189
- ...surfaceForms !== void 0 ? { surfaceForms } : {},
190
- ...defaultScoring !== void 0 ? { defaultScoring } : {},
191
- ...trackPositions !== void 0 ? { trackPositions } : {},
192
- ...strict !== void 0 ? { strict } : {},
193
- ...required !== void 0 ? { required } : {},
194
- ...vectorPromotion !== void 0 ? { vectorPromotion } : {},
195
- ...typeof source.patternValueLimit === "number" ? { patternValueLimit: source.patternValueLimit } : {}
196
- };
197
- }
198
- function restoredConfigFields(envelope, reject = rejectSnapshot) {
199
- const shared = readSharedConfigFields(envelope, reject);
200
- const partitions = restoredPartitionConfig(envelope.partitionConfig, reject);
201
- return {
202
- ...shared,
203
- ...partitions !== void 0 ? { partitions } : {}
204
- };
205
- }
206
-
207
22
  // src/engine/embed.ts
208
23
  function assertDocumentCarriesMappedVectors(document, embeddingConfig, adapterName) {
209
24
  for (const targetField of Object.keys(embeddingConfig.fields)) {
@@ -609,4 +424,4 @@ async function resolveVectorText(params, embeddingAdapter, signal, embeddingAdap
609
424
  return { ...params, vector: resolved };
610
425
  }
611
426
 
612
- export { admitBufferedUpsert, admitInsert, asBatchInsertError, assertDocumentCarriesMappedVectors, bindEngineCore, bindRerankWindowSource, collectRequiredFieldFailures, createPendingAdmissions, embedChunkDocuments, embedDocumentFields, engineCoreOf, providedDocId, readSharedConfigFields, recordPendingAdmission, rejectSnapshot, requireDocumentObject, requireMatchingDocId, rerankWindowCapOf, resolveVectorText, restoredConfigFields, restoredEmbedding, restoredPartitionConfig };
427
+ export { admitBufferedUpsert, admitInsert, asBatchInsertError, assertDocumentCarriesMappedVectors, bindEngineCore, bindRerankWindowSource, collectRequiredFieldFailures, createPendingAdmissions, embedChunkDocuments, embedDocumentFields, engineCoreOf, providedDocId, recordPendingAdmission, requireDocumentObject, requireMatchingDocId, rerankWindowCapOf, resolveVectorText };
@@ -1,5 +1,5 @@
1
- import { sendError, RELAY_STREAM_CHUNKS_IN_FLIGHT } from './chunk-RCMNL7RI.mjs';
2
- import { ServerErrorCodes } from './chunk-CZ7ISLXA.mjs';
1
+ import { sendError, RELAY_STREAM_CHUNKS_IN_FLIGHT } from './chunk-SBMAWTRG.mjs';
2
+ import { ServerErrorCodes } from './chunk-HNHCNTVG.mjs';
3
3
  import { rm } from 'fs/promises';
4
4
  import path from 'path';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { PARSED_FIELD_TYPE_CACHE_ENTRIES, VECTOR_PATTERN, MAX_STORED_VECTOR_DIMENSION } from './chunk-L5ORED7V.mjs';
2
- import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
2
+ import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
3
3
 
4
4
  // src/schema/validator/field-type.ts
5
5
  var FIELD_OPTION_ORDER = ["sortable", "pattern", "partial"];
@@ -1,7 +1,7 @@
1
1
  import { P as PartitionConfig, B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions } from './schema-BTXbHCqA.js';
2
- import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, f as ListResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult } from './config-D1cDv3sE.js';
2
+ import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, f as ListResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult } from './config-B0H-vp4U.js';
3
3
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
4
- import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-Co8HfRD7.js';
4
+ import { f as TaskRecord, a as ChangeAnalysisBody, M as MemoryStatsResponse, c as ImportResult, H as HttpIndexConfig, d as TaskListQuery, T as TaskListPage } from './tasks-DjGjK70Y.js';
5
5
 
6
6
  /**
7
7
  * This is the `fetch` implementation the client sends every request through.
@@ -339,6 +339,21 @@ interface AdminOperations {
339
339
  * @returns The record is the task to follow.
340
340
  */
341
341
  rebuildAnalysis(indexName: string, options?: RequestOptions): Promise<TaskRecord>;
342
+ /**
343
+ * Starts a change of the language, the tokeniser, or the stop words of a live
344
+ * index, which keeps answering searches during the change.
345
+ *
346
+ * @param indexName - The index to change.
347
+ * @param change - The settings to change. A key that you leave out keeps its
348
+ * current value, and `null` on `tokenizer` or `stopWords` returns that key to
349
+ * the language default.
350
+ * @param options - This sets the signal, the deadline, and the headers for
351
+ * this request.
352
+ * @returns The record is the task to follow, and it ends with any failure of
353
+ * the change, such as `ANALYSIS_CHANGE_REPLACED` when a later change replaces
354
+ * this one.
355
+ */
356
+ changeAnalysis(indexName: string, change: ChangeAnalysisBody, options?: RequestOptions): Promise<TaskRecord>;
342
357
  /**
343
358
  * Reports the server process's heap usage, its estimate of what the indexes
344
359
  * hold, each worker's heap, and how many worker threads receive requests.
package/dist/client.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './config-D1cDv3sE.js';
2
- export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-B6WxrWxt.js';
3
- export { C as CapabilitiesResponse, a as CreateIndexEmbedding, E as ErrorDetail, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-Co8HfRD7.js';
4
- export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-gNAfaHcE.js';
1
+ export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './config-B0H-vp4U.js';
2
+ export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, C as CHANGE_ANALYSIS_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-DXAmysqJ.js';
3
+ export { C as CapabilitiesResponse, a as ChangeAnalysisBody, b as CreateIndexEmbedding, E as ErrorDetail, H as HttpIndexConfig, I as ImportError, c as ImportResult, M as MemoryStatsResponse, T as TaskListPage, d as TaskListQuery, e as TaskProgress, f as TaskRecord, g as TaskStatus, h as TaskType } from './tasks-DjGjK70Y.js';
4
+ export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-DApBeLbk.js';
5
5
  import './adapters-BQFQ4PRz.js';
6
6
  import './schema-BTXbHCqA.js';
7
7
  import './synonyms-CpOAHPa-.js';
8
- import './config-CmYJO34X.js';
8
+ import './config-Brysl9NO.js';
9
9
  import './index-HYnqS1SE.js';
10
10
  import './types-DvncmvuQ.js';
package/dist/client.mjs CHANGED
@@ -40,6 +40,10 @@ var ErrorCodes = {
40
40
  ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC",
41
41
  PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED",
42
42
  RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED",
43
+ ANALYSIS_CHANGE_REPLACED: "ANALYSIS_CHANGE_REPLACED",
44
+ ANALYSIS_CHANGE_NOT_READY: "ANALYSIS_CHANGE_NOT_READY",
45
+ ANALYSIS_GENERATION_MISSING: "ANALYSIS_GENERATION_MISSING",
46
+ ANALYSIS_REBUILD_MEMORY_EXCEEDED: "ANALYSIS_REBUILD_MEMORY_EXCEEDED",
43
47
  EMBEDDING_FAILED: "EMBEDDING_FAILED",
44
48
  EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH",
45
49
  EMBEDDING_NO_SOURCE: "EMBEDDING_NO_SOURCE",
@@ -166,6 +170,7 @@ var ASYNC_IMPORT_CAPABILITY = "documents.import.async";
166
170
  var TASK_CANCEL_CAPABILITY = "tasks.cancel";
167
171
  var TASK_FILTER_CAPABILITY = "tasks.filter";
168
172
  var REBUILD_ANALYSIS_CAPABILITY = "indexes.rebuildAnalysis";
173
+ var CHANGE_ANALYSIS_CAPABILITY = "indexes.changeAnalysis";
169
174
  var INDEX_LIFECYCLE_CAPABILITY = "indexes.lifecycle";
170
175
  var DOCUMENT_EXPORT_CAPABILITY = "indexes.documentExport";
171
176
  var SYNONYMS_CAPABILITY = "indexes.synonyms";
@@ -175,6 +180,7 @@ var SERVER_CAPABILITIES = [
175
180
  TASK_CANCEL_CAPABILITY,
176
181
  TASK_FILTER_CAPABILITY,
177
182
  REBUILD_ANALYSIS_CAPABILITY,
183
+ CHANGE_ANALYSIS_CAPABILITY,
178
184
  INDEX_LIFECYCLE_CAPABILITY,
179
185
  DOCUMENT_EXPORT_CAPABILITY,
180
186
  SYNONYMS_CAPABILITY,
@@ -343,6 +349,10 @@ function createAdminOperations(transport) {
343
349
  const path = `${indexPath(indexName)}/_rebuild-analysis`;
344
350
  return readBody(await transport.json({ method: "POST", path, options }), path);
345
351
  },
352
+ async changeAnalysis(indexName, change, options) {
353
+ const path = `${indexPath(indexName)}/_change-analysis`;
354
+ return postJson(path, change, options);
355
+ },
346
356
  async getMemoryStats(options) {
347
357
  const path = "/stats/memory";
348
358
  return readBody(await transport.json({ method: "GET", path, options }), path);
@@ -1064,4 +1074,4 @@ function createNarsilClient(options) {
1064
1074
  };
1065
1075
  }
1066
1076
 
1067
- export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, ClientErrorCodes, DOCUMENT_EXPORT_CAPABILITY, ErrorCodes, INDEX_LIFECYCLE_CAPABILITY, NarsilError, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, ServerErrorCodes, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, createNarsilClient, isNarsilError };
1077
+ export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, CHANGE_ANALYSIS_CAPABILITY, ClientErrorCodes, DOCUMENT_EXPORT_CAPABILITY, ErrorCodes, INDEX_LIFECYCLE_CAPABILITY, NarsilError, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, ServerErrorCodes, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, createNarsilClient, isNarsilError };
@@ -51,6 +51,10 @@ declare const ErrorCodes: {
51
51
  readonly ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC";
52
52
  readonly PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED";
53
53
  readonly RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED";
54
+ readonly ANALYSIS_CHANGE_REPLACED: "ANALYSIS_CHANGE_REPLACED";
55
+ readonly ANALYSIS_CHANGE_NOT_READY: "ANALYSIS_CHANGE_NOT_READY";
56
+ readonly ANALYSIS_GENERATION_MISSING: "ANALYSIS_GENERATION_MISSING";
57
+ readonly ANALYSIS_REBUILD_MEMORY_EXCEEDED: "ANALYSIS_REBUILD_MEMORY_EXCEEDED";
54
58
  readonly EMBEDDING_FAILED: "EMBEDDING_FAILED";
55
59
  readonly EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH";
56
60
  readonly EMBEDDING_NO_SOURCE: "EMBEDDING_NO_SOURCE";
@@ -1,4 +1,4 @@
1
- import { e as NarsilConfig } from './config-D1cDv3sE.js';
1
+ import { e as NarsilConfig } from './config-B0H-vp4U.js';
2
2
  import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-HYnqS1SE.js';
3
3
  import { N as NodeTransport } from './types-DvncmvuQ.js';
4
4
 
@@ -1,28 +1,28 @@
1
- export { createDirectExecutor } from './chunk-RWESFSJI.mjs';
2
- import './chunk-2MKX2SCO.mjs';
3
- import './chunk-ZR4VM4A6.mjs';
1
+ export { createDirectExecutor } from './chunk-IBATGS3J.mjs';
2
+ import './chunk-U4X4AWKL.mjs';
3
+ import './chunk-N37VMC62.mjs';
4
4
  import './chunk-ZATRDAYU.mjs';
5
5
  import './chunk-EBIHRL7B.mjs';
6
- import './chunk-TGP5M5R7.mjs';
7
- import './chunk-U2BKYEC7.mjs';
8
- import './chunk-2SEL6SBS.mjs';
6
+ import './chunk-RKAVHNRW.mjs';
9
7
  import './chunk-WQBCBKY3.mjs';
10
8
  import './chunk-JUKYYXSP.mjs';
11
- import './chunk-EUCX5K74.mjs';
12
- import './chunk-PU6SKH7O.mjs';
9
+ import './chunk-J3EHATEZ.mjs';
10
+ import './chunk-UBXJQJII.mjs';
13
11
  import './chunk-U476IXKQ.mjs';
14
12
  import './chunk-FQBFZAWG.mjs';
15
13
  import './chunk-VJS4JFBQ.mjs';
16
14
  import './chunk-GES7U2PM.mjs';
17
- import './chunk-7XY6VD7B.mjs';
18
- import './chunk-6SSVIW7Y.mjs';
15
+ import './chunk-ZSWHPKGM.mjs';
16
+ import './chunk-O4LJQI4G.mjs';
19
17
  import './chunk-X5CV2E2B.mjs';
20
- import './chunk-7X5JST5L.mjs';
21
- import './chunk-D5TFRB5G.mjs';
18
+ import './chunk-WNBRW4Q2.mjs';
19
+ import './chunk-TGP5M5R7.mjs';
20
+ import './chunk-U2BKYEC7.mjs';
21
+ import './chunk-NPNK57CA.mjs';
22
22
  import './chunk-4UMZ7KQL.mjs';
23
23
  import './chunk-R6A773WK.mjs';
24
24
  import './chunk-YTJCGKM4.mjs';
25
- import './chunk-HCGJKDZV.mjs';
25
+ import './chunk-FFVLPCLH.mjs';
26
26
  import './chunk-22YPZVMG.mjs';
27
27
  import './chunk-L5ORED7V.mjs';
28
- import './chunk-CZ7ISLXA.mjs';
28
+ import './chunk-HNHCNTVG.mjs';
@@ -2,7 +2,7 @@ import { INDEX_METADATA_KEY_PREFIX, indexNameOfMetadataSuffix } from '../../chun
2
2
  import { MAX_NODE_ID_LENGTH, CONTROLLER_LEASE_KEY, MAX_WATCHERS } from '../../chunk-44W3CBNG.mjs';
3
3
  import '../../chunk-R6A773WK.mjs';
4
4
  import { compareCodePoints } from '../../chunk-YTJCGKM4.mjs';
5
- import { NarsilError, ErrorCodes, describeError } from '../../chunk-CZ7ISLXA.mjs';
5
+ import { NarsilError, ErrorCodes, describeError } from '../../chunk-HNHCNTVG.mjs';
6
6
  import { encode, decode } from '@msgpack/msgpack';
7
7
 
8
8
  // src/distribution/coordinator/etcd/constants.ts
@@ -2,7 +2,7 @@ import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-J6YV
2
2
  import { timeoutsOf, replyDeadlineMs } from '../../chunk-PWIWSUCX.mjs';
3
3
  import { MAX_MESSAGE_SIZE_BYTES, GRPC_KEEPALIVE_TIMEOUT_MS, GRPC_KEEPALIVE_TIME_MS, GRPC_ENVELOPE_OVERHEAD_BYTES } from '../../chunk-UNEEFTEU.mjs';
4
4
  import { TransportError, TransportErrorCodes } from '../../chunk-YH5OIL7B.mjs';
5
- import { NarsilError, ErrorCodes } from '../../chunk-CZ7ISLXA.mjs';
5
+ import { NarsilError, ErrorCodes } from '../../chunk-HNHCNTVG.mjs';
6
6
 
7
7
  // src/distribution/transport/grpc/codec.ts
8
8
  var FIELD_ONE_LENGTH_DELIMITED_KEY = 10;
@@ -1,12 +1,12 @@
1
- import { b as CreateIndexOptions, C as ClusterNamespace, c as ClusterNodeConfig } from './config-CmYJO34X.js';
2
- export { d as ClusterControllerConfig, e as ClusterHealth, f as ClusterHealthStatus, g as ClusterMemoryConfig, h as ClusterMetrics, a as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig, V as VectorRebuildWaitFigure } from './config-CmYJO34X.js';
1
+ import { b as CreateIndexOptions, C as ClusterNamespace, c as ClusterNodeConfig } from './config-Brysl9NO.js';
2
+ export { d as ClusterControllerConfig, e as ClusterHealth, f as ClusterHealthStatus, g as ClusterMemoryConfig, h as ClusterMetrics, a as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig, V as VectorRebuildWaitFigure } from './config-Brysl9NO.js';
3
3
  import { R as RerankAdapter } from './adapters-BQFQ4PRz.js';
4
- import { B as BatchResult, L as ListParams, f as ListResult, g as SuggestParams, h as SuggestResult, Q as QueryParams, j as PreflightResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, M as MemoryStats, l as NarsilEventMap, m as QueryResult } from './config-D1cDv3sE.js';
4
+ import { A as AnalysisChange, N as Narsil } from './engine-CuLMbH1-.js';
5
+ import { B as BatchResult, L as ListParams, f as ListResult, g as SuggestParams, h as SuggestResult, Q as QueryParams, j as PreflightResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, M as MemoryStats, l as NarsilEventMap, m as QueryResult } from './config-B0H-vp4U.js';
5
6
  import { B as BM25Params, a as IndexConfig, A as AnyDocument, I as InsertOptions } from './schema-BTXbHCqA.js';
6
7
  import { b as NodeCapacity, N as NodeRole } from './index-HYnqS1SE.js';
7
8
  export { d as AllocationConstraints, e as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, f as IndexMetadataWatch, g as IndexPartitionBytes, h as NodeEvent, c as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-HYnqS1SE.js';
8
9
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
9
- import { N as Narsil } from './engine-m_Ddr1bz.js';
10
10
  export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-DvncmvuQ.js';
11
11
 
12
12
  /**
@@ -290,6 +290,22 @@ interface ClusterNode extends ClusterNodeSearchSettings {
290
290
  * the cluster before it answers.
291
291
  */
292
292
  rebuildAnalysis(indexName: string): Promise<void>;
293
+ /**
294
+ * Gives a cluster index a new language, stop word set, or tokeniser, and resolves once the cluster publishes the new
295
+ * settings, while the index keeps answering searches under the old settings.
296
+ *
297
+ * Every node that holds a copy builds the new terms beside the old ones, and the controller finishes the change if
298
+ * this node dies. A later change replaces one that is still building, so the latest change wins.
299
+ *
300
+ * @param indexName - The index to change.
301
+ * @param change - The settings to change, each by a registered name, with `null` returning a setting to its default.
302
+ * @throws A `NarsilError` with `LANGUAGE_NOT_SUPPORTED` or `CONFIG_INVALID` for an unregistered name, with
303
+ * `ANALYSIS_CHANGE_NOT_READY` where a registered node runs an older specification version, with
304
+ * `ANALYSIS_REBUILD_MEMORY_EXCEEDED` where a node lacks the memory for a second copy of the terms, with
305
+ * `ANALYSIS_CHANGE_REPLACED` where a later change replaces this one, and with
306
+ * `PARTITION_REBALANCING_BACKPRESSURE` during a partition count change.
307
+ */
308
+ changeAnalysis(indexName: string, change: AnalysisChange): Promise<void>;
293
309
  /**
294
310
  * Moves an index onto a new number of partitions, and resolves once every read and write of the index goes to the new
295
311
  * layout.
@@ -482,7 +498,7 @@ interface ClusterEngineOptions {
482
498
  * serves a single engine.
483
499
  *
484
500
  * Writes, updates, searches, suggestions, listings, counts, index creation,
485
- * index removal, analysis rebuilds, synonym sets, and document reads route through the cluster.
501
+ * index removal, analysis rebuilds, analysis changes, synonym sets, and document reads route through the cluster.
486
502
  * Checkpointing, memory statistics, index opens, index closes, engine events,
487
503
  * and rerank adapter registration reach this node's local engine, because
488
504
  * each covers a per-node fact. This node reranks the searches that it