@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/server.d.ts
CHANGED
|
@@ -1,17 +1,204 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { G as GroupResult, Q as QueryParams, n as GroupConfig, m as QueryResult, L as ListParams, g as SuggestParams, k as IndexStats, f as ListResult, j as PreflightResult, h as SuggestResult } from './config-D1cDv3sE.js';
|
|
2
|
+
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';
|
|
3
|
+
import { E as ErrorEnvelope, c as ServerOptions, N as NarsilServer } from './capabilities-B6WxrWxt.js';
|
|
4
|
+
export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, C as CorsOptions, D as DOCUMENT_EXPORT_CAPABILITY, I as INDEX_LIFECYCLE_CAPABILITY, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, d as RequestContext, e as RequestDenial, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, f as ServerLimits, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-B6WxrWxt.js';
|
|
5
|
+
import { N as Narsil } from './engine-m_Ddr1bz.js';
|
|
6
|
+
import { i as CreateIndexRequest, H as HttpIndexConfig, B as BatchBody, D as DocumentBody, j as InsertBody, k as MultiGetBody, R as RebalanceBody, l as ReplicationFactorBody, c as TaskListQuery, V as VectorFieldBody, S as SynonymSetBody, m as BatchResponse, C as CapabilitiesResponse, n as ClusterAllocationResponse, o as ClusterTopologyResponse, p as DocumentCountResponse, q as DocumentExistsResponse, r as DocumentIdResponse, s as DocumentPutResponse, t as DocumentRemovedResponse, u as DocumentResponse, b as ImportResult, v as IndexClearedResponse, w as IndexCreatedResponse, x as IndexDroppedResponse, y as IndexListResponse, z as IndexPartitionsResponse, A as IndexStateResponse, L as LivenessResponse, M as MemoryStatsResponse, F as MultiGetResponse, O as OkResponse, G as ReadinessResponse, J as ReplicationFactorResponse, T as TaskListPage, e as TaskRecord, K as VectorMaintenanceResponse, N as VersionResponse, d as TaskProgress, h as TaskStore } from './tasks-Co8HfRD7.js';
|
|
7
|
+
export { P as BatchFailure, Q as ClusterMemberReport, U as ClusterNodeReport, a as CreateIndexEmbedding, E as ErrorDetail, I as ImportError, W as PartitionAllocationReport, f as TaskStatus, g as TaskType } from './tasks-Co8HfRD7.js';
|
|
8
|
+
import { e as ClusterHealth } from './config-CmYJO34X.js';
|
|
9
|
+
import { S as SchemaDefinition, P as PartitionConfig, V as VectorIndexConfig, B as BM25Params, F as FieldType } from './schema-BTXbHCqA.js';
|
|
8
10
|
import './adapters-BQFQ4PRz.js';
|
|
9
11
|
import './synonyms-CpOAHPa-.js';
|
|
10
|
-
import './
|
|
11
|
-
import './config-C3YXk5Rn.js';
|
|
12
|
-
import './index-DkQ2DlgR.js';
|
|
12
|
+
import './index-HYnqS1SE.js';
|
|
13
13
|
import './types-DvncmvuQ.js';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Everything `POST /indexes/{name}/search` accepts, which is {@link QueryParams}
|
|
17
|
+
* with a `group` that holds no reducer, because a function cannot cross JSON.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
type HttpQueryParams = Omit<QueryParams, 'group'> & {
|
|
22
|
+
/** These settings collapse the hits into groups by field value. */
|
|
23
|
+
group?: Omit<GroupConfig, 'reduce'>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* One group of hits as the server sends it, which is {@link GroupResult} with
|
|
27
|
+
* no reducer output, because the server refuses a query with a reducer.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
type HttpGroupResult = Omit<GroupResult, 'reduced' | 'reducerError'>;
|
|
32
|
+
/**
|
|
33
|
+
* The body of `POST /indexes/{name}/search`.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
type HttpQueryResult = Omit<QueryResult, 'groups'> & {
|
|
38
|
+
/** These groups arrive when the query asked for grouping. */
|
|
39
|
+
groups?: HttpGroupResult[];
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The settings of a new index as `POST /indexes` reads them, which is
|
|
43
|
+
* {@link HttpIndexConfig} with each field type spelled out.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
type HttpIndexBody = Omit<HttpIndexConfig, 'schema' | 'partitions' | 'vectorPromotion'> & {
|
|
48
|
+
/** This layout gives each value as either a field type or a nested schema. */
|
|
49
|
+
schema: SchemaDefinition;
|
|
50
|
+
/** These settings control how the index splits documents across partitions as it grows. */
|
|
51
|
+
partitions?: PartitionConfig;
|
|
52
|
+
/** These settings control when vector fields move to an HNSW graph, and how that graph is built. */
|
|
53
|
+
vectorPromotion?: VectorIndexConfig;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The body of `POST /indexes`, which is {@link CreateIndexRequest} with the
|
|
57
|
+
* settings of {@link HttpIndexBody}.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
type HttpCreateIndexBody = Omit<CreateIndexRequest, 'config'> & {
|
|
62
|
+
/** This carries the schema and settings, in the subset JSON can express. */
|
|
63
|
+
config: HttpIndexBody;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The query string of `DELETE /indexes/{name}/documents/{id}`.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
interface RemoveDocumentQuery {
|
|
71
|
+
/** Under `true`, the server answers only once every worker copy has applied the removal. */
|
|
72
|
+
wait?: 'true' | 'false';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The query string of `POST /indexes/{name}/documents/_import`.
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
interface ImportDocumentsQuery {
|
|
80
|
+
/** Under `true`, the server starts a task and answers 202 with its record. */
|
|
81
|
+
async?: 'true' | 'false';
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Every named type that a route of the HTTP server sends or takes as JSON,
|
|
85
|
+
* under the name that the published OpenAPI file gives its schema.
|
|
86
|
+
*
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
interface HttpWireTypes {
|
|
90
|
+
/** The body of `POST /indexes/{name}/documents/_batch`, which gives the action to perform. */
|
|
91
|
+
BatchBody: BatchBody;
|
|
92
|
+
/** The body of `POST /indexes/{name}/bm25`. */
|
|
93
|
+
BM25Params: BM25Params;
|
|
94
|
+
/** The body of `POST /indexes`. */
|
|
95
|
+
HttpCreateIndexBody: HttpCreateIndexBody;
|
|
96
|
+
/** The body of a request that writes one document with a known id. */
|
|
97
|
+
DocumentBody: DocumentBody;
|
|
98
|
+
/** Every value that a field of an index schema accepts. */
|
|
99
|
+
FieldType: FieldType;
|
|
100
|
+
/** The query string of `POST /indexes/{name}/documents/_import`. */
|
|
101
|
+
ImportDocumentsQuery: ImportDocumentsQuery;
|
|
102
|
+
/** The body of `POST /indexes/{name}/documents`. */
|
|
103
|
+
InsertBody: InsertBody;
|
|
104
|
+
/** The body of `POST /indexes/{name}/documents/_list`. */
|
|
105
|
+
ListParams: ListParams;
|
|
106
|
+
/** The body of `POST /indexes/{name}/documents/_multi-get`. */
|
|
107
|
+
MultiGetBody: MultiGetBody;
|
|
108
|
+
/** The body of `POST /indexes/{name}/partition-config`. */
|
|
109
|
+
PartitionConfig: PartitionConfig;
|
|
110
|
+
/** The body of `POST /indexes/{name}/search` and of `POST /indexes/{name}/search/preflight`. */
|
|
111
|
+
HttpQueryParams: HttpQueryParams;
|
|
112
|
+
/** The body of `POST /indexes/{name}/_rebalance`. */
|
|
113
|
+
RebalanceBody: RebalanceBody;
|
|
114
|
+
/** The query string of `DELETE /indexes/{name}/documents/{id}`. */
|
|
115
|
+
RemoveDocumentQuery: RemoveDocumentQuery;
|
|
116
|
+
/** The body of `PUT /indexes/{name}/replication-factor`. */
|
|
117
|
+
ReplicationFactorBody: ReplicationFactorBody;
|
|
118
|
+
/** The body of `POST /indexes/{name}/suggest`. */
|
|
119
|
+
SuggestParams: SuggestParams;
|
|
120
|
+
/** The query string of `GET /tasks`. */
|
|
121
|
+
TaskListQuery: TaskListQuery;
|
|
122
|
+
/** The body of `POST /indexes/{name}/vectors/_compact` and of `POST /indexes/{name}/vectors/_optimize`. */
|
|
123
|
+
VectorFieldBody: VectorFieldBody;
|
|
124
|
+
/** The body of `GET` and of `POST /indexes/{name}/synonyms`. */
|
|
125
|
+
SynonymSetBody: SynonymSetBody;
|
|
126
|
+
/** The body of `POST /indexes/{name}/documents/_batch`. */
|
|
127
|
+
BatchResponse: BatchResponse;
|
|
128
|
+
/** The body of `GET /capabilities`. */
|
|
129
|
+
CapabilitiesResponse: CapabilitiesResponse;
|
|
130
|
+
/** The body of `GET /indexes/{name}/cluster`. */
|
|
131
|
+
ClusterAllocationResponse: ClusterAllocationResponse;
|
|
132
|
+
/** The body of `GET /cluster/health`. */
|
|
133
|
+
ClusterHealth: ClusterHealth;
|
|
134
|
+
/** The body of `GET /cluster`. */
|
|
135
|
+
ClusterTopologyResponse: ClusterTopologyResponse;
|
|
136
|
+
/** The body of `GET /indexes/{name}/count`. */
|
|
137
|
+
DocumentCountResponse: DocumentCountResponse;
|
|
138
|
+
/** The body of `GET /indexes/{name}/documents/{id}/_exists`. */
|
|
139
|
+
DocumentExistsResponse: DocumentExistsResponse;
|
|
140
|
+
/** The body of `POST /indexes/{name}/documents` and of `PATCH /indexes/{name}/documents/{id}`. */
|
|
141
|
+
DocumentIdResponse: DocumentIdResponse;
|
|
142
|
+
/** The body of `PUT /indexes/{name}/documents/{id}`. */
|
|
143
|
+
DocumentPutResponse: DocumentPutResponse;
|
|
144
|
+
/** The body of `DELETE /indexes/{name}/documents/{id}`. */
|
|
145
|
+
DocumentRemovedResponse: DocumentRemovedResponse;
|
|
146
|
+
/** The body of `GET /indexes/{name}/documents/{id}`. */
|
|
147
|
+
DocumentResponse: DocumentResponse;
|
|
148
|
+
/** The body of every failed response. */
|
|
149
|
+
ErrorEnvelope: ErrorEnvelope;
|
|
150
|
+
/** The body of `POST /indexes/{name}/search`. */
|
|
151
|
+
HttpQueryResult: HttpQueryResult;
|
|
152
|
+
/** The body of `POST /indexes/{name}/documents/_import` when the server finishes the import inside the request. */
|
|
153
|
+
ImportResult: ImportResult;
|
|
154
|
+
/** The body of `POST /indexes/{name}/_clear`. */
|
|
155
|
+
IndexClearedResponse: IndexClearedResponse;
|
|
156
|
+
/** The body of `POST /indexes`. */
|
|
157
|
+
IndexCreatedResponse: IndexCreatedResponse;
|
|
158
|
+
/** The body of `DELETE /indexes/{name}`. */
|
|
159
|
+
IndexDroppedResponse: IndexDroppedResponse;
|
|
160
|
+
/** The body of `GET /indexes`. */
|
|
161
|
+
IndexListResponse: IndexListResponse;
|
|
162
|
+
/** The body of `GET /indexes/{name}/partitions`. */
|
|
163
|
+
IndexPartitionsResponse: IndexPartitionsResponse;
|
|
164
|
+
/** The body of `POST /indexes/{name}/_open` and of `POST /indexes/{name}/_close`. */
|
|
165
|
+
IndexStateResponse: IndexStateResponse;
|
|
166
|
+
/** The body of `GET /indexes/{name}/stats`. */
|
|
167
|
+
IndexStats: IndexStats;
|
|
168
|
+
/** The body of `GET /livez`. */
|
|
169
|
+
LivenessResponse: LivenessResponse;
|
|
170
|
+
/** The body of `POST /indexes/{name}/documents/_list`. */
|
|
171
|
+
ListResult: ListResult;
|
|
172
|
+
/** The body of `GET /stats/memory`. */
|
|
173
|
+
MemoryStatsResponse: MemoryStatsResponse;
|
|
174
|
+
/** The body of `POST /indexes/{name}/documents/_multi-get`. */
|
|
175
|
+
MultiGetResponse: MultiGetResponse;
|
|
176
|
+
/** The body of a request that the server finishes with nothing further to report. */
|
|
177
|
+
OkResponse: OkResponse;
|
|
178
|
+
/** The body of `POST /indexes/{name}/search/preflight`. */
|
|
179
|
+
PreflightResult: PreflightResult;
|
|
180
|
+
/** The body of `GET /readyz` and of `GET /health`. */
|
|
181
|
+
ReadinessResponse: ReadinessResponse;
|
|
182
|
+
/** The body of `PUT /indexes/{name}/replication-factor`. */
|
|
183
|
+
ReplicationFactorResponse: ReplicationFactorResponse;
|
|
184
|
+
/** The body of `POST /indexes/{name}/suggest`. */
|
|
185
|
+
SuggestResult: SuggestResult;
|
|
186
|
+
/** The body of `GET /tasks`. */
|
|
187
|
+
TaskListPage: TaskListPage;
|
|
188
|
+
/** The body of every route that starts a task, and of `GET /tasks/{id}`. */
|
|
189
|
+
TaskRecord: TaskRecord;
|
|
190
|
+
/** The body of `GET /indexes/{name}/vector-maintenance`. */
|
|
191
|
+
VectorMaintenanceResponse: VectorMaintenanceResponse;
|
|
192
|
+
/** The body of `GET /version`. */
|
|
193
|
+
VersionResponse: VersionResponse;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The name of one schema in the published OpenAPI file.
|
|
197
|
+
*
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
type HttpWireTypeName = keyof HttpWireTypes;
|
|
201
|
+
|
|
15
202
|
/**
|
|
16
203
|
* What a running task reports back while it works, and how it learns that a
|
|
17
204
|
* cancel arrived.
|
|
@@ -125,4 +312,4 @@ declare class InMemoryTaskStore implements TaskStore {
|
|
|
125
312
|
private prune;
|
|
126
313
|
}
|
|
127
314
|
|
|
128
|
-
export { ImportResult, InMemoryTaskStore, NarsilServer, ServerOptions, type TaskContext, type TaskOperation, TaskProgress, TaskRecord, TaskStore, createServer, httpStatusForNarsilError };
|
|
315
|
+
export { BatchBody, BatchResponse, CapabilitiesResponse, ClusterAllocationResponse, ClusterTopologyResponse, CreateIndexRequest, DocumentBody, DocumentCountResponse, DocumentExistsResponse, DocumentIdResponse, DocumentPutResponse, DocumentRemovedResponse, DocumentResponse, ErrorEnvelope, type HttpCreateIndexBody, type HttpGroupResult, type HttpIndexBody, HttpIndexConfig, type HttpQueryParams, type HttpQueryResult, type HttpWireTypeName, type HttpWireTypes, type ImportDocumentsQuery, ImportResult, InMemoryTaskStore, IndexClearedResponse, IndexCreatedResponse, IndexDroppedResponse, IndexListResponse, IndexPartitionsResponse, IndexStateResponse, InsertBody, LivenessResponse, MemoryStatsResponse, MultiGetBody, MultiGetResponse, NarsilServer, OkResponse, ReadinessResponse, RebalanceBody, type RemoveDocumentQuery, ReplicationFactorBody, ReplicationFactorResponse, ServerOptions, SynonymSetBody, type TaskContext, TaskListPage, TaskListQuery, type TaskOperation, TaskProgress, TaskRecord, TaskStore, VectorFieldBody, VectorMaintenanceResponse, VersionResponse, createServer, httpStatusForNarsilError };
|
package/dist/server.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { answerRequest } from './chunk-
|
|
2
|
-
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, closeEveryThreadAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS, clearGateSlot, clearBodyBudgetSlot, createCloseAtExitWords, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, isRemoveOnlyBatch, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, respondAnswer, parseTaskListQuery, parseJsonOptional, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, SERVER_CAPABILITIES, toHttpError, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-
|
|
3
|
-
export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-
|
|
4
|
-
import { rerankOnHost } from './chunk-
|
|
5
|
-
import { writeBlockLookupOf, indexReadsOf, isRecord, validateIndexName } from './chunk-
|
|
6
|
-
import { readMemoryFigures } from './chunk-
|
|
1
|
+
import { answerRequest } from './chunk-5W7AEVTH.mjs';
|
|
2
|
+
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, PROMETHEUS_TEXT_CONTENT_TYPE, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, closeEveryThreadAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS, clearGateSlot, clearBodyBudgetSlot, createCloseAtExitWords, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, isRemoveOnlyBatch, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, respondAnswer, parseTaskListQuery, parseJsonOptional, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, SERVER_CAPABILITIES, toHttpError, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-RCMNL7RI.mjs';
|
|
3
|
+
export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-RCMNL7RI.mjs';
|
|
4
|
+
import { rerankOnHost } from './chunk-PATMDIMN.mjs';
|
|
5
|
+
import { writeBlockLookupOf, indexReadsOf, isRecord, validateIndexName } from './chunk-T4OFG4IQ.mjs';
|
|
6
|
+
import { readMemoryFigures } from './chunk-4GDLFDPZ.mjs';
|
|
7
7
|
import './chunk-IWVEG5CX.mjs';
|
|
8
8
|
import './chunk-DJHHF2L5.mjs';
|
|
9
9
|
import './chunk-P36MUFEJ.mjs';
|
|
10
|
-
import { rerankWindowCapOf, engineCoreOf, providedDocId, resolveVectorText } from './chunk-
|
|
10
|
+
import { rerankWindowCapOf, engineCoreOf, providedDocId, resolveVectorText } from './chunk-JT3YZGCE.mjs';
|
|
11
11
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-ZR4VM4A6.mjs';
|
|
13
13
|
import './chunk-ZATRDAYU.mjs';
|
|
14
14
|
import './chunk-EBIHRL7B.mjs';
|
|
15
15
|
import { MAX_RERANK_WINDOW } from './chunk-HJSN7UYG.mjs';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-RNSC4NFI.mjs';
|
|
17
17
|
import './chunk-TGP5M5R7.mjs';
|
|
18
18
|
import './chunk-U2BKYEC7.mjs';
|
|
19
|
-
import './chunk-
|
|
19
|
+
import './chunk-2C3WXBQS.mjs';
|
|
20
20
|
import './chunk-WQBCBKY3.mjs';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-PU6SKH7O.mjs';
|
|
22
22
|
import './chunk-U476IXKQ.mjs';
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-FQBFZAWG.mjs';
|
|
24
24
|
import './chunk-VJS4JFBQ.mjs';
|
|
25
|
-
import './chunk-
|
|
25
|
+
import './chunk-7XY6VD7B.mjs';
|
|
26
26
|
import './chunk-7X5JST5L.mjs';
|
|
27
27
|
import './chunk-R6A773WK.mjs';
|
|
28
28
|
import './chunk-YTJCGKM4.mjs';
|
|
29
29
|
import { startIdleHeapCleanup } from './chunk-RIIUZJQ3.mjs';
|
|
30
30
|
import './chunk-22YPZVMG.mjs';
|
|
31
31
|
import './chunk-L5ORED7V.mjs';
|
|
32
|
-
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-
|
|
33
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-
|
|
32
|
+
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-CZ7ISLXA.mjs';
|
|
33
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-CZ7ISLXA.mjs';
|
|
34
34
|
import { randomUUID } from 'crypto';
|
|
35
35
|
import { createReadStream } from 'fs';
|
|
36
36
|
import { MessageChannel } from 'worker_threads';
|
|
@@ -317,7 +317,12 @@ function createClusterHandlers(deps) {
|
|
|
317
317
|
}
|
|
318
318
|
const table = await cluster.getAllocation(indexName);
|
|
319
319
|
if (table === null) {
|
|
320
|
-
respondJson(ctx, {
|
|
320
|
+
respondJson(ctx, {
|
|
321
|
+
indexName,
|
|
322
|
+
allocated: false,
|
|
323
|
+
version: null,
|
|
324
|
+
partitions: []
|
|
325
|
+
});
|
|
321
326
|
return;
|
|
322
327
|
}
|
|
323
328
|
const partitions = [];
|
|
@@ -335,7 +340,12 @@ function createClusterHandlers(deps) {
|
|
|
335
340
|
});
|
|
336
341
|
}
|
|
337
342
|
partitions.sort((left, right) => left.partitionId - right.partitionId);
|
|
338
|
-
respondJson(ctx, {
|
|
343
|
+
respondJson(ctx, {
|
|
344
|
+
indexName,
|
|
345
|
+
allocated: partitions.length > 0,
|
|
346
|
+
version: table.version,
|
|
347
|
+
partitions
|
|
348
|
+
});
|
|
339
349
|
} catch (err) {
|
|
340
350
|
respondError(ctx, err);
|
|
341
351
|
}
|
|
@@ -837,7 +847,9 @@ function createIndexHandlers(deps) {
|
|
|
837
847
|
}
|
|
838
848
|
async function partitions(ctx) {
|
|
839
849
|
try {
|
|
840
|
-
respondJson(ctx, {
|
|
850
|
+
respondJson(ctx, {
|
|
851
|
+
partitions: await indexReadsOf(engine).getPartitionStats(ctx.params[0])
|
|
852
|
+
});
|
|
841
853
|
} catch (err) {
|
|
842
854
|
respondError(ctx, err);
|
|
843
855
|
}
|
|
@@ -870,7 +882,6 @@ function createIndexHandlers(deps) {
|
|
|
870
882
|
}
|
|
871
883
|
|
|
872
884
|
// src/server/handlers/metrics.ts
|
|
873
|
-
var PROMETHEUS_TEXT_CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
|
|
874
885
|
function labelValue(value) {
|
|
875
886
|
return value.replaceAll("\\", "\\\\").replaceAll('"', '\\"').replaceAll("\n", "\\n");
|
|
876
887
|
}
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-
|
|
5
|
-
import { decodeVectorIndexParts, bytesToVectors } from './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { documentsOfPayloadV2 } from './chunk-JJ6EUMXB.mjs';
|
|
2
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-WVRDRLIC.mjs';
|
|
3
|
+
import './chunk-SOHMMNCH.mjs';
|
|
4
|
+
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-K77FJXKS.mjs';
|
|
5
|
+
import { decodeVectorIndexParts, bytesToVectors } from './chunk-Y2U5VVWX.mjs';
|
|
6
|
+
import './chunk-X5CNUKD5.mjs';
|
|
7
7
|
import './chunk-DJHHF2L5.mjs';
|
|
8
8
|
import './chunk-37CD3OKS.mjs';
|
|
9
|
-
import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-2JWNJSNE.mjs';
|
|
10
|
+
import './chunk-7OIQ2SIO.mjs';
|
|
11
11
|
import './chunk-P36MUFEJ.mjs';
|
|
12
12
|
import './chunk-YH5OIL7B.mjs';
|
|
13
|
-
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-
|
|
14
|
-
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-
|
|
15
|
-
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-
|
|
16
|
-
import './chunk-
|
|
13
|
+
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, decodeIndexConfiguration, prepareStoredSynonyms, arrayPositionsAreStale, insertDocumentVectors } from './chunk-TGHNXN7W.mjs';
|
|
14
|
+
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-6M6SDH3S.mjs';
|
|
15
|
+
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-JT3YZGCE.mjs';
|
|
16
|
+
import './chunk-NNO7CO3A.mjs';
|
|
17
17
|
import './chunk-AV4IJKD2.mjs';
|
|
18
|
-
import { decodeEveryStoredDocument } from './chunk-
|
|
19
|
-
import './chunk-
|
|
20
|
-
import { getLanguage } from './chunk-
|
|
18
|
+
import { decodeEveryStoredDocument } from './chunk-RWESFSJI.mjs';
|
|
19
|
+
import { ARRAY_POSITION_GAP } from './chunk-2MKX2SCO.mjs';
|
|
20
|
+
import { getLanguage } from './chunk-ZR4VM4A6.mjs';
|
|
21
21
|
import { readHeapStatistics, readResidentMemory } from './chunk-ZATRDAYU.mjs';
|
|
22
22
|
import './chunk-EBIHRL7B.mjs';
|
|
23
23
|
import './chunk-HJSN7UYG.mjs';
|
|
24
|
-
import './chunk-
|
|
24
|
+
import './chunk-RNSC4NFI.mjs';
|
|
25
25
|
import './chunk-TGP5M5R7.mjs';
|
|
26
26
|
import './chunk-U2BKYEC7.mjs';
|
|
27
27
|
import './chunk-KOKM4PQN.mjs';
|
|
28
28
|
import './chunk-QSK35UC2.mjs';
|
|
29
|
-
import './chunk-
|
|
30
|
-
import './chunk-
|
|
29
|
+
import './chunk-2C3WXBQS.mjs';
|
|
30
|
+
import './chunk-2SEL6SBS.mjs';
|
|
31
31
|
import './chunk-WQBCBKY3.mjs';
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
32
|
+
import './chunk-JUKYYXSP.mjs';
|
|
33
|
+
import { parseVectorDimension } from './chunk-EUCX5K74.mjs';
|
|
34
|
+
import { raiseEarlierReleaseGraphSetting, validateSchema, validateVectorPromotion, validateVectorStorage, extractVectorFieldsFromSchema, flattenSchema } from './chunk-PU6SKH7O.mjs';
|
|
34
35
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
35
|
-
import './chunk-
|
|
36
|
+
import './chunk-FQBFZAWG.mjs';
|
|
36
37
|
import './chunk-VJS4JFBQ.mjs';
|
|
37
38
|
import './chunk-GES7U2PM.mjs';
|
|
38
|
-
import './chunk-
|
|
39
|
-
import { resolveIndexAnalysis } from './chunk-
|
|
39
|
+
import './chunk-7XY6VD7B.mjs';
|
|
40
|
+
import { resolveIndexAnalysis } from './chunk-6SSVIW7Y.mjs';
|
|
40
41
|
import './chunk-X5CV2E2B.mjs';
|
|
41
42
|
import './chunk-7X5JST5L.mjs';
|
|
42
|
-
import './chunk-
|
|
43
|
+
import './chunk-D5TFRB5G.mjs';
|
|
44
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
43
45
|
import './chunk-R6A773WK.mjs';
|
|
44
46
|
import './chunk-YTJCGKM4.mjs';
|
|
45
47
|
import { collectAndReturnPages } from './chunk-RIIUZJQ3.mjs';
|
|
46
48
|
import './chunk-UJWGQIXU.mjs';
|
|
47
|
-
import { loadVectorCodeFor } from './chunk-
|
|
49
|
+
import { loadVectorCodeFor } from './chunk-HCGJKDZV.mjs';
|
|
48
50
|
import './chunk-22YPZVMG.mjs';
|
|
49
51
|
import './chunk-RFBLQLLZ.mjs';
|
|
50
52
|
import './chunk-L5ORED7V.mjs';
|
|
51
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
53
|
+
import { NarsilError, ErrorCodes } from './chunk-CZ7ISLXA.mjs';
|
|
52
54
|
import { decode } from '@msgpack/msgpack';
|
|
53
55
|
|
|
54
56
|
// src/persistence/archive/validate.ts
|
|
@@ -310,7 +312,15 @@ function prepareRestoredIndex(configuration, deps, reject) {
|
|
|
310
312
|
}
|
|
311
313
|
const storedRevision = typeof configuration.analysisRevision === "string" ? configuration.analysisRevision : null;
|
|
312
314
|
const synonyms = restoredSynonyms(configuration.synonyms, config, language, reject ?? rejectSnapshot);
|
|
313
|
-
return {
|
|
315
|
+
return {
|
|
316
|
+
config,
|
|
317
|
+
language,
|
|
318
|
+
embeddingAdapter,
|
|
319
|
+
adapterName,
|
|
320
|
+
storedRevision,
|
|
321
|
+
storedArrayPositionGap: storedArrayPositionGap(configuration.arrayPositionGap),
|
|
322
|
+
synonyms
|
|
323
|
+
};
|
|
314
324
|
}
|
|
315
325
|
function restoredSynonyms(raw, config, language, reject) {
|
|
316
326
|
if (raw === void 0 || raw === null) return null;
|
|
@@ -341,6 +351,7 @@ function restoredRegistryEntry(prepared, manager, deps) {
|
|
|
341
351
|
documentCount: manager.countDocuments(),
|
|
342
352
|
partitionCount: manager.partitionCount,
|
|
343
353
|
analysisRevision: prepared.storedRevision,
|
|
354
|
+
arrayPositionGap: prepared.storedArrayPositionGap,
|
|
344
355
|
synonyms: prepared.synonyms?.encoded ?? null
|
|
345
356
|
};
|
|
346
357
|
}
|
|
@@ -423,7 +434,7 @@ function activate(indexName, restored, entry, deps) {
|
|
|
423
434
|
restored.detached.attach();
|
|
424
435
|
deps.clearAnalysisStale(indexName);
|
|
425
436
|
const { prepared } = restored;
|
|
426
|
-
if (prepared.storedRevision !== prepared.language.revision) {
|
|
437
|
+
if (prepared.storedRevision !== prepared.language.revision || arrayPositionsAreStale(prepared.config, prepared.storedArrayPositionGap)) {
|
|
427
438
|
deps.markAnalysisStale({
|
|
428
439
|
indexName,
|
|
429
440
|
language: prepared.language.name,
|
|
@@ -708,7 +719,11 @@ async function restoreEarlierSnapshot(indexName, data, deps) {
|
|
|
708
719
|
const prepared = prepareRestoredIndex(envelope, deps);
|
|
709
720
|
const replacesIndex = deps.indexRegistry.has(indexName);
|
|
710
721
|
requireRestoreMemory(indexName, footprintOf(envelope, prepared, replacesIndex), replacesIndex);
|
|
711
|
-
const analysedNow = {
|
|
722
|
+
const analysedNow = {
|
|
723
|
+
...prepared,
|
|
724
|
+
storedRevision: prepared.language.revision,
|
|
725
|
+
storedArrayPositionGap: ARRAY_POSITION_GAP
|
|
726
|
+
};
|
|
712
727
|
const staging = deps.durability?.manager.stageRestore?.(indexName) ?? null;
|
|
713
728
|
try {
|
|
714
729
|
await installRestoredIndex(
|
package/dist/synonyms.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { synonymSearchModule } from './chunk-
|
|
1
|
+
import { synonymSearchModule } from './chunk-6SSVIW7Y.mjs';
|
|
2
2
|
import './chunk-X5CV2E2B.mjs';
|
|
3
3
|
import './chunk-7X5JST5L.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-D5TFRB5G.mjs';
|
|
5
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
5
6
|
import './chunk-R6A773WK.mjs';
|
|
6
7
|
import './chunk-YTJCGKM4.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
+
import './chunk-CZ7ISLXA.mjs';
|
|
8
9
|
|
|
9
10
|
// src/synonyms/index.ts
|
|
10
11
|
var synonyms = synonymSearchModule;
|