@delali/narsil 0.3.1-next.144 → 0.3.1-next.145
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.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +101 -13
- package/dist/adapters/gcs.d.ts +49 -0
- package/dist/adapters/gcs.mjs +213 -0
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +2 -7
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.mjs +5 -0
- package/dist/adapters/s3.d.ts +53 -0
- package/dist/adapters/s3.mjs +263 -0
- package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
- package/dist/{analysis-change-HQUT2Z3I.mjs → analysis-change-D5APH4Z3.mjs} +24 -33
- package/dist/{browser/analysis-change-entry-7HR4LWL3.mjs → analysis-change-entry-V4SQQSXQ.mjs} +1 -1
- package/dist/browser/{analysis-change-JPV775LR.mjs → analysis-change-QTCQ5ETU.mjs} +5 -5
- package/dist/{analysis-change-entry-TZTG4AZB.mjs → browser/analysis-change-entry-KYEQSP3I.mjs} +1 -1
- package/dist/{chunk-46NZOPHS.mjs → browser/chunk-5WYWLTM5.mjs} +2 -2
- package/dist/browser/{chunk-ZEV26AQ6.mjs → chunk-6OFS7RUN.mjs} +1 -1
- package/dist/browser/{chunk-MZI3TEOW.mjs → chunk-75PMIFQA.mjs} +1 -1
- package/dist/browser/{chunk-R4WUDZQV.mjs → chunk-AOKLYVTT.mjs} +2 -2
- package/dist/browser/{chunk-LVY2LI35.mjs → chunk-BTMRV5MY.mjs} +2 -2
- package/dist/browser/{chunk-3ZBJYAS4.mjs → chunk-FHO5N7FD.mjs} +1 -1
- package/dist/browser/{chunk-KTOK275N.mjs → chunk-FXPMF65P.mjs} +12 -12
- package/dist/browser/{chunk-VFYMPCOV.mjs → chunk-GP4QLUQM.mjs} +5 -5
- package/dist/browser/{chunk-35B42UFM.mjs → chunk-IFGTRRPU.mjs} +9 -0
- package/dist/browser/{chunk-6RHTAVZX.mjs → chunk-K7UFXEJS.mjs} +31 -14
- package/dist/browser/{chunk-MVM33ZUL.mjs → chunk-LGJ6XMH5.mjs} +5 -5
- package/dist/{chunk-NN33CZRE.mjs → browser/chunk-PMBSBSCN.mjs} +2 -2
- package/dist/browser/{chunk-D33A5VMU.mjs → chunk-QNDWMPV2.mjs} +1 -1
- package/dist/browser/{chunk-HKX2G6WH.mjs → chunk-U77XQJOY.mjs} +3 -3
- package/dist/browser/{chunk-TCLEOZ4P.mjs → chunk-XIHLIMFX.mjs} +2 -2
- package/dist/browser/{chunk-WCFCHIBB.mjs → chunk-XWMEGKDC.mjs} +2 -2
- package/dist/browser/{chunk-5DB2VDGI.mjs → chunk-ZALEKEUH.mjs} +27 -27
- package/dist/browser/{chunk-MWUK3DA5.mjs → chunk-ZKVDQ5ZH.mjs} +8 -8
- package/dist/browser/{cold-module-MJMKNUYJ.mjs → cold-module-Y2IJAP7S.mjs} +14 -14
- package/dist/browser/{durability-wiring-SNOWIT6Z.mjs → durability-wiring-MLXZ5QQF.mjs} +78 -61
- package/dist/browser/import-FTMLTPGQ.mjs +9 -0
- package/dist/browser/{module-BUFNZMEU.mjs → module-5LMDGXQH.mjs} +10 -10
- package/dist/browser/{module-BVP4TKZU.mjs → module-Q6VFGLMG.mjs} +71 -11
- package/dist/browser/{phrase-module-HGVBO24W.mjs → phrase-module-KXNRTWCS.mjs} +1 -1
- package/dist/{restore-queue-FEYAC4SB.mjs → browser/restore-queue-SOAHKZSQ.mjs} +2 -2
- package/dist/browser/{runtime-VEUH674B.mjs → runtime-ZNEGK33G.mjs} +2 -2
- package/dist/browser/{snapshot-QXBKHJAG.mjs → snapshot-2EGS2FYU.mjs} +16 -15
- package/dist/browser/{write-WHFBDWQS.mjs → write-WMZA6NSF.mjs} +11 -11
- package/dist/{capabilities-BCdUwK_L.d.ts → capabilities-CNnzGtqP.d.ts} +3 -3
- package/dist/{chunk-ZMBFWQXN.mjs → chunk-2E2ZFOPT.mjs} +2 -2
- package/dist/{chunk-BOJZGUS6.mjs → chunk-5K2JHKM3.mjs} +1 -1
- package/dist/{chunk-YH5OIL7B.mjs → chunk-5QMHMELB.mjs} +6 -1
- package/dist/{browser/chunk-CCOAOO73.mjs → chunk-6FOJKNUR.mjs} +2 -2
- package/dist/{chunk-GLZHNSGB.mjs → chunk-6Z22L5RN.mjs} +1 -1
- package/dist/{chunk-AST3SHFA.mjs → chunk-7523VCM4.mjs} +2 -2
- package/dist/{chunk-KZL72VTC.mjs → chunk-7AJAW6NN.mjs} +11 -10
- package/dist/{chunk-DQNKVOJ2.mjs → chunk-BTARFTEN.mjs} +695 -8
- package/dist/{chunk-YLNSJQLX.mjs → chunk-DHEJAGVW.mjs} +5 -5
- package/dist/{chunk-Z4HFMYNX.mjs → chunk-DKMZ7JFW.mjs} +29 -12
- package/dist/{chunk-NRUXBYPH.mjs → chunk-F442VZUL.mjs} +5 -5
- package/dist/{chunk-O4LJQI4G.mjs → chunk-FRJ5RGX7.mjs} +126 -4
- package/dist/{chunk-L76W3IZJ.mjs → chunk-FTQLF5JI.mjs} +1 -1
- package/dist/{chunk-UIKN2OTQ.mjs → chunk-G6Q5DEF5.mjs} +37 -3
- package/dist/{chunk-DD2673TX.mjs → chunk-GRFXSEFF.mjs} +2 -2
- package/dist/{chunk-ZSWHPKGM.mjs → chunk-GVPYMSLO.mjs} +69 -2
- package/dist/{chunk-VEFN6X6Q.mjs → chunk-HOC5JP2H.mjs} +9 -10
- package/dist/{chunk-SRJBFG2T.mjs → chunk-HTMUGEFU.mjs} +6 -7
- package/dist/{chunk-J6YVB2XM.mjs → chunk-IJPK5PGM.mjs} +1 -1
- package/dist/{chunk-HNHCNTVG.mjs → chunk-IQHZMCLX.mjs} +9 -0
- package/dist/{chunk-C3YDYX6C.mjs → chunk-ISUOSACK.mjs} +1 -1
- package/dist/{chunk-YHUTF6EA.mjs → chunk-IV2XTSS2.mjs} +14 -14
- package/dist/chunk-K5HSUPYS.mjs +11 -0
- package/dist/{chunk-LA4WNDHL.mjs → chunk-KG5N7LE6.mjs} +12 -14
- package/dist/{chunk-NPNK57CA.mjs → chunk-LWFK3TC2.mjs} +1 -1
- package/dist/{chunk-RKAVHNRW.mjs → chunk-LYKUJNAV.mjs} +10 -5
- package/dist/{chunk-TNBIK2LQ.mjs → chunk-MJTEU2XK.mjs} +3 -4
- package/dist/chunk-NWTEJ2T7.mjs +100 -0
- package/dist/{chunk-WJGO5PGV.mjs → chunk-OH7SX5MY.mjs} +28 -16
- package/dist/{chunk-W2COJ5AH.mjs → chunk-ONDEEBTA.mjs} +2 -2
- package/dist/{chunk-PWIWSUCX.mjs → chunk-POUYICOU.mjs} +1 -1
- package/dist/chunk-PRID7CA6.mjs +104 -0
- package/dist/{chunk-ICW45TTU.mjs → chunk-QLDLQW36.mjs} +1 -1
- package/dist/{chunk-KEIYVZUX.mjs → chunk-QU2XF7VI.mjs} +3 -4
- package/dist/{chunk-74XB2SXI.mjs → chunk-QXH2CS4V.mjs} +35 -2
- package/dist/{chunk-ZPWS2SKJ.mjs → chunk-QYMAYU7M.mjs} +165 -11
- package/dist/{chunk-NJJCPFXN.mjs → chunk-RNUP6WZ6.mjs} +2 -2
- package/dist/{chunk-SBMAWTRG.mjs → chunk-RTVAWNUL.mjs} +80 -14
- package/dist/{chunk-7AUASRE7.mjs → chunk-RVBUQITB.mjs} +7 -7
- package/dist/{chunk-VJEGOELZ.mjs → chunk-SA52N7G3.mjs} +3 -3
- package/dist/{chunk-NOT5QOHU.mjs → chunk-SE7MKJVK.mjs} +1 -1
- package/dist/{chunk-BRUUBXCB.mjs → chunk-SNB4DYL3.mjs} +10 -38
- package/dist/chunk-SVO6NV4D.mjs +248 -0
- package/dist/{chunk-GWOS5DYC.mjs → chunk-UGQULMSU.mjs} +11 -13
- package/dist/{chunk-6SNBQESJ.mjs → chunk-UHVTEVF5.mjs} +5 -5
- package/dist/{chunk-HJJWY6PT.mjs → chunk-UQS5PAS5.mjs} +1 -1
- package/dist/{chunk-UUZCQQG2.mjs → chunk-W6M4RRAT.mjs} +3 -3
- package/dist/{browser/chunk-XNWPP5NS.mjs → chunk-WDEWU46C.mjs} +2 -2
- package/dist/{chunk-XZ3SRNDJ.mjs → chunk-WMIV7PJ7.mjs} +65 -5
- package/dist/{chunk-RHKRTYGO.mjs → chunk-X5SBWARI.mjs} +3 -3
- package/dist/{chunk-XS2VM7UE.mjs → chunk-XLAI4OIO.mjs} +2 -2
- package/dist/{chunk-IO5F7ZBE.mjs → chunk-YUCGFPMS.mjs} +454 -37
- package/dist/{client-B12YFALP.d.ts → client-DoYPHcUn.d.ts} +62 -5
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +44 -0
- package/dist/{cold-module-4X7WJCFM.mjs → cold-module-NUD332YD.mjs} +32 -41
- package/dist/{config-CIG5yDyg.d.ts → config-CuUfls_H.d.ts} +150 -3
- package/dist/{config-BhZxIeb1.d.ts → config-Dzs46im6.d.ts} +11 -2
- package/dist/direct-executor-FDQYQEJQ.mjs +22 -0
- package/dist/distribution/coordinator/etcd.d.ts +3 -3
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +16219 -14535
- package/dist/{durability-wiring-324D2DDD.mjs → durability-wiring-K7RDXWL6.mjs} +103 -95
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CtzbHOmG.d.ts → engine-C0ifUEcm.d.ts} +3 -3
- package/dist/import-6KXFY6XI.mjs +35 -0
- package/dist/{index-DsEurhSl.d.ts → index-MsF7e5hL.d.ts} +2 -2
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +21 -30
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/{long-query-thread-4SW7RWDE.mjs → long-query-thread-FKVHRCHF.mjs} +18 -23
- package/dist/{module-DXSJ5LT2.mjs → module-GJUKW5VU.mjs} +14 -16
- package/dist/{module-IYPLWHGC.mjs → module-TMFIWOD2.mjs} +28 -37
- package/dist/{paged-partition-archive-HFP45PLU.mjs → paged-partition-archive-WNUEMYWM.mjs} +34 -39
- package/dist/partial-words.mjs +7 -9
- package/dist/pattern.mjs +4 -6
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +27 -36
- package/dist/{phrase-module-5QHBD2VJ.mjs → phrase-module-OMY3QQV7.mjs} +1 -1
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +9 -0
- package/dist/{rerank-KTLC3E6N.mjs → rerank-ZZ5CHKLW.mjs} +4 -4
- package/dist/rerankers/http.d.ts +1 -1
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{browser/restore-queue-ONYNYUDE.mjs → restore-queue-UAVGBSJG.mjs} +2 -2
- package/dist/{runtime-DYV75DCB.mjs → runtime-RAOCKSYA.mjs} +5 -5
- package/dist/{schema-B-Runv0n.d.ts → schema-D33CyXCy.d.ts} +1 -1
- package/dist/server.d.ts +24 -12
- package/dist/server.mjs +153 -36
- package/dist/{snapshot-CGM65VCD.mjs → snapshot-DB5ZVCDN.mjs} +39 -48
- package/dist/synonyms.mjs +3 -4
- package/dist/{tasks-CjRJRGTb.d.ts → tasks-ChWp0wrF.d.ts} +59 -7
- package/dist/{thread-KGNAIKPD.mjs → thread-OV6T555H.mjs} +17 -22
- package/dist/vector/search-worker.d.ts +2 -2
- package/dist/vector/search-worker.mjs +5 -6
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-2DZPEQL2.mjs → write-KZVTLGCI.mjs} +28 -37
- package/openapi.json +349 -2
- package/package.json +27 -8
- package/dist/browser/import-TLB2A5LJ.mjs +0 -9
- package/dist/chunk-5WYVUPGD.mjs +0 -427
- package/dist/chunk-AV4IJKD2.mjs +0 -35
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-KGOXHLLZ.mjs +0 -693
- package/dist/chunk-N37VMC62.mjs +0 -18
- package/dist/chunk-QSK35UC2.mjs +0 -35
- package/dist/chunk-WNBRW4Q2.mjs +0 -128
- package/dist/chunk-WQBCBKY3.mjs +0 -8
- package/dist/chunk-ZATRDAYU.mjs +0 -160
- package/dist/direct-executor-7XOQ7VQP.mjs +0 -28
- package/dist/import-OOBUW3RR.mjs +0 -44
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { P as PartitionConfig, B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions } from './schema-
|
|
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-
|
|
1
|
+
import { P as PartitionConfig, B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions } from './schema-D33CyXCy.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-Dzs46im6.js';
|
|
3
3
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.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-
|
|
4
|
+
import { f as TaskRecord, a as ChangeAnalysisBody, M as MemoryStatsResponse, R as RestoreBackupBody, c as ImportResult, H as HttpIndexConfig, d as TaskListQuery, T as TaskListPage } from './tasks-ChWp0wrF.js';
|
|
5
|
+
import { B as BackupListing } from './config-CuUfls_H.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* This is the `fetch` implementation the client sends every request through.
|
|
@@ -365,6 +366,62 @@ interface AdminOperations {
|
|
|
365
366
|
getMemoryStats(options?: RequestOptions): Promise<MemoryStatsResponse>;
|
|
366
367
|
}
|
|
367
368
|
|
|
369
|
+
/**
|
|
370
|
+
* These methods back up an index to the store outside the cluster, list and delete the backups there, and restore one
|
|
371
|
+
* as a new index. A server that fronts a cluster node with a backup store answers them.
|
|
372
|
+
*
|
|
373
|
+
* Each method except {@link BackupOperations.listBackups} answers with a {@link TaskRecord} while the work continues,
|
|
374
|
+
* and the task's `steps` report how many partitions, or how many files for a deletion, are done. Follow that task with
|
|
375
|
+
* {@link TaskOperations.waitForTask}.
|
|
376
|
+
*
|
|
377
|
+
* @public
|
|
378
|
+
*/
|
|
379
|
+
interface BackupOperations {
|
|
380
|
+
/**
|
|
381
|
+
* Starts a backup of an index, which holds every write that the cluster acknowledged before the backup started.
|
|
382
|
+
*
|
|
383
|
+
* @param indexName - This names the index to back up.
|
|
384
|
+
* @param backupName - This names the backup, with 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a
|
|
385
|
+
* letter or a digit.
|
|
386
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
387
|
+
* @returns The record is the task to follow.
|
|
388
|
+
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
389
|
+
* reports `BACKUP_ALREADY_EXISTS` or `BACKUP_DURABILITY_REQUIRED` in its `error`.
|
|
390
|
+
*/
|
|
391
|
+
createBackup(indexName: string, backupName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
392
|
+
/**
|
|
393
|
+
* Lists the backups under the cluster's key prefix, in name order.
|
|
394
|
+
*
|
|
395
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
396
|
+
* @returns One summary per backup, and a {@link DamagedBackup} with `BACKUP_DAMAGED` for each manifest that the
|
|
397
|
+
* cluster can't read.
|
|
398
|
+
*/
|
|
399
|
+
listBackups(options?: RequestOptions): Promise<BackupListing[]>;
|
|
400
|
+
/**
|
|
401
|
+
* Starts the restore of a backup as a new index, on a cluster of any size.
|
|
402
|
+
*
|
|
403
|
+
* @param backupName - This names the backup to restore.
|
|
404
|
+
* @param restore - This names the new index, and it can set the replication factor and the allocation constraints in
|
|
405
|
+
* place of the backup's.
|
|
406
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
407
|
+
* @returns The record is the task to follow.
|
|
408
|
+
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
409
|
+
* reports `BACKUP_NOT_FOUND`, `BACKUP_DAMAGED`, or `INDEX_ALREADY_EXISTS` in its `error`, and a failed restore
|
|
410
|
+
* creates no index.
|
|
411
|
+
*/
|
|
412
|
+
restoreBackup(backupName: string, restore: RestoreBackupBody, options?: RequestOptions): Promise<TaskRecord>;
|
|
413
|
+
/**
|
|
414
|
+
* Starts the deletion of a backup, which also removes each of its files that no other backup lists.
|
|
415
|
+
*
|
|
416
|
+
* @param backupName - This names the backup to delete.
|
|
417
|
+
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
418
|
+
* @returns The record is the task to follow.
|
|
419
|
+
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
420
|
+
* reports `BACKUP_NOT_FOUND` in its `error`.
|
|
421
|
+
*/
|
|
422
|
+
deleteBackup(backupName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
423
|
+
}
|
|
424
|
+
|
|
368
425
|
/**
|
|
369
426
|
* This is a corpus, in whichever form you already hold it.
|
|
370
427
|
*
|
|
@@ -986,7 +1043,7 @@ interface TaskOperations {
|
|
|
986
1043
|
*
|
|
987
1044
|
* @public
|
|
988
1045
|
*/
|
|
989
|
-
interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, ServerOperations {
|
|
1046
|
+
interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, BackupOperations, ServerOperations {
|
|
990
1047
|
}
|
|
991
1048
|
/**
|
|
992
1049
|
* Builds a client for one Narsil server, or for a list of them that it moves
|
|
@@ -1007,4 +1064,4 @@ interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperatio
|
|
|
1007
1064
|
*/
|
|
1008
1065
|
declare function createNarsilClient(options: NarsilClientOptions): NarsilClient;
|
|
1009
1066
|
|
|
1010
|
-
export { type AdminOperations as A, type
|
|
1067
|
+
export { type AdminOperations as A, type BackupOperations as B, type DocumentOperations as D, type FetchFunction as F, type ImportSource as I, type NarsilClient as N, type PutResult as P, type RequestOptions as R, type SearchOperations as S, type TaskOperations as T, type WaitForTaskOptions as W, type BulkOperations as a, type IndexOperations as b, type NarsilClientOptions as c, type ServerOperations as d, type ServerVersion as e, createNarsilClient as f };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
import './
|
|
1
|
+
export { B as BackupListing, a as BackupSummary, D as DamagedBackup } from './config-CuUfls_H.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-Dzs46im6.js';
|
|
3
|
+
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-CNnzGtqP.js';
|
|
4
|
+
export { B as BackupListResponse, C as CapabilitiesResponse, a as ChangeAnalysisBody, b as CreateIndexEmbedding, E as ErrorDetail, H as HttpIndexConfig, I as ImportError, c as ImportResult, M as MemoryStatsResponse, R as RestoreBackupBody, T as TaskListPage, d as TaskListQuery, e as TaskProgress, f as TaskRecord, g as TaskStatus, h as TaskStepProgress, i as TaskType } from './tasks-ChWp0wrF.js';
|
|
5
|
+
export { A as AdminOperations, B as BackupOperations, a as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, b as IndexOperations, N as NarsilClient, c as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, d as ServerOperations, e as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, f as createNarsilClient } from './client-DoYPHcUn.js';
|
|
6
|
+
import './adapters-pljAqmrC.js';
|
|
7
|
+
import './index-MsF7e5hL.js';
|
|
8
|
+
import './schema-D33CyXCy.js';
|
|
7
9
|
import './synonyms-CpOAHPa-.js';
|
|
8
|
-
import './config-CIG5yDyg.js';
|
|
9
|
-
import './index-DsEurhSl.js';
|
|
10
10
|
import './types-DvncmvuQ.js';
|
package/dist/client.mjs
CHANGED
|
@@ -25,6 +25,15 @@ var ErrorCodes = {
|
|
|
25
25
|
PERSISTENCE_CRC_MISMATCH: "PERSISTENCE_CRC_MISMATCH",
|
|
26
26
|
PERSISTENCE_WAL_CORRUPT: "PERSISTENCE_WAL_CORRUPT",
|
|
27
27
|
PERSISTENCE_FSYNC_FAILED: "PERSISTENCE_FSYNC_FAILED",
|
|
28
|
+
PERSISTENCE_DEPENDENCY_MISSING: "PERSISTENCE_DEPENDENCY_MISSING",
|
|
29
|
+
BACKUP_NOT_FOUND: "BACKUP_NOT_FOUND",
|
|
30
|
+
BACKUP_ALREADY_EXISTS: "BACKUP_ALREADY_EXISTS",
|
|
31
|
+
BACKUP_DAMAGED: "BACKUP_DAMAGED",
|
|
32
|
+
BACKUP_DURABILITY_REQUIRED: "BACKUP_DURABILITY_REQUIRED",
|
|
33
|
+
BACKUP_IN_PROGRESS: "BACKUP_IN_PROGRESS",
|
|
34
|
+
BACKUP_STORE_CLAIMED: "BACKUP_STORE_CLAIMED",
|
|
35
|
+
BACKUP_STORE_NOT_CONFIGURED: "BACKUP_STORE_NOT_CONFIGURED",
|
|
36
|
+
BACKUP_NOT_READY: "BACKUP_NOT_READY",
|
|
28
37
|
SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
|
|
29
38
|
VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
|
|
30
39
|
SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
|
|
@@ -212,6 +221,9 @@ function indexPath(indexName) {
|
|
|
212
221
|
function documentPath(indexName, docId) {
|
|
213
222
|
return `${indexPath(indexName)}/documents/${encodeURIComponent(docId)}`;
|
|
214
223
|
}
|
|
224
|
+
function backupPath(backupName) {
|
|
225
|
+
return `/backups/${encodeURIComponent(backupName)}`;
|
|
226
|
+
}
|
|
215
227
|
function taskPath(taskId) {
|
|
216
228
|
return `/tasks/${encodeURIComponent(taskId)}`;
|
|
217
229
|
}
|
|
@@ -360,6 +372,37 @@ function createAdminOperations(transport) {
|
|
|
360
372
|
};
|
|
361
373
|
}
|
|
362
374
|
|
|
375
|
+
// src/client/backups.ts
|
|
376
|
+
function createBackupOperations(transport) {
|
|
377
|
+
async function postTask(path, body, options) {
|
|
378
|
+
const payload = await transport.json({
|
|
379
|
+
method: "POST",
|
|
380
|
+
path,
|
|
381
|
+
body: encodeJson(body),
|
|
382
|
+
contentType: "application/json",
|
|
383
|
+
options
|
|
384
|
+
});
|
|
385
|
+
return readBody(payload, path);
|
|
386
|
+
}
|
|
387
|
+
return {
|
|
388
|
+
createBackup(indexName, backupName, options) {
|
|
389
|
+
return postTask(`${indexPath(indexName)}/backups`, { backup: backupName }, options);
|
|
390
|
+
},
|
|
391
|
+
async listBackups(options) {
|
|
392
|
+
const path = "/backups";
|
|
393
|
+
const payload = await transport.json({ method: "GET", path, defaultTimeoutMs: NO_TIMEOUT, options });
|
|
394
|
+
return readArray(payload, "backups", path);
|
|
395
|
+
},
|
|
396
|
+
restoreBackup(backupName, restore, options) {
|
|
397
|
+
return postTask(`${backupPath(backupName)}/_restore`, restore, options);
|
|
398
|
+
},
|
|
399
|
+
async deleteBackup(backupName, options) {
|
|
400
|
+
const path = backupPath(backupName);
|
|
401
|
+
return readBody(await transport.json({ method: "DELETE", path, options }), path);
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
|
|
363
406
|
// src/client/bulk.ts
|
|
364
407
|
function toNdjson(source) {
|
|
365
408
|
if (typeof source === "string") return source;
|
|
@@ -1070,6 +1113,7 @@ function createNarsilClient(options) {
|
|
|
1070
1113
|
...createSearchOperations(transport),
|
|
1071
1114
|
...createTaskOperations(transport),
|
|
1072
1115
|
...createAdminOperations(transport),
|
|
1116
|
+
...createBackupOperations(transport),
|
|
1073
1117
|
...createServerOperations(transport)
|
|
1074
1118
|
};
|
|
1075
1119
|
}
|
|
@@ -1,57 +1,48 @@
|
|
|
1
|
-
import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-
|
|
2
|
-
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import { loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-
|
|
6
|
-
import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-
|
|
1
|
+
import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-UGQULMSU.mjs';
|
|
2
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-UGQULMSU.mjs';
|
|
3
|
+
import './chunk-6FOJKNUR.mjs';
|
|
4
|
+
import './chunk-5K2JHKM3.mjs';
|
|
5
|
+
import { loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-ONDEEBTA.mjs';
|
|
6
|
+
import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-QLDLQW36.mjs';
|
|
7
7
|
import './chunk-FOCV4CBZ.mjs';
|
|
8
|
-
import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-
|
|
9
|
-
export { createHNSWIndex, osqBitsOf } from './chunk-
|
|
8
|
+
import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-MJTEU2XK.mjs';
|
|
9
|
+
export { createHNSWIndex, osqBitsOf } from './chunk-MJTEU2XK.mjs';
|
|
10
10
|
import { stageQueryLevels, readTrailer } from './chunk-37CD3OKS.mjs';
|
|
11
11
|
import './chunk-DJHHF2L5.mjs';
|
|
12
|
-
import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD } from './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import { HEADER_SIZE, crc32 } from './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-5WYVUPGD.mjs';
|
|
12
|
+
import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD } from './chunk-RVBUQITB.mjs';
|
|
13
|
+
import './chunk-QU2XF7VI.mjs';
|
|
14
|
+
import './chunk-W6M4RRAT.mjs';
|
|
15
|
+
import { HEADER_SIZE, crc32 } from './chunk-YUCGFPMS.mjs';
|
|
16
|
+
import './chunk-HOC5JP2H.mjs';
|
|
18
17
|
import './chunk-HJSN7UYG.mjs';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-AV4IJKD2.mjs';
|
|
18
|
+
import './chunk-G6Q5DEF5.mjs';
|
|
21
19
|
import './chunk-EEBCDP36.mjs';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
24
|
-
import './chunk-N37VMC62.mjs';
|
|
25
|
-
import './chunk-ZATRDAYU.mjs';
|
|
20
|
+
import './chunk-OH7SX5MY.mjs';
|
|
21
|
+
import './chunk-QYMAYU7M.mjs';
|
|
26
22
|
import './chunk-EBIHRL7B.mjs';
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-QSK35UC2.mjs';
|
|
29
|
-
import './chunk-74XB2SXI.mjs';
|
|
30
|
-
import './chunk-RKAVHNRW.mjs';
|
|
31
|
-
import './chunk-WQBCBKY3.mjs';
|
|
32
|
-
import './chunk-JUKYYXSP.mjs';
|
|
33
|
-
import './chunk-DQNKVOJ2.mjs';
|
|
34
|
-
import './chunk-KGOXHLLZ.mjs';
|
|
35
|
-
import './chunk-U476IXKQ.mjs';
|
|
36
|
-
import './chunk-FQBFZAWG.mjs';
|
|
37
|
-
import './chunk-VJS4JFBQ.mjs';
|
|
38
|
-
import './chunk-GES7U2PM.mjs';
|
|
39
|
-
import './chunk-ZSWHPKGM.mjs';
|
|
40
|
-
import './chunk-O4LJQI4G.mjs';
|
|
23
|
+
import './chunk-FRJ5RGX7.mjs';
|
|
41
24
|
import './chunk-X5CV2E2B.mjs';
|
|
42
|
-
import './chunk-WNBRW4Q2.mjs';
|
|
43
25
|
import './chunk-TGP5M5R7.mjs';
|
|
44
26
|
import './chunk-U2BKYEC7.mjs';
|
|
45
|
-
import './chunk-NPNK57CA.mjs';
|
|
46
|
-
import './chunk-4UMZ7KQL.mjs';
|
|
47
|
-
import './chunk-R6A773WK.mjs';
|
|
48
|
-
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
49
27
|
import './chunk-QHPYS427.mjs';
|
|
50
|
-
import './chunk-
|
|
28
|
+
import './chunk-6Z22L5RN.mjs';
|
|
51
29
|
import './chunk-22YPZVMG.mjs';
|
|
30
|
+
import './chunk-KOKM4PQN.mjs';
|
|
31
|
+
import './chunk-QXH2CS4V.mjs';
|
|
52
32
|
import './chunk-RFBLQLLZ.mjs';
|
|
33
|
+
import './chunk-LYKUJNAV.mjs';
|
|
34
|
+
import './chunk-JUKYYXSP.mjs';
|
|
35
|
+
import './chunk-BTARFTEN.mjs';
|
|
36
|
+
import './chunk-FQBFZAWG.mjs';
|
|
37
|
+
import './chunk-LWFK3TC2.mjs';
|
|
38
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
39
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
40
|
+
import './chunk-GVPYMSLO.mjs';
|
|
53
41
|
import './chunk-L5ORED7V.mjs';
|
|
54
|
-
import
|
|
42
|
+
import './chunk-U476IXKQ.mjs';
|
|
43
|
+
import { NarsilError, ErrorCodes } from './chunk-IQHZMCLX.mjs';
|
|
44
|
+
import './chunk-R6A773WK.mjs';
|
|
45
|
+
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
55
46
|
import { decode, decodeMulti } from '@msgpack/msgpack';
|
|
56
47
|
|
|
57
48
|
// src/persistence/paged/cold-search.ts
|
|
@@ -1,7 +1,103 @@
|
|
|
1
|
-
import { e as NarsilConfig } from './config-
|
|
2
|
-
import {
|
|
1
|
+
import { e as NarsilConfig } from './config-Dzs46im6.js';
|
|
2
|
+
import { P as PersistenceAdapter } from './adapters-pljAqmrC.js';
|
|
3
|
+
import { A as AllocationConstraints, a as AllocationTable, N as NodeRole, b as NodeRegistration, C as ClusterCoordinator, c as NodeCapacity } from './index-MsF7e5hL.js';
|
|
3
4
|
import { N as NodeTransport } from './types-DvncmvuQ.js';
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Where a cluster keeps its backups, which is a store outside the cluster.
|
|
8
|
+
*
|
|
9
|
+
* Give every node of the cluster the same settings, because the primary of each partition uploads that
|
|
10
|
+
* partition's files and the controller writes each backup's manifest.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
interface ClusterBackupConfig {
|
|
15
|
+
/** The store that holds the backups, such as the adapter from `@delali/narsil/adapters/s3`. */
|
|
16
|
+
store: PersistenceAdapter;
|
|
17
|
+
/**
|
|
18
|
+
* This cluster writes every backup under this key prefix, and it refuses to write under a prefix that another
|
|
19
|
+
* cluster has written to. Use segments of letters, digits, `.`, `_`, and `-`, joined by `/`.
|
|
20
|
+
*/
|
|
21
|
+
keyPrefix: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* What a cluster records about one backup.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
interface BackupSummary {
|
|
29
|
+
/** The name the backup was taken under. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** The index the backup holds. */
|
|
32
|
+
indexName: string;
|
|
33
|
+
/** The backup started at this many milliseconds since the epoch, and it holds every write acknowledged before then. */
|
|
34
|
+
startedAt: number;
|
|
35
|
+
/** The controller wrote the backup's manifest at this many milliseconds since the epoch. */
|
|
36
|
+
completedAt: number;
|
|
37
|
+
/** The index had this many partitions, and a restore creates the same number. */
|
|
38
|
+
partitionCount: number;
|
|
39
|
+
/** The index kept this many replicas of each partition, and a restore asks for the same number. */
|
|
40
|
+
replicationFactor: number;
|
|
41
|
+
/** The backup lists this many stored files, counting each partition's manifest and the index configuration. */
|
|
42
|
+
files: number;
|
|
43
|
+
/** The files the backup lists hold this many bytes in total, including files that other backups share. */
|
|
44
|
+
bytes: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* How far a backup, a restore, or a deletion has gone.
|
|
48
|
+
*
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
interface BackupProgress {
|
|
52
|
+
/** The operation has finished this many partitions, or this many files for a deletion. */
|
|
53
|
+
done: number;
|
|
54
|
+
/** The operation covers this many partitions, or this many files for a deletion, and 0 until it knows. */
|
|
55
|
+
total: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Options that every backup operation takes.
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
interface BackupOperationOptions {
|
|
63
|
+
/** Called whenever the operation reports more progress. */
|
|
64
|
+
onProgress?: (progress: BackupProgress) => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Where {@link ClusterNamespace.restoreBackup} puts a backup, and how the cluster places the restored copies.
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
interface RestoreBackupOptions extends BackupOperationOptions {
|
|
72
|
+
/** The restore creates the index under this name, and it fails where the name is taken. */
|
|
73
|
+
indexName: string;
|
|
74
|
+
/** The restored index keeps this many replicas of each partition, or the backup's number when you leave it out. */
|
|
75
|
+
replicationFactor?: number;
|
|
76
|
+
/** The rules that place the restored partitions, or the backup's rules when you leave them out. */
|
|
77
|
+
constraints?: AllocationConstraints;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A backup whose manifest the cluster can't read, which a listing shows in place of its summary.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
interface DamagedBackup {
|
|
85
|
+
/** The name that the manifest is stored under. */
|
|
86
|
+
name: string;
|
|
87
|
+
/** Why the manifest can't be read, with the code `BACKUP_DAMAGED`. */
|
|
88
|
+
error: {
|
|
89
|
+
code: string;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One entry of {@link ClusterNamespace.listBackups}: a summary, or a {@link DamagedBackup} where the manifest can't be
|
|
95
|
+
* read.
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
type BackupListing = BackupSummary | DamagedBackup;
|
|
100
|
+
|
|
5
101
|
/**
|
|
6
102
|
* How much replication history a primary keeps, and how many replicas have to
|
|
7
103
|
* confirm a write before it is acknowledged.
|
|
@@ -200,6 +296,11 @@ interface ClusterNodeConfig {
|
|
|
200
296
|
controller?: ClusterControllerConfig;
|
|
201
297
|
/** These settings govern when this node's memory blocks writes across the cluster, and anything you leave out keeps its default. */
|
|
202
298
|
memory?: ClusterMemoryConfig;
|
|
299
|
+
/**
|
|
300
|
+
* The store outside the cluster where this node writes and reads backups. A node without it refuses every backup
|
|
301
|
+
* call with `BACKUP_STORE_NOT_CONFIGURED`.
|
|
302
|
+
*/
|
|
303
|
+
backups?: ClusterBackupConfig;
|
|
203
304
|
/** This receives the failures the node reports while running on its own, away from any call you made. */
|
|
204
305
|
onError?: (error: Error) => void;
|
|
205
306
|
}
|
|
@@ -422,6 +523,52 @@ interface ClusterNamespace {
|
|
|
422
523
|
* @returns The figures as they stand when the call reads them.
|
|
423
524
|
*/
|
|
424
525
|
getMetrics(): Promise<ClusterMetrics>;
|
|
526
|
+
/**
|
|
527
|
+
* Backs up an index to the store in {@link ClusterNodeConfig.backups}, with every write acknowledged before the
|
|
528
|
+
* call starts.
|
|
529
|
+
*
|
|
530
|
+
* The primary of each partition writes a checkpoint and uploads each of its files that the store lacks, and the
|
|
531
|
+
* controller then writes the manifest that lists every file, so each backup restores without any other one.
|
|
532
|
+
*
|
|
533
|
+
* @param indexName - The index to back up.
|
|
534
|
+
* @param backupName - The backup's name, from 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a letter or
|
|
535
|
+
* a digit.
|
|
536
|
+
* @param options - A callback that receives the progress.
|
|
537
|
+
* @returns What the manifest records about the backup.
|
|
538
|
+
* @throws A `NarsilError` with `BACKUP_ALREADY_EXISTS` for a name that the store or a running backup holds,
|
|
539
|
+
* `BACKUP_DURABILITY_REQUIRED` where a primary runs without write-ahead log durability, `BACKUP_STORE_CLAIMED`
|
|
540
|
+
* where another cluster writes under the key prefix, `BACKUP_STORE_NOT_CONFIGURED` on a node without a store, and
|
|
541
|
+
* `BACKUP_NOT_READY` while a node of the cluster runs an earlier release.
|
|
542
|
+
*/
|
|
543
|
+
createBackup(indexName: string, backupName: string, options?: BackupOperationOptions): Promise<BackupSummary>;
|
|
544
|
+
/**
|
|
545
|
+
* Restores a backup as a new index, on a cluster of any size.
|
|
546
|
+
*
|
|
547
|
+
* Each primary checks the length and the SHA-256 digest of every file before it loads any of them, and the cluster
|
|
548
|
+
* creates no index when a check fails.
|
|
549
|
+
*
|
|
550
|
+
* @param backupName - The backup to restore.
|
|
551
|
+
* @param options - The name of the new index, its replication factor and placement rules, and a progress callback.
|
|
552
|
+
* @returns What the manifest records about the backup.
|
|
553
|
+
* @throws A `NarsilError` with `BACKUP_NOT_FOUND` where the store holds no such backup, `BACKUP_DAMAGED` where a
|
|
554
|
+
* file is missing or differs from the manifest, and `INDEX_ALREADY_EXISTS` where the name is taken.
|
|
555
|
+
*/
|
|
556
|
+
restoreBackup(backupName: string, options: RestoreBackupOptions): Promise<BackupSummary>;
|
|
557
|
+
/**
|
|
558
|
+
* Lists the backups under the cluster's key prefix, in name order.
|
|
559
|
+
*
|
|
560
|
+
* @returns One summary per backup, and a {@link DamagedBackup} for each manifest that the node can't read.
|
|
561
|
+
*/
|
|
562
|
+
listBackups(): Promise<BackupListing[]>;
|
|
563
|
+
/**
|
|
564
|
+
* Deletes a backup, along with each of its files that no other backup lists.
|
|
565
|
+
*
|
|
566
|
+
* @param backupName - The backup to delete.
|
|
567
|
+
* @param options - A callback that receives the progress.
|
|
568
|
+
* @returns A promise that settles once the controller has removed the manifest and those files.
|
|
569
|
+
* @throws A `NarsilError` with `BACKUP_NOT_FOUND` where the store holds no such backup.
|
|
570
|
+
*/
|
|
571
|
+
deleteBackup(backupName: string, options?: BackupOperationOptions): Promise<void>;
|
|
425
572
|
}
|
|
426
573
|
/**
|
|
427
574
|
* What one node reports about itself.
|
|
@@ -437,4 +584,4 @@ interface ClusterNodeInfo {
|
|
|
437
584
|
status: string;
|
|
438
585
|
}
|
|
439
586
|
|
|
440
|
-
export type { ClusterNamespace as C, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, VectorRebuildWaitFigure as V,
|
|
587
|
+
export type { BackupListing as B, ClusterNamespace as C, DamagedBackup as D, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, VectorRebuildWaitFigure as V, BackupSummary as a, ClusterNodeInfo as b, CreateIndexOptions as c, ClusterNodeConfig as d, BackupOperationOptions as e, BackupProgress as f, ClusterBackupConfig as g, ClusterControllerConfig as h, ClusterHealth as i, ClusterHealthStatus as j, ClusterMemoryConfig as k, ClusterMetrics as l, ClusterQueryConfig as m, CommitPointFigure as n, CoordinatorRequestFigure as o, ReplicationConfig as p, RestoreBackupOptions as q };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-
|
|
2
|
-
import { A as AnyDocument, S as SchemaDefinition, B as BM25Params, e as ScoringMode, a as IndexConfig } from './schema-
|
|
1
|
+
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
|
|
2
|
+
import { A as AnyDocument, S as SchemaDefinition, B as BM25Params, e as ScoringMode, a as IndexConfig } from './schema-D33CyXCy.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Every code a {@link NarsilError} carries, grouped by the part of the engine
|
|
@@ -36,6 +36,15 @@ declare const ErrorCodes: {
|
|
|
36
36
|
readonly PERSISTENCE_CRC_MISMATCH: "PERSISTENCE_CRC_MISMATCH";
|
|
37
37
|
readonly PERSISTENCE_WAL_CORRUPT: "PERSISTENCE_WAL_CORRUPT";
|
|
38
38
|
readonly PERSISTENCE_FSYNC_FAILED: "PERSISTENCE_FSYNC_FAILED";
|
|
39
|
+
readonly PERSISTENCE_DEPENDENCY_MISSING: "PERSISTENCE_DEPENDENCY_MISSING";
|
|
40
|
+
readonly BACKUP_NOT_FOUND: "BACKUP_NOT_FOUND";
|
|
41
|
+
readonly BACKUP_ALREADY_EXISTS: "BACKUP_ALREADY_EXISTS";
|
|
42
|
+
readonly BACKUP_DAMAGED: "BACKUP_DAMAGED";
|
|
43
|
+
readonly BACKUP_DURABILITY_REQUIRED: "BACKUP_DURABILITY_REQUIRED";
|
|
44
|
+
readonly BACKUP_IN_PROGRESS: "BACKUP_IN_PROGRESS";
|
|
45
|
+
readonly BACKUP_STORE_CLAIMED: "BACKUP_STORE_CLAIMED";
|
|
46
|
+
readonly BACKUP_STORE_NOT_CONFIGURED: "BACKUP_STORE_NOT_CONFIGURED";
|
|
47
|
+
readonly BACKUP_NOT_READY: "BACKUP_NOT_READY";
|
|
39
48
|
readonly SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD";
|
|
40
49
|
readonly VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH";
|
|
41
50
|
readonly SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { createDirectExecutor } from './chunk-OH7SX5MY.mjs';
|
|
2
|
+
import './chunk-QYMAYU7M.mjs';
|
|
3
|
+
import './chunk-EBIHRL7B.mjs';
|
|
4
|
+
import './chunk-FRJ5RGX7.mjs';
|
|
5
|
+
import './chunk-X5CV2E2B.mjs';
|
|
6
|
+
import './chunk-TGP5M5R7.mjs';
|
|
7
|
+
import './chunk-U2BKYEC7.mjs';
|
|
8
|
+
import './chunk-6Z22L5RN.mjs';
|
|
9
|
+
import './chunk-22YPZVMG.mjs';
|
|
10
|
+
import './chunk-LYKUJNAV.mjs';
|
|
11
|
+
import './chunk-JUKYYXSP.mjs';
|
|
12
|
+
import './chunk-BTARFTEN.mjs';
|
|
13
|
+
import './chunk-FQBFZAWG.mjs';
|
|
14
|
+
import './chunk-LWFK3TC2.mjs';
|
|
15
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
16
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
17
|
+
import './chunk-GVPYMSLO.mjs';
|
|
18
|
+
import './chunk-L5ORED7V.mjs';
|
|
19
|
+
import './chunk-U476IXKQ.mjs';
|
|
20
|
+
import './chunk-IQHZMCLX.mjs';
|
|
21
|
+
import './chunk-R6A773WK.mjs';
|
|
22
|
+
import './chunk-YTJCGKM4.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as ClusterCoordinator } from '../../index-
|
|
2
|
-
import '../../schema-
|
|
3
|
-
import '../../adapters-
|
|
1
|
+
import { C as ClusterCoordinator } from '../../index-MsF7e5hL.js';
|
|
2
|
+
import '../../schema-D33CyXCy.js';
|
|
3
|
+
import '../../adapters-pljAqmrC.js';
|
|
4
4
|
import '../../synonyms-CpOAHPa-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { INDEX_METADATA_KEY_PREFIX, indexNameOfMetadataSuffix } from '../../chunk-Q2AP2FSN.mjs';
|
|
2
2
|
import { MAX_NODE_ID_LENGTH, CONTROLLER_LEASE_KEY, MAX_WATCHERS } from '../../chunk-44W3CBNG.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes, describeError } from '../../chunk-IQHZMCLX.mjs';
|
|
3
4
|
import '../../chunk-R6A773WK.mjs';
|
|
4
5
|
import { compareCodePoints } from '../../chunk-YTJCGKM4.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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as ClusterCoordinator } from '../../index-
|
|
2
|
-
import '../../schema-
|
|
3
|
-
import '../../adapters-
|
|
1
|
+
import { C as ClusterCoordinator } from '../../index-MsF7e5hL.js';
|
|
2
|
+
import '../../schema-D33CyXCy.js';
|
|
3
|
+
import '../../adapters-pljAqmrC.js';
|
|
4
4
|
import '../../synonyms-CpOAHPa-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-
|
|
2
|
-
import { timeoutsOf, replyDeadlineMs } from '../../chunk-
|
|
1
|
+
import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-IJPK5PGM.mjs';
|
|
2
|
+
import { timeoutsOf, replyDeadlineMs } from '../../chunk-POUYICOU.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
|
-
import { TransportError, TransportErrorCodes } from '../../chunk-
|
|
5
|
-
import { NarsilError, ErrorCodes } from '../../chunk-
|
|
4
|
+
import { TransportError, TransportErrorCodes } from '../../chunk-5QMHMELB.mjs';
|
|
5
|
+
import { NarsilError, ErrorCodes } from '../../chunk-IQHZMCLX.mjs';
|
|
6
6
|
|
|
7
7
|
// src/distribution/transport/grpc/codec.ts
|
|
8
8
|
var FIELD_ONE_LENGTH_DELIMITED_KEY = 10;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { timeoutsOf, replyDeadlineMs } from '../../chunk-
|
|
1
|
+
import { timeoutsOf, replyDeadlineMs } from '../../chunk-POUYICOU.mjs';
|
|
2
2
|
import { MAX_MESSAGE_SIZE_BYTES } from '../../chunk-UNEEFTEU.mjs';
|
|
3
|
-
import { DEFAULT_TRANSPORT_CONFIG, TransportError, TransportErrorCodes } from '../../chunk-
|
|
3
|
+
import { DEFAULT_TRANSPORT_CONFIG, TransportError, TransportErrorCodes } from '../../chunk-5QMHMELB.mjs';
|
|
4
4
|
|
|
5
5
|
// src/distribution/transport/in-memory.ts
|
|
6
6
|
function createInMemoryNetwork() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_TCP_CONFIG, encodeTransportMessage, encodeFrame, FRAME_TYPE_REQUEST, FrameParser, FRAME_TYPE_RESPONSE, decodeTransportMessage, FRAME_TYPE_STREAM_CHUNK, FRAME_TYPE_STREAM_END } from '../../chunk-
|
|
2
|
-
import { timeoutsOf, replyDeadlineMs } from '../../chunk-
|
|
1
|
+
import { DEFAULT_TCP_CONFIG, encodeTransportMessage, encodeFrame, FRAME_TYPE_REQUEST, FrameParser, FRAME_TYPE_RESPONSE, decodeTransportMessage, FRAME_TYPE_STREAM_CHUNK, FRAME_TYPE_STREAM_END } from '../../chunk-IJPK5PGM.mjs';
|
|
2
|
+
import { timeoutsOf, replyDeadlineMs } from '../../chunk-POUYICOU.mjs';
|
|
3
3
|
import { MAX_MESSAGE_SIZE_BYTES } from '../../chunk-UNEEFTEU.mjs';
|
|
4
|
-
import { TransportError, TransportErrorCodes } from '../../chunk-
|
|
4
|
+
import { TransportError, TransportErrorCodes } from '../../chunk-5QMHMELB.mjs';
|
|
5
5
|
import { connect as connect$1, createServer as createServer$1 } from 'net';
|
|
6
6
|
import { connect, createServer } from 'tls';
|
|
7
7
|
|
package/dist/distribution.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { R as RerankAdapter } from './adapters-
|
|
4
|
-
import { A as AnalysisChange, N as Narsil } from './engine-
|
|
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-
|
|
6
|
-
import { B as BM25Params, a as IndexConfig, A as AnyDocument, I as InsertOptions } from './schema-
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
1
|
+
import { c as CreateIndexOptions, C as ClusterNamespace, d as ClusterNodeConfig } from './config-CuUfls_H.js';
|
|
2
|
+
export { B as BackupListing, e as BackupOperationOptions, f as BackupProgress, a as BackupSummary, g as ClusterBackupConfig, h as ClusterControllerConfig, i as ClusterHealth, j as ClusterHealthStatus, k as ClusterMemoryConfig, l as ClusterMetrics, b as ClusterNodeInfo, m as ClusterQueryConfig, n as CommitPointFigure, o as CoordinatorRequestFigure, D as DamagedBackup, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, p as ReplicationConfig, q as RestoreBackupOptions, V as VectorRebuildWaitFigure } from './config-CuUfls_H.js';
|
|
3
|
+
import { R as RerankAdapter } from './adapters-pljAqmrC.js';
|
|
4
|
+
import { A as AnalysisChange, N as Narsil } from './engine-C0ifUEcm.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-Dzs46im6.js';
|
|
6
|
+
import { B as BM25Params, a as IndexConfig, A as AnyDocument, I as InsertOptions } from './schema-D33CyXCy.js';
|
|
7
|
+
import { c as NodeCapacity, N as NodeRole } from './index-MsF7e5hL.js';
|
|
8
|
+
export { A as AllocationConstraints, e as AllocationEvent, a as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, f as IndexMetadataWatch, g as IndexPartitionBytes, h as NodeEvent, d as NodeMemoryReport, b as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-MsF7e5hL.js';
|
|
9
9
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.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
|
|