@delali/narsil 0.3.1-next.153 → 0.3.1-next.155
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/README.md +3 -1
- package/dist/adapters/filesystem.mjs +2 -2
- package/dist/adapters/gcs.mjs +2 -2
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/s3.mjs +2 -2
- package/dist/{analysis-change-2OYM7ARW.mjs → analysis-change-3TFIHT5E.mjs} +32 -23
- package/dist/{react-native/chunks/analysis-change-entry-CXNRW324.mjs → analysis-change-entry-KA6JAO4X.mjs} +1 -1
- package/dist/archive-history-E4R73RWD.mjs +29 -0
- package/dist/browser/{analysis-change-2V2HZ2NY.mjs → analysis-change-TC36BU47.mjs} +39 -10
- package/dist/{analysis-change-entry-QD7YNDEE.mjs → browser/analysis-change-entry-4MH3CZXH.mjs} +1 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
- package/dist/browser/chunk-23XRXIBW.mjs +85 -0
- package/dist/browser/chunk-3UIEB4QF.mjs +63 -0
- package/dist/browser/{chunk-CSCKZBVJ.mjs → chunk-4EWUGZYZ.mjs} +4 -4
- package/dist/browser/chunk-4WCVMOU3.mjs +151 -0
- package/dist/browser/{chunk-QJCO3TJU.mjs → chunk-56W3HQVJ.mjs} +9 -150
- package/dist/{react-native/chunks/chunk-VGUWIZFQ.mjs → browser/chunk-5TCXK5SB.mjs} +2 -2
- package/dist/browser/chunk-5W3MMTLG.mjs +19 -0
- package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
- package/dist/browser/chunk-A5KUEGDY.mjs +241 -0
- package/dist/browser/{chunk-HT7J73QL.mjs → chunk-ABCXENU5.mjs} +2 -2
- package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
- package/dist/browser/chunk-BXM5XOCA.mjs +315 -0
- package/dist/browser/chunk-CJSYBQ4J.mjs +100 -0
- package/dist/browser/chunk-DSXIBE6N.mjs +78 -0
- package/dist/browser/chunk-ELV4OZOI.mjs +29 -0
- package/dist/{react-native/chunks/chunk-QC4ZRBSX.mjs → browser/chunk-EXQZGUQH.mjs} +2 -79
- package/dist/browser/{chunk-2A2IPRC3.mjs → chunk-FNIFPFB7.mjs} +5 -31
- package/dist/browser/chunk-G64Q6OJF.mjs +96 -0
- package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
- package/dist/browser/chunk-IKDKX5VQ.mjs +1007 -0
- package/dist/browser/chunk-JIJXMI42.mjs +1829 -0
- package/dist/browser/chunk-JVBP5EYO.mjs +1106 -0
- package/dist/browser/{chunk-TQ5UMFG5.mjs → chunk-K4GCSZLI.mjs} +15 -6
- package/dist/browser/{chunk-PM4MUM5N.mjs → chunk-K5AXJBLL.mjs} +6 -5
- package/dist/browser/chunk-KKAMCABR.mjs +432 -0
- package/dist/browser/{chunk-IAXZAVYL.mjs → chunk-LFIWRCEA.mjs} +1 -159
- package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
- package/dist/browser/chunk-ML7THVLJ.mjs +38 -0
- package/dist/browser/chunk-NLWTBAGB.mjs +111 -0
- package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
- package/dist/browser/{chunk-MPK76GVS.mjs → chunk-RA6LSBCM.mjs} +1 -21
- package/dist/browser/{chunk-GJKXW3SF.mjs → chunk-RND5CLX3.mjs} +147 -253
- package/dist/{react-native/chunks/chunk-DFQJ4IJB.mjs → browser/chunk-RQBUNZQW.mjs} +2 -2
- package/dist/browser/{chunk-VD7JEUIR.mjs → chunk-RRO3EV4C.mjs} +9 -8
- package/dist/browser/{chunk-KWYQ6KX4.mjs → chunk-SMEQ36NT.mjs} +162 -2019
- package/dist/{chunk-MDF6PDIA.mjs → browser/chunk-SRMZXJSL.mjs} +8 -1
- package/dist/browser/{chunk-7ZJTRUVW.mjs → chunk-SUDNZKPL.mjs} +2 -2
- package/dist/browser/{chunk-LURXVCHG.mjs → chunk-U3JOQGWX.mjs} +1 -1
- package/dist/browser/chunk-VI7BQR4U.mjs +21 -0
- package/dist/browser/{chunk-B3JM6Z74.mjs → chunk-XY4VVBBO.mjs} +3 -2
- package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
- package/dist/browser/chunk-ZI2V4VD7.mjs +21 -0
- package/dist/browser/{cold-module-YECAK4MN.mjs → cold-module-NEUGHUPA.mjs} +21 -14
- package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
- package/dist/browser/{durability-wiring-LM7WFL6X.mjs → durability-wiring-CVGPRO6D.mjs} +1299 -881
- package/dist/browser/engine-hooks-YXMPHZKZ.mjs +16 -0
- package/dist/browser/import-OM6QAW45.mjs +18 -0
- package/dist/browser/methods-KTQCSIN4.mjs +30 -0
- package/dist/browser/{module-XQLEOYNM.mjs → module-3HNFCBJ5.mjs} +10 -8
- package/dist/browser/{module-KAMRAJLE.mjs → module-E33X4AOK.mjs} +17 -10
- package/dist/browser/operations-OJ3BXS55.mjs +5 -0
- package/dist/browser/{phrase-module-CNKMUY4U.mjs → phrase-module-ZXXU7S3B.mjs} +1 -1
- package/dist/browser/{pool-DTYSPBMQ.mjs → pool-3JLET5RO.mjs} +3 -2
- package/dist/browser/restore-hooks-IF2ZROUP.mjs +113 -0
- package/dist/browser/restore-queue-ZBS7CJA6.mjs +55 -0
- package/dist/browser/retention-ASWUHAYI.mjs +209 -0
- package/dist/browser/{runtime-D2ULZGCN.mjs → runtime-OTAGEFQW.mjs} +1 -1
- package/dist/browser/{snapshot-UGZVMP4H.mjs → snapshot-PN7ZW6Q4.mjs} +80 -315
- package/dist/browser/start-ZIRB7MQ2.mjs +24 -0
- package/dist/browser/sync-state-P5XG6LTQ.mjs +15 -0
- package/dist/browser/{write-I5P5MW4O.mjs → write-HMDYCTV2.mjs} +17 -11
- package/dist/{capabilities-BT-HLDC8.d.ts → capabilities-Da4ywVVl.d.ts} +94 -7
- package/dist/{chunk-LDGGR7YT.mjs → chunk-2MANFZJ3.mjs} +2 -2
- package/dist/{chunk-IZT3G24Q.mjs → chunk-2NE7VCYE.mjs} +2 -2
- package/dist/{chunk-3TVDTACC.mjs → chunk-3C7MTCCI.mjs} +1 -1
- package/dist/chunk-3HB3PEC6.mjs +240 -0
- package/dist/chunk-3HHQLEEQ.mjs +1092 -0
- package/dist/chunk-3OH67G7R.mjs +214 -0
- package/dist/{chunk-ZS6CMXAE.mjs → chunk-3R4UZWQG.mjs} +98 -250
- package/dist/{chunk-65WCV5JO.mjs → chunk-4BYWRYPM.mjs} +1 -1
- package/dist/{chunk-SOUZMPME.mjs → chunk-4KRC2APY.mjs} +7 -194
- package/dist/{chunk-5QMHMELB.mjs → chunk-5FLRXF73.mjs} +8 -1
- package/dist/chunk-5FVU47TB.mjs +20 -0
- package/dist/chunk-5YNRKI2C.mjs +81 -0
- package/dist/chunk-6L3XJXGU.mjs +470 -0
- package/dist/chunk-6MSZ543Y.mjs +32 -0
- package/dist/{chunk-T4CJDBBE.mjs → chunk-6OEGXLBX.mjs} +1 -1
- package/dist/{chunk-3SBJVQLL.mjs → chunk-6RC4K46J.mjs} +2 -2
- package/dist/chunk-7GXJUJ24.mjs +49 -0
- package/dist/{chunk-FNBNZCGP.mjs → chunk-AILVAOLX.mjs} +2 -2
- package/dist/chunk-BDRIVYOK.mjs +72 -0
- package/dist/chunk-BUMREPLU.mjs +15 -0
- package/dist/chunk-BY6ZDGYS.mjs +50 -0
- package/dist/{chunk-5WB2A3XU.mjs → chunk-DCNKVEDB.mjs} +511 -27
- package/dist/{chunk-NITCPDFL.mjs → chunk-DIBHI6W5.mjs} +2 -2
- package/dist/{chunk-4QCSHLNM.mjs → chunk-DUOLGBTE.mjs} +3 -3
- package/dist/chunk-GES7U2PM.mjs +68 -0
- package/dist/chunk-GH4WQ22V.mjs +34 -0
- package/dist/chunk-GQPTDQCL.mjs +54 -0
- package/dist/chunk-H4KHPLHJ.mjs +382 -0
- package/dist/{chunk-7TE2AJIH.mjs → chunk-H6VIGE62.mjs} +13 -10
- package/dist/{chunk-J7M73VY7.mjs → chunk-HJJI72X7.mjs} +1 -1
- package/dist/{chunk-DGRM4EZZ.mjs → chunk-HNVVEQP7.mjs} +1 -1
- package/dist/{chunk-RBEHLIKX.mjs → chunk-HW5TNXBO.mjs} +35 -11
- package/dist/{chunk-KYVRZAYP.mjs → chunk-I54T6CQP.mjs} +2 -69
- package/dist/{chunk-IRWP524D.mjs → chunk-INJYO3BU.mjs} +1 -1
- package/dist/chunk-IPN7S4KX.mjs +130 -0
- package/dist/{chunk-CSHHU7PA.mjs → chunk-J4IWBIVY.mjs} +11 -30
- package/dist/{chunk-G5KHSM6E.mjs → chunk-K4ZIGL2O.mjs} +1 -1
- package/dist/{chunk-6RKSY3BX.mjs → chunk-KBDBPVLN.mjs} +5 -5
- package/dist/{chunk-J4BDAH2W.mjs → chunk-KBKEXQZA.mjs} +2 -2
- package/dist/{chunk-IJSFWGVW.mjs → chunk-KFLK5NA2.mjs} +3 -3
- package/dist/{chunk-YGQOPB2Z.mjs → chunk-KHKIRS5D.mjs} +1 -1
- package/dist/chunk-KJ3RTZDJ.mjs +101 -0
- package/dist/{chunk-2PNYKG2D.mjs → chunk-KMUNHGBQ.mjs} +139 -432
- package/dist/chunk-KP7TYHWT.mjs +92 -0
- package/dist/{chunk-VP6XRMWR.mjs → chunk-KPIV4RUC.mjs} +6 -32
- package/dist/{chunk-NPXVQS33.mjs → chunk-KXCVQWOR.mjs} +4 -3
- package/dist/chunk-KYYABCSW.mjs +72 -0
- package/dist/{chunk-6F6USYII.mjs → chunk-L7ZD4L3K.mjs} +267 -265
- package/dist/{chunk-U46IZNCW.mjs → chunk-LC3FDWTX.mjs} +3 -2
- package/dist/{chunk-6BWLDLS3.mjs → chunk-LHKOSI2J.mjs} +1 -1
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/{react-native/chunks/chunk-YH7W556M.mjs → chunk-MP7ABPTD.mjs} +12 -2
- package/dist/chunk-MT2NRTA6.mjs +216 -0
- package/dist/chunk-NF4DT3IH.mjs +85 -0
- package/dist/{chunk-POUYICOU.mjs → chunk-OIJ64LGT.mjs} +1 -1
- package/dist/{chunk-SEAJS664.mjs → chunk-PCRA7HTI.mjs} +5 -5
- package/dist/chunk-PHQNACDT.mjs +63 -0
- package/dist/chunk-Q622CTMC.mjs +74 -0
- package/dist/{chunk-NVTFQFUL.mjs → chunk-Q7G3BV3Y.mjs} +1 -1
- package/dist/chunk-QDZJM7NI.mjs +23 -0
- package/dist/{chunk-52QQWEBS.mjs → chunk-QH3YIQP4.mjs} +36 -7
- package/dist/chunk-QJVOLKU6.mjs +111 -0
- package/dist/chunk-QUJHMPTP.mjs +30 -0
- package/dist/{chunk-3E4RRF5J.mjs → chunk-RSVULW4Q.mjs} +100 -8
- package/dist/{chunk-IJPK5PGM.mjs → chunk-RVGRFOGN.mjs} +1 -1
- package/dist/chunk-RZWWB2XR.mjs +96 -0
- package/dist/{chunk-KQJVNPRM.mjs → chunk-S2EQU2GE.mjs} +19 -16
- package/dist/chunk-S5LN746F.mjs +10 -0
- package/dist/{chunk-LJ4ENXOD.mjs → chunk-SG3JBNHY.mjs} +2 -2
- package/dist/{chunk-B2FTZNNF.mjs → chunk-SMVH6JBE.mjs} +34 -14
- package/dist/chunk-SY3EWKQY.mjs +242 -0
- package/dist/{chunk-NYSONUB7.mjs → chunk-TQXHPFWT.mjs} +1 -1
- package/dist/{chunk-ZHAXP7SD.mjs → chunk-U4BS74YN.mjs} +26 -238
- package/dist/chunk-UHICS3JI.mjs +83 -0
- package/dist/chunk-UZRZKNNZ.mjs +101 -0
- package/dist/chunk-V6EUBAIT.mjs +19 -0
- package/dist/{chunk-TTCKT2RT.mjs → chunk-VGF7CFRP.mjs} +134 -11
- package/dist/chunk-VHBNF4MA.mjs +543 -0
- package/dist/{chunk-AWNHDBKV.mjs → chunk-VQEUR6T6.mjs} +16 -8
- package/dist/chunk-WQRN64Q6.mjs +196 -0
- package/dist/{chunk-DMNPYF54.mjs → chunk-WZ7YV54N.mjs} +2 -2
- package/dist/chunk-Y4WPNHMC.mjs +50 -0
- package/dist/{chunk-2HJWQPR6.mjs → chunk-YEDIDCR7.mjs} +6 -122
- package/dist/chunk-YEKL4JBK.mjs +96 -0
- package/dist/{chunk-UGVUW27S.mjs → chunk-Z2BE2MAM.mjs} +14 -10
- package/dist/{chunk-3HV7M5OJ.mjs → chunk-ZAUJFLEN.mjs} +11 -135
- package/dist/{chunk-FDG4KXX5.mjs → chunk-ZHCUZZE5.mjs} +6 -4
- package/dist/chunk-ZTW5WTGG.mjs +167 -0
- package/dist/chunk-ZYAY26KG.mjs +29 -0
- package/dist/{client-Cn3gNxUU.d.ts → client-DRv7UVeY.d.ts} +193 -11
- package/dist/client.d.ts +9 -7
- package/dist/client.mjs +120 -7
- package/dist/{cold-module-PYSSBIL7.mjs → cold-module-7XXCEGTZ.mjs} +43 -33
- package/dist/config-CoSig5Ox.d.ts +482 -0
- package/dist/{config-CfhH1IWQ.d.ts → config-DMwffLKn.d.ts} +20 -5
- package/dist/{direct-executor-WYALQSMD.mjs → direct-executor-G5TK7NLA.mjs} +18 -13
- 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 +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +41 -9
- package/dist/distribution.mjs +9304 -7271
- package/dist/durability-config-GE4U7MCZ.mjs +89 -0
- package/dist/{durability-wiring-7VBZEJLG.mjs → durability-wiring-NCKUC5EO.mjs} +1293 -872
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{config-aIsy7mcL.d.ts → engine-CFxPYqEk.d.ts} +716 -407
- package/dist/engine-hooks-DHCMOADY.mjs +47 -0
- package/dist/{import-GJOMB2HC.mjs → import-NBFXFCSG.mjs} +32 -24
- package/dist/{index-MsF7e5hL.d.ts → index-C4AmUnl1.d.ts} +1 -1
- package/dist/index.browser.mjs +9 -4
- package/dist/index.d.ts +7 -6
- package/dist/index.mjs +29 -21
- package/dist/index.react-native.mjs +19 -12
- package/dist/{long-query-thread-SCUE62TO.mjs → long-query-thread-J4DVRM4A.mjs} +33 -19
- package/dist/methods-7IOINERF.mjs +30 -0
- package/dist/{module-6RLIKSZQ.mjs → module-DWKPBSMN.mjs} +38 -28
- package/dist/{module-AVQEIB7O.mjs → module-UN76TF7I.mjs} +14 -14
- package/dist/operations-G5EP6JPX.mjs +5 -0
- package/dist/{paged-partition-archive-KGRW366Y.mjs → paged-partition-archive-DPNWVSK2.mjs} +46 -31
- package/dist/partial-words.mjs +7 -5
- package/dist/pattern.mjs +4 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +16 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +40 -29
- package/dist/{phrase-module-OUQIRUQU.mjs → phrase-module-ZI4WSQVH.mjs} +1 -1
- package/dist/{pool-UPV5PVPY.mjs → pool-Y4A46T36.mjs} +2 -2
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +81 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +246 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +62 -0
- package/dist/react-native/chunks/{analysis-change-DXPZRGWF.mjs → analysis-change-6BPDPH6K.mjs} +50 -19
- package/dist/{browser/analysis-change-entry-JL5U2N3Q.mjs → react-native/chunks/analysis-change-entry-JLL42PH6.mjs} +1 -1
- package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
- package/dist/react-native/chunks/chunk-3JIBF3XT.mjs +191 -0
- package/dist/react-native/chunks/chunk-3NQOVO3K.mjs +1 -0
- package/dist/react-native/chunks/{chunk-UFNCLEQM.mjs → chunk-4DII3ZSM.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-BRNAVOKP.mjs → chunk-4J74WHQM.mjs} +2 -2
- package/dist/react-native/chunks/chunk-4LCEN2IU.mjs +315 -0
- package/dist/react-native/chunks/{chunk-PU55IOG4.mjs → chunk-4Y53T4YE.mjs} +6 -190
- package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
- package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
- package/dist/react-native/chunks/chunk-6WA3C3DV.mjs +85 -0
- package/dist/react-native/chunks/chunk-7GRCBBME.mjs +63 -0
- package/dist/react-native/chunks/{chunk-2J2727V4.mjs → chunk-7PXRWYUU.mjs} +1 -1
- package/dist/{browser/chunk-VBX2TI5V.mjs → react-native/chunks/chunk-ALOIBXWN.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-FS7BYE23.mjs → chunk-C3PTWYKT.mjs} +10 -153
- package/dist/react-native/chunks/{chunk-DKJTZ625.mjs → chunk-C5G6TJ7A.mjs} +2 -69
- package/dist/react-native/chunks/chunk-CHPTFFJM.mjs +43 -0
- package/dist/react-native/chunks/{chunk-LRGWK367.mjs → chunk-CKNRFDTZ.mjs} +1 -1
- package/dist/react-native/chunks/chunk-CUH5F57W.mjs +242 -0
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
- package/dist/{browser/chunk-55WYRLDZ.mjs → react-native/chunks/chunk-DVDX4SDR.mjs} +2 -2
- package/dist/{browser/chunk-PIS7ZAP7.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +12 -2
- package/dist/react-native/chunks/{chunk-KOCTCUXW.mjs → chunk-EIOYM5TO.mjs} +17 -9
- package/dist/react-native/chunks/chunk-F753DA54.mjs +23 -0
- package/dist/react-native/chunks/chunk-GIZTJXYW.mjs +1007 -0
- package/dist/react-native/chunks/{chunk-CLE3LZ77.mjs → chunk-GJFXPHXI.mjs} +5 -4
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/{chunk-IDFMNRIC.mjs → chunk-HUOYZJ3Q.mjs} +140 -430
- package/dist/react-native/chunks/chunk-IYNT75CE.mjs +111 -0
- package/dist/react-native/chunks/chunk-JDOEEMEF.mjs +38 -0
- package/dist/react-native/chunks/{chunk-LQAKO5QV.mjs → chunk-JLIIWJUV.mjs} +2 -2
- package/dist/react-native/chunks/chunk-JWUCMVRK.mjs +15 -0
- package/dist/react-native/chunks/chunk-KJIG57UD.mjs +1106 -0
- package/dist/react-native/chunks/{chunk-KLZGAOLT.mjs → chunk-KTTAU63H.mjs} +5 -5
- package/dist/react-native/chunks/chunk-LU3Y3P63.mjs +68 -0
- package/dist/{browser/chunk-NVEJJP4R.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +2 -79
- package/dist/react-native/chunks/{chunk-3CTWSQRW.mjs → chunk-MJDQU5MW.mjs} +4 -30
- package/dist/react-native/chunks/{chunk-NFGBOI46.mjs → chunk-MVXELMJX.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-D7LFYPYI.mjs → chunk-N2WUOWLL.mjs} +12 -10
- package/dist/react-native/chunks/chunk-NVVRSRX5.mjs +78 -0
- package/dist/react-native/chunks/{chunk-JYL35A4A.mjs → chunk-OL3WDV53.mjs} +7 -33
- package/dist/react-native/chunks/chunk-PB2YXVQW.mjs +29 -0
- package/dist/react-native/chunks/{chunk-UCJU6WNH.mjs → chunk-PEHS2UO3.mjs} +7 -6
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
- package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
- package/dist/react-native/chunks/chunk-QJXTNPLQ.mjs +100 -0
- package/dist/react-native/chunks/{chunk-ZCKNBPQ4.mjs → chunk-RDWG33MM.mjs} +2 -2
- package/dist/react-native/chunks/chunk-SUPXRTMD.mjs +96 -0
- package/dist/react-native/chunks/chunk-TYIRMPD3.mjs +432 -0
- package/dist/react-native/chunks/{chunk-TLYD7IJ2.mjs → chunk-U4KSKA4Z.mjs} +1 -1
- package/dist/react-native/chunks/chunk-UNUFZ2QY.mjs +68 -0
- package/dist/react-native/chunks/{chunk-7IQR3SZO.mjs → chunk-VXGE4ZXL.mjs} +151 -257
- package/dist/react-native/chunks/{chunk-R4OPUZQ5.mjs → chunk-WBYQRHDY.mjs} +2 -2
- package/dist/react-native/chunks/chunk-YH7QY657.mjs +288 -0
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
- package/dist/react-native/chunks/{cold-module-KFGEWYEL.mjs → cold-module-5PHF6DZR.mjs} +31 -22
- package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
- package/dist/react-native/chunks/{durability-wiring-QKJB2QBT.mjs → durability-wiring-KO565FZC.mjs} +1309 -889
- package/dist/react-native/chunks/engine-hooks-MVRRHH6B.mjs +28 -0
- package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
- package/dist/react-native/chunks/import-YVZA4V4V.mjs +30 -0
- package/dist/react-native/chunks/methods-6W5U4C3H.mjs +30 -0
- package/dist/react-native/chunks/{module-UJ5VUARS.mjs → module-H5MVPSP2.mjs} +13 -11
- package/dist/react-native/chunks/module-ZL5ZG6YB.mjs +34 -0
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-76UAPPSG.mjs → phrase-module-RTVKEWJT.mjs} +1 -1
- package/dist/react-native/chunks/{pool-CD4ANYUI.mjs → pool-JR3NJCAF.mjs} +3 -2
- package/dist/react-native/chunks/restore-hooks-SILFPU6B.mjs +125 -0
- package/dist/react-native/chunks/restore-queue-HSYP2AEC.mjs +55 -0
- package/dist/react-native/chunks/retention-7I7UAWYK.mjs +221 -0
- package/dist/react-native/chunks/{runtime-3MCDLJAF.mjs → runtime-R5E3TB3J.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-KVBD4LRC.mjs → snapshot-EZYB6SLF.mjs} +90 -323
- package/dist/react-native/chunks/start-SHVZ72I5.mjs +36 -0
- package/dist/react-native/chunks/sync-state-PASCIHHT.mjs +15 -0
- package/dist/react-native/chunks/{write-ES5A3WUA.mjs → write-JUESXHDL.mjs} +27 -19
- package/dist/react-native/partial-words.mjs +8 -5
- package/dist/react-native/pattern.mjs +4 -3
- package/dist/react-native/query-suggestions.mjs +258 -0
- package/dist/react-native/sync.mjs +2299 -0
- package/dist/react-native/synonyms.mjs +7 -4
- package/dist/react.d.ts +11 -10
- package/dist/react.mjs +8 -1
- package/dist/{rerank-3W54N6P2.mjs → rerank-MQ37IYRV.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/restore-hooks-HZ3ILAMO.mjs +146 -0
- package/dist/restore-queue-JVGENGGE.mjs +55 -0
- package/dist/retention-HROPV2QU.mjs +59 -0
- package/dist/{runtime-L2DZYY6N.mjs → runtime-COIUORCN.mjs} +5 -5
- package/dist/{schema-D33CyXCy.d.ts → schema-Jwt928nJ.d.ts} +1 -1
- package/dist/server.d.ts +119 -20
- package/dist/server.mjs +1123 -58
- package/dist/{snapshot-WMX6JCLP.mjs → snapshot-4HS2G2UM.mjs} +106 -49
- package/dist/start-UTWHGH42.mjs +59 -0
- package/dist/sync/filesystem.d.ts +30 -0
- package/dist/sync/filesystem.mjs +271 -0
- package/dist/sync/indexeddb.d.ts +30 -0
- package/dist/sync/indexeddb.mjs +237 -0
- package/dist/sync-state-ZWHLAFLE.mjs +15 -0
- package/dist/sync.browser.mjs +2294 -0
- package/dist/sync.d.ts +23 -0
- package/dist/sync.mjs +2268 -0
- package/dist/synonyms.mjs +6 -4
- package/dist/{tasks-C4ElXr4P.d.ts → tasks-qrJojgST.d.ts} +13 -5
- package/dist/thread-6MOXY2KD.mjs +45 -0
- package/dist/types-BZCGjfLn.d.ts +227 -0
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +7 -7
- package/dist/workers/entry.mjs +8 -8
- package/dist/{write-SKJ6HW7O.mjs → write-GTTWWRRG.mjs} +36 -28
- package/openapi.json +912 -5
- package/package.json +45 -8
- package/dist/browser/import-QOY6ZH6X.mjs +0 -12
- package/dist/browser/restore-queue-UQ6AAUVX.mjs +0 -41
- package/dist/chunk-7LDMWKP6.mjs +0 -209
- package/dist/engine-CJRUHXgf.d.ts +0 -664
- package/dist/react-native/chunks/chunk-L4M7QJNP.mjs +0 -110
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
- package/dist/react-native/chunks/gzip.react-native-7JWCLVOB.mjs +0 -3
- package/dist/react-native/chunks/import-XFBCCENV.mjs +0 -22
- package/dist/react-native/chunks/module-FHJ2GOBI.mjs +0 -25
- package/dist/react-native/chunks/restore-queue-H5VCN453.mjs +0 -41
- package/dist/restore-queue-AOF5OTQV.mjs +0 -41
- package/dist/thread-I7DVHHW7.mjs +0 -31
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PROCESS_LIMIT_REFRESH_INTERVAL_MS } from './chunk-ZXNQEW43.mjs';
|
|
3
|
-
import { turnIsSpent, yieldTurn, createDocIdMap } from './chunk-LQG5G2LY.mjs';
|
|
4
|
-
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, GEO_UNIT_METRES, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, TYPO_CLAIM_SLOTS_PER_WORD, FILTER_OPERAND_COPY_DEPTH, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-U46IZNCW.mjs';
|
|
1
|
+
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, GEO_UNIT_METRES, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, TYPO_CLAIM_SLOTS_PER_WORD, FILTER_OPERAND_COPY_DEPTH, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-LC3FDWTX.mjs';
|
|
5
2
|
import { bitsetHas, createBitSet, bitsetSet, bitsetIsEmpty, bitsetOrInto, bitsetAndNotInto, bitsetAndInto, bitsetFromSet } from './chunk-JUKYYXSP.mjs';
|
|
6
|
-
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS,
|
|
3
|
+
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, expandTermPrefix, suggestDisplayTerms, getNestedValue, validateDocument, validateDocumentStrict, textFieldsChanged, getFlatSchema, tokenizeOptions, partialWordSearchModule, ANTIMERIDIAN_SPAN_DEGREES, FULL_TURN_DEGREES, getOrCreateFieldNameIndex, partitionDocumentFrequency, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS, VINCENTY_CONVERGENCE_THRESHOLD, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, DEG_TO_RAD, VINCENTY_MAX_ITERATIONS } from './chunk-4KRC2APY.mjs';
|
|
7
4
|
import { MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, RESULT_WINDOW, DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_PAGE_SIZE, PREFIX_MAX_EXPANSIONS } from './chunk-FQBFZAWG.mjs';
|
|
8
|
-
import {
|
|
5
|
+
import { partialFieldsOf, schemaFieldsOf, flattenSchema } from './chunk-WQRN64Q6.mjs';
|
|
6
|
+
import { fuzzyPrefixOf, boundedLevenshtein, fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
7
|
+
import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedBase, isWordIndexedFieldType, isListBase } from './chunk-I54T6CQP.mjs';
|
|
8
|
+
import { tokenize, visitTokens } from './chunk-4BYWRYPM.mjs';
|
|
9
9
|
import { TARGET_BLOCK_ENTRIES, SCORE_BUFFER_INITIAL_TOUCHED_CAPACITY, PRUNING_REJECTION_SLACK, SORT_COLUMN_MINIMUM_REBUILD_THRESHOLD, SORT_COLUMN_REBUILD_FRACTION_SHIFT } from './chunk-4UMZ7KQL.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { PROCESS_LIMIT_REFRESH_INTERVAL_MS } from './chunk-ZXNQEW43.mjs';
|
|
11
11
|
import { isGeopointOrVectorType, PROTOTYPE_POLLUTION_KEYS } from './chunk-L5ORED7V.mjs';
|
|
12
|
-
import {
|
|
12
|
+
import { turnIsSpent, yieldTurn, createDocIdMap } from './chunk-LQG5G2LY.mjs';
|
|
13
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
13
14
|
import { singleFoldTable, appendFoldedCodePoint, sortModeOf, defaultSortMode, SORT_VALUE_MAX_CODE_POINTS, toReducedSortValue, readSortField, compareComparableKeys, toComparableSortValue, isSortMode, SORT_MODES, compareSortValues, compareComparableValues, truncateSortString } from './chunk-R6A773WK.mjs';
|
|
14
15
|
import { compareCodePoints, exceedsCodePoints, codePointCount, holdsUnpairedSurrogate } from './chunk-YTJCGKM4.mjs';
|
|
15
16
|
import { totalmem, freemem } from 'os';
|
|
16
|
-
import { getHeapSpaceStatistics, getHeapStatistics } from 'v8';
|
|
17
17
|
|
|
18
18
|
// src/core/partition/partial-words/platform.ts
|
|
19
19
|
function platformPartialWordSearch() {
|
|
@@ -168,130 +168,6 @@ function requirePatternSearch(fieldPath) {
|
|
|
168
168
|
{ field: fieldPath }
|
|
169
169
|
);
|
|
170
170
|
}
|
|
171
|
-
var MEGABYTE_BYTES = 1048576;
|
|
172
|
-
var IN_MEGABYTES = /^--max-old-space-size=(\d+)$/;
|
|
173
|
-
var AS_PERCENTAGE = /^--max-old-space-size-percentage=(\d+(?:\.\d+)?)$/;
|
|
174
|
-
var SEMI_SPACE_IN_MEGABYTES = /^--max-semi-space-size=(\d+)$/;
|
|
175
|
-
var YOUNG_GENERATION_SPACES = /* @__PURE__ */ new Set(["new_space", "new_large_object_space"]);
|
|
176
|
-
var V8_YOUNG_GENERATION_BYTES_PER_SEMI_SPACE_BYTE = 3;
|
|
177
|
-
function flagEntries() {
|
|
178
|
-
const fromNodeOptions = (process.env.NODE_OPTIONS ?? "").split(/\s+/).filter((entry) => entry.length > 0);
|
|
179
|
-
return [...fromNodeOptions, ...process.execArgv];
|
|
180
|
-
}
|
|
181
|
-
function memoryTheHostAllows() {
|
|
182
|
-
const constrained = process.constrainedMemory?.() ?? 0;
|
|
183
|
-
return constrained > 0 ? constrained : totalmem();
|
|
184
|
-
}
|
|
185
|
-
function readConfiguredOldSpaceMegabytes() {
|
|
186
|
-
let megabytes = null;
|
|
187
|
-
for (const entry of flagEntries()) {
|
|
188
|
-
const inMegabytes = IN_MEGABYTES.exec(entry);
|
|
189
|
-
if (inMegabytes !== null) megabytes = Number(inMegabytes[1]);
|
|
190
|
-
if (AS_PERCENTAGE.test(entry)) megabytes = null;
|
|
191
|
-
}
|
|
192
|
-
return megabytes !== null && Number.isFinite(megabytes) && megabytes > 0 ? megabytes : null;
|
|
193
|
-
}
|
|
194
|
-
function readConfiguredLimit() {
|
|
195
|
-
let megabytes = null;
|
|
196
|
-
let percentage = null;
|
|
197
|
-
for (const entry of flagEntries()) {
|
|
198
|
-
const inMegabytes = IN_MEGABYTES.exec(entry);
|
|
199
|
-
if (inMegabytes !== null) {
|
|
200
|
-
megabytes = Number(inMegabytes[1]);
|
|
201
|
-
percentage = null;
|
|
202
|
-
}
|
|
203
|
-
const asPercentage = AS_PERCENTAGE.exec(entry);
|
|
204
|
-
if (asPercentage !== null) {
|
|
205
|
-
percentage = Number(asPercentage[1]);
|
|
206
|
-
megabytes = null;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
const bytes = megabytes !== null && megabytes > 0 ? megabytes * MEGABYTE_BYTES : percentage !== null && percentage > 0 && percentage <= 100 ? Math.floor(memoryTheHostAllows() * percentage / 100) : null;
|
|
210
|
-
return bytes !== null && Number.isFinite(bytes) && bytes > 0 ? bytes : null;
|
|
211
|
-
}
|
|
212
|
-
var configuredLimit;
|
|
213
|
-
function configuredLimitBytes() {
|
|
214
|
-
if (configuredLimit === void 0) configuredLimit = readConfiguredLimit();
|
|
215
|
-
return configuredLimit;
|
|
216
|
-
}
|
|
217
|
-
function readConfiguredYoungGeneration() {
|
|
218
|
-
let megabytes = 0;
|
|
219
|
-
for (const entry of flagEntries()) {
|
|
220
|
-
const semiSpace = SEMI_SPACE_IN_MEGABYTES.exec(entry);
|
|
221
|
-
if (semiSpace !== null) megabytes = Number(semiSpace[1]);
|
|
222
|
-
}
|
|
223
|
-
if (!Number.isFinite(megabytes) || megabytes <= 0) return null;
|
|
224
|
-
const semiSpaceBytes = 2 ** Math.ceil(Math.log2(megabytes)) * MEGABYTE_BYTES;
|
|
225
|
-
return semiSpaceBytes * V8_YOUNG_GENERATION_BYTES_PER_SEMI_SPACE_BYTE;
|
|
226
|
-
}
|
|
227
|
-
var configuredYoungGeneration;
|
|
228
|
-
function configuredYoungGenerationBytes() {
|
|
229
|
-
if (configuredYoungGeneration === void 0) configuredYoungGeneration = readConfiguredYoungGeneration();
|
|
230
|
-
return configuredYoungGeneration;
|
|
231
|
-
}
|
|
232
|
-
var heapSizeLimit;
|
|
233
|
-
function heapSizeLimitBytes() {
|
|
234
|
-
if (heapSizeLimit === void 0) heapSizeLimit = getHeapStatistics().heap_size_limit;
|
|
235
|
-
return heapSizeLimit;
|
|
236
|
-
}
|
|
237
|
-
function readYoungGenerationCeiling() {
|
|
238
|
-
const fromSemiSpace = configuredYoungGenerationBytes();
|
|
239
|
-
if (fromSemiSpace !== null) return fromSemiSpace;
|
|
240
|
-
const oldSpaceMegabytes = readConfiguredOldSpaceMegabytes();
|
|
241
|
-
if (oldSpaceMegabytes !== null) {
|
|
242
|
-
const beyondOldSpace = heapSizeLimitBytes() - oldSpaceMegabytes * MEGABYTE_BYTES;
|
|
243
|
-
if (beyondOldSpace > 0) return beyondOldSpace;
|
|
244
|
-
}
|
|
245
|
-
return youngGenerationBytesOfThisV8();
|
|
246
|
-
}
|
|
247
|
-
var youngGenerationCeiling;
|
|
248
|
-
function youngGenerationCeilingBytes() {
|
|
249
|
-
if (youngGenerationCeiling === void 0) youngGenerationCeiling = readYoungGenerationCeiling();
|
|
250
|
-
return youngGenerationCeiling;
|
|
251
|
-
}
|
|
252
|
-
function readOldGenerationStatistics() {
|
|
253
|
-
try {
|
|
254
|
-
let usedBytes = 0;
|
|
255
|
-
let committedBytes = 0;
|
|
256
|
-
let youngCapacityBytes = 0;
|
|
257
|
-
let youngUsedBytes = 0;
|
|
258
|
-
for (const space of getHeapSpaceStatistics()) {
|
|
259
|
-
if (YOUNG_GENERATION_SPACES.has(space.space_name)) {
|
|
260
|
-
youngCapacityBytes += space.space_size;
|
|
261
|
-
youngUsedBytes += space.space_used_size;
|
|
262
|
-
} else {
|
|
263
|
-
usedBytes += space.space_used_size;
|
|
264
|
-
committedBytes += space.space_size;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
const youngCeilingBytes = youngGenerationCeilingBytes();
|
|
268
|
-
const limitBytes2 = configuredLimitBytes() ?? heapSizeLimitBytes() - youngCeilingBytes;
|
|
269
|
-
if (!Number.isFinite(usedBytes) || !Number.isFinite(limitBytes2) || limitBytes2 <= 0) return null;
|
|
270
|
-
return {
|
|
271
|
-
usedBytes,
|
|
272
|
-
limitBytes: limitBytes2,
|
|
273
|
-
youngUsedBytes: Number.isFinite(youngUsedBytes) ? youngUsedBytes : 0,
|
|
274
|
-
committedBytes: Number.isFinite(committedBytes) ? committedBytes : usedBytes,
|
|
275
|
-
youngReserveBytes: Number.isFinite(youngCapacityBytes) ? Math.max(0, youngCeilingBytes - youngCapacityBytes) : 0,
|
|
276
|
-
youngCeilingBytes
|
|
277
|
-
};
|
|
278
|
-
} catch {
|
|
279
|
-
return null;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
function readHeapStatistics() {
|
|
283
|
-
try {
|
|
284
|
-
const stats = getHeapStatistics();
|
|
285
|
-
const usedBytes = stats.used_heap_size;
|
|
286
|
-
const limitBytes2 = stats.heap_size_limit;
|
|
287
|
-
if (!Number.isFinite(usedBytes) || !Number.isFinite(limitBytes2) || limitBytes2 <= 0) return null;
|
|
288
|
-
const available = stats.total_available_size;
|
|
289
|
-
const availableBytes = Number.isFinite(available) && available >= 0 ? available : null;
|
|
290
|
-
return { usedBytes, limitBytes: limitBytes2, availableBytes, configuredLimitBytes: configuredLimitBytes() };
|
|
291
|
-
} catch {
|
|
292
|
-
return null;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
171
|
|
|
296
172
|
// src/core/constants.ts
|
|
297
173
|
var POSTING_LIST_COMPACTION_THRESHOLD = 0.3;
|
|
@@ -4973,7 +4849,7 @@ function requireLoadedPhraseCode() {
|
|
|
4973
4849
|
}
|
|
4974
4850
|
function loadPhraseCode() {
|
|
4975
4851
|
if (loading === null) {
|
|
4976
|
-
loading = import('./phrase-module-
|
|
4852
|
+
loading = import('./phrase-module-ZI4WSQVH.mjs').then(
|
|
4977
4853
|
(code) => {
|
|
4978
4854
|
loaded = code;
|
|
4979
4855
|
return code;
|
|
@@ -9177,4 +9053,4 @@ function fanOutMatchCount(manager, params, language, schema, options) {
|
|
|
9177
9053
|
return count;
|
|
9178
9054
|
}
|
|
9179
9055
|
|
|
9180
|
-
export { ARRAY_POSITION_GAP, DEFAULT_BM25_B, DEFAULT_BM25_K1, FIELD_FILTER_OPERATORS, FILTER_EXPRESSION_KEYS, MAX_BM25_B, MAX_BM25_K1, MAX_TERM_FREQUENCY, PATTERN_HOST, ValueAffixes, analyseQueryPhrases, applyPagination, applyPartitionFiltersBitset, applyProjection, applySorting, availablePatternSearch, bm25SetsValue, buildPartialWordTableFrom, clampRowCount, cloneProjected, collectQueryTermStats, copyVectorsInto, countPartialSpelling, countsWithoutScores, createBooleanIndex, createCompositePartition, createEnumIndex, createFrozenPartialWords, createGeoIndex, createNumericIndex, createPartitionIndex, createPatternWorkMeter, createSurfaceRegistry, decodePageCursor, documentValueBytes, documentWithOwnBuffers, encodeFieldIndexes, encodePageCursor, encodePartialSpellingsOf, encodeSegmentState, everyValueFacetConfig, fanOutMatchCount, fanOutQuery, filterTestCount, fulltextMatches, holdsQuotedText, isCompositePartition, joinPatternWorkMeter, kWayMerge, loadPhraseCodeFor, mergeBM25Levels, mergeDocFrequencies, mergeFacets, mergePartitionStats, normalizeSort, oversampledFacetConfig, oversampledShardSize, partialSpellingsOfDocuments, partialWordHighlighter, partialWordsToHighlight, partitionStateOf, partitionsIn, patternIndexOf, projectIncludedPaths, projectionKeepsField, pruneStatsToQueryTerms,
|
|
9056
|
+
export { ARRAY_POSITION_GAP, DEFAULT_BM25_B, DEFAULT_BM25_K1, FIELD_FILTER_OPERATORS, FILTER_EXPRESSION_KEYS, MAX_BM25_B, MAX_BM25_K1, MAX_TERM_FREQUENCY, PATTERN_HOST, ValueAffixes, analyseQueryPhrases, applyPagination, applyPartitionFiltersBitset, applyProjection, applySorting, availablePatternSearch, bm25SetsValue, buildPartialWordTableFrom, clampRowCount, cloneProjected, collectQueryTermStats, copyVectorsInto, countPartialSpelling, countsWithoutScores, createBooleanIndex, createCompositePartition, createEnumIndex, createFrozenPartialWords, createGeoIndex, createNumericIndex, createPartitionIndex, createPatternWorkMeter, createSurfaceRegistry, decodePageCursor, documentValueBytes, documentWithOwnBuffers, encodeFieldIndexes, encodePageCursor, encodePartialSpellingsOf, encodeSegmentState, everyValueFacetConfig, fanOutMatchCount, fanOutQuery, filterTestCount, fulltextMatches, holdsQuotedText, isCompositePartition, joinPatternWorkMeter, kWayMerge, loadPhraseCodeFor, mergeBM25Levels, mergeDocFrequencies, mergeFacets, mergePartitionStats, normalizeSort, oversampledFacetConfig, oversampledShardSize, partialSpellingsOfDocuments, partialWordHighlighter, partialWordsToHighlight, partitionStateOf, partitionsIn, patternIndexOf, projectIncludedPaths, projectionKeepsField, pruneStatsToQueryTerms, readProjectedPath, readResidentMemory, readSortValues, recordValueSize, registerPartialWordSearch, registerPatternSearch, requireLoadedPhraseCode, requireMatchingCursor, requirePartialWordSearchFor, requirePatternSearch, requirePatternSearchFor, requireSortableFields, requireWithinResultWindow, resolveProjection, sanitizeGlobalStats, scanPostingBlocks, setNestedValue, sortModesOf, sortSignatureEntry, sortSignatureOf, survivorDocumentsOf, undeclaredFieldOnStrictIndex, validatedFilterOf, valueWithOwnBuffers };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { nodeThreadId } from './chunk-BEZH7VEH.mjs';
|
|
2
1
|
import { getFs, getPath } from './chunk-HLPRHOSO.mjs';
|
|
3
|
-
import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-
|
|
4
|
-
import {
|
|
2
|
+
import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-QDZJM7NI.mjs';
|
|
3
|
+
import { nodeThreadId } from './chunk-BEZH7VEH.mjs';
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
5
5
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
6
6
|
import { openSync, close, readFileSync } from 'fs';
|
|
7
7
|
import { rename, readFile, writeFile, unlink, realpath, readdir, readlink } from 'fs/promises';
|
|
@@ -629,7 +629,9 @@ function createDurableDirectory(root) {
|
|
|
629
629
|
const fs = await getFs();
|
|
630
630
|
const pathMod = await getPath();
|
|
631
631
|
const resolvedBase = pathMod.resolve(root);
|
|
632
|
-
const
|
|
632
|
+
const directoryOfPrefix = prefix.slice(0, prefix.lastIndexOf("/") + 1);
|
|
633
|
+
const walkFrom = directoryOfPrefix.length === 0 ? resolvedBase : (await resolve(directoryOfPrefix)).path;
|
|
634
|
+
const all = await listRecursive(walkFrom, resolvedBase, pathMod, fs);
|
|
633
635
|
return all.filter((entry) => entry.startsWith(prefix)).sort(compareCodePoints);
|
|
634
636
|
},
|
|
635
637
|
async pathOf(key) {
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-YEKL4JBK.mjs';
|
|
2
|
+
import { archiveLayout } from './chunk-Q622CTMC.mjs';
|
|
3
|
+
import { syncStorageOf } from './chunk-QJVOLKU6.mjs';
|
|
4
|
+
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-ZYAY26KG.mjs';
|
|
5
|
+
import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
|
|
6
|
+
import { manifestFileRefs } from './chunk-NF4DT3IH.mjs';
|
|
7
|
+
import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
|
|
8
|
+
import { emitEngineEvent, encodeIndexConfiguration } from './chunk-KMUNHGBQ.mjs';
|
|
9
|
+
import { INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-GH4WQ22V.mjs';
|
|
10
|
+
import { openChecksummedEnvelope } from './chunk-3OH67G7R.mjs';
|
|
11
|
+
import { withOpenIndex } from './chunk-Y4WPNHMC.mjs';
|
|
12
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
13
|
+
import { decode } from '@msgpack/msgpack';
|
|
14
|
+
|
|
15
|
+
// src/engine/sync/archive.ts
|
|
16
|
+
function publishedArchiveLayout(indexName, snapshot, storage) {
|
|
17
|
+
const prefix = `${indexName}/`;
|
|
18
|
+
return archiveLayout(
|
|
19
|
+
snapshot.config,
|
|
20
|
+
snapshot.manifestBytes,
|
|
21
|
+
manifestFileRefs(snapshot.manifest).map((ref) => ({
|
|
22
|
+
name: ref.key.slice(prefix.length),
|
|
23
|
+
bytes: ref.bytes,
|
|
24
|
+
read: (offset, length) => storage.readFileRange(ref.key, offset, length)
|
|
25
|
+
}))
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/engine/sync/constants.ts
|
|
30
|
+
var HISTORY_SWEEP_INTERVAL_MS = 36e5;
|
|
31
|
+
var epochsOfSnapshots = /* @__PURE__ */ new WeakMap();
|
|
32
|
+
async function epochOfSnapshot(snapshot) {
|
|
33
|
+
const known = epochsOfSnapshots.get(snapshot);
|
|
34
|
+
if (known !== void 0) return known;
|
|
35
|
+
const { payload } = await openChecksummedEnvelope(snapshot.config, {
|
|
36
|
+
envelopeFormatVersion: INDEX_CONFIGURATION_ENVELOPE_VERSION,
|
|
37
|
+
what: "index configuration",
|
|
38
|
+
allowsCompression: true
|
|
39
|
+
});
|
|
40
|
+
const raw = decode(payload);
|
|
41
|
+
const epoch = raw !== null && typeof raw === "object" && isSyncEpoch(raw.syncEpoch) ? raw.syncEpoch : null;
|
|
42
|
+
epochsOfSnapshots.set(snapshot, epoch);
|
|
43
|
+
return epoch;
|
|
44
|
+
}
|
|
45
|
+
function notEnabled(indexName) {
|
|
46
|
+
return new NarsilError(ErrorCodes.SYNC_NOT_ENABLED, `Index "${indexName}" has device sync off`, { indexName });
|
|
47
|
+
}
|
|
48
|
+
function configurationFor(core, indexName) {
|
|
49
|
+
return async (manifest) => {
|
|
50
|
+
const entry = core.requireIndex(indexName);
|
|
51
|
+
if ((manifest.analysisGeneration ?? 0) !== entry.analysisGeneration) {
|
|
52
|
+
throw new NarsilError(
|
|
53
|
+
ErrorCodes.ANALYSIS_CHANGE_NOT_READY,
|
|
54
|
+
`The analysis of index "${indexName}" changed while the engine published its snapshot`,
|
|
55
|
+
{ indexName }
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return encodeIndexConfiguration(entry);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async function publishWithinAnalysis(core, storage, indexName) {
|
|
62
|
+
let lastError = null;
|
|
63
|
+
for (let attempt = 0; attempt < MAX_SNAPSHOT_ANALYSIS_ATTEMPTS; attempt++) {
|
|
64
|
+
try {
|
|
65
|
+
return await storage.publish(indexName, configurationFor(core, indexName));
|
|
66
|
+
} catch (error) {
|
|
67
|
+
if (!(error instanceof NarsilError) || error.code !== ErrorCodes.ANALYSIS_CHANGE_NOT_READY) throw error;
|
|
68
|
+
lastError = error;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
throw lastError;
|
|
72
|
+
}
|
|
73
|
+
function publishedSyncSnapshot(core, indexName, republish = false) {
|
|
74
|
+
const entry = core.requireIndex(indexName);
|
|
75
|
+
if (entry.sync === null) throw notEnabled(indexName);
|
|
76
|
+
const storage = syncStorageOf(core, indexName);
|
|
77
|
+
return withOpenIndex(
|
|
78
|
+
core,
|
|
79
|
+
indexName,
|
|
80
|
+
() => oneSyncChangeAtATime(core.indexRegistry, indexName, async () => {
|
|
81
|
+
const sync = core.requireIndex(indexName).sync;
|
|
82
|
+
if (sync === null) throw notEnabled(indexName);
|
|
83
|
+
if (!sync.active) {
|
|
84
|
+
const activated = { ...sync, active: true };
|
|
85
|
+
core.requireIndex(indexName).sync = activated;
|
|
86
|
+
try {
|
|
87
|
+
await core.durability?.manager.persistMetadata(indexName);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
core.requireIndex(indexName).sync = sync;
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const current = republish ? null : await storage.published(indexName);
|
|
94
|
+
if (current !== null) {
|
|
95
|
+
const unpin = storage.pin(current);
|
|
96
|
+
if (await epochOfSnapshot(current).catch(() => null) === sync.epoch) {
|
|
97
|
+
return { snapshot: current, epoch: sync.epoch, storage, unpin };
|
|
98
|
+
}
|
|
99
|
+
unpin();
|
|
100
|
+
}
|
|
101
|
+
const snapshot = await publishWithinAnalysis(core, storage, indexName);
|
|
102
|
+
return { snapshot, epoch: sync.epoch, storage, unpin: storage.pin(snapshot) };
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/engine/sync/retention.ts
|
|
108
|
+
var statesByCore = /* @__PURE__ */ new WeakMap();
|
|
109
|
+
function stateOf(core) {
|
|
110
|
+
let state = statesByCore.get(core);
|
|
111
|
+
if (state === void 0) {
|
|
112
|
+
state = { running: /* @__PURE__ */ new Map(), again: /* @__PURE__ */ new Set(), sweep: null };
|
|
113
|
+
statesByCore.set(core, state);
|
|
114
|
+
}
|
|
115
|
+
return state;
|
|
116
|
+
}
|
|
117
|
+
async function enforce(core, indexName) {
|
|
118
|
+
const sync = core.indexRegistry.get(indexName)?.sync ?? null;
|
|
119
|
+
const storage = core.durability?.manager.syncStorage?.();
|
|
120
|
+
if (sync === null || !sync.active || storage === void 0 || core.shutdownState.isShutdown) return;
|
|
121
|
+
const published = await storage.published(indexName);
|
|
122
|
+
const maxBytes = sync.historyMaxBytes ?? (published === null ? Number.POSITIVE_INFINITY : publishedArchiveLayout(indexName, published, storage).byteLength);
|
|
123
|
+
const publishesSnapshots = core.mutationCtx.capacityScope !== "partition";
|
|
124
|
+
await storage.enforceHistoryLimits(
|
|
125
|
+
indexName,
|
|
126
|
+
{ maxAgeMs: sync.historyMaxAgeMs ?? DEFAULT_HISTORY_MAX_AGE_MS, maxBytes },
|
|
127
|
+
publishesSnapshots ? async () => {
|
|
128
|
+
const { unpin } = await publishedSyncSnapshot(core, indexName, true);
|
|
129
|
+
unpin();
|
|
130
|
+
} : null,
|
|
131
|
+
Date.now()
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function scheduleSyncRetention(core, indexName) {
|
|
135
|
+
const state = stateOf(core);
|
|
136
|
+
startSyncRetentionSweep(core);
|
|
137
|
+
if (state.running.has(indexName)) {
|
|
138
|
+
state.again.add(indexName);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const run = (async () => {
|
|
142
|
+
do {
|
|
143
|
+
state.again.delete(indexName);
|
|
144
|
+
await enforce(core, indexName);
|
|
145
|
+
} while (state.again.has(indexName));
|
|
146
|
+
})().catch((error) => {
|
|
147
|
+
emitEngineEvent(core.eventHandlers, "durabilityError", {
|
|
148
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
149
|
+
});
|
|
150
|
+
}).finally(() => state.running.delete(indexName));
|
|
151
|
+
state.running.set(indexName, run);
|
|
152
|
+
}
|
|
153
|
+
function startSyncRetentionSweep(core) {
|
|
154
|
+
const state = stateOf(core);
|
|
155
|
+
if (state.sweep !== null) return;
|
|
156
|
+
state.sweep = unrefInterval(() => {
|
|
157
|
+
if (core.shutdownState.isShutdown) {
|
|
158
|
+
if (state.sweep !== null) clearInterval(state.sweep);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
for (const [indexName, entry] of core.indexRegistry) {
|
|
162
|
+
if (entry.sync?.active === true) scheduleSyncRetention(core, indexName);
|
|
163
|
+
}
|
|
164
|
+
}, HISTORY_SWEEP_INTERVAL_MS);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { publishedArchiveLayout, publishedSyncSnapshot, scheduleSyncRetention, startSyncRetentionSweep };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/engine/snapshot/constants.ts
|
|
2
|
+
var RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE = 0.2;
|
|
3
|
+
var RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 7.86;
|
|
4
|
+
var RESTORE_WORST_HEAP_BYTES_PER_VECTOR = 264;
|
|
5
|
+
var RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION = 0.24;
|
|
6
|
+
var RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 738;
|
|
7
|
+
var RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 0.2;
|
|
8
|
+
var RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE = 4.06;
|
|
9
|
+
var RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 14.5;
|
|
10
|
+
var RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR = 1482;
|
|
11
|
+
var RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION = 9.29;
|
|
12
|
+
var RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 2141;
|
|
13
|
+
var RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 24.15;
|
|
14
|
+
var RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE = 0.16;
|
|
15
|
+
var RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 6.16;
|
|
16
|
+
var RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR = 204;
|
|
17
|
+
var RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION = 0.17;
|
|
18
|
+
var RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 695;
|
|
19
|
+
var RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 0.04;
|
|
20
|
+
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE = 2.14;
|
|
21
|
+
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 5.05;
|
|
22
|
+
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR = 1080;
|
|
23
|
+
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION = 0.72;
|
|
24
|
+
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 1744;
|
|
25
|
+
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 20.05;
|
|
26
|
+
var RESTORE_ESTIMATE_MARGIN = 1.25;
|
|
27
|
+
var MAX_SNAPSHOT_ANALYSIS_ATTEMPTS = 3;
|
|
28
|
+
|
|
29
|
+
export { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, RESTORE_ESTIMATE_MARGIN, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE, RESTORE_WORST_HEAP_BYTES_PER_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { P as PartitionConfig, B as BM25Params, A as AnyDocument,
|
|
2
|
-
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams,
|
|
1
|
+
import { P as PartitionConfig, B as BM25Params, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-Jwt928nJ.js';
|
|
2
|
+
import { e as SnapshotOptions, V as VectorMaintenanceResult, B as BatchResult, L as ListParams, l as ListResult, I as IndexInfo, p as IndexStats, P as PartitionStatsResult, Q as QueryParams, h as QueryResult, o as PreflightResult, m as SuggestParams, n as SuggestResult, f as SyncSetting } from './engine-CFxPYqEk.js';
|
|
3
3
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
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-
|
|
5
|
-
import { B as BackupListing } from './config-
|
|
4
|
+
import { f as TaskRecord, a as ChangeAnalysisBody, M as MemoryStatsResponse, m as CreateBackupBody, R as RestoreBackupBody, c as ImportResult, H as HttpIndexConfig, d as TaskListQuery, T as TaskListPage } from './tasks-qrJojgST.js';
|
|
5
|
+
import { B as BackupListing } from './config-DMwffLKn.js';
|
|
6
|
+
import { d as QuerySuggestionsSetting, e as QuerySuggestionsStatus, f as RecordQueryResult, c as QuerySuggestionsPreview, M as ManualQuerySuggestion } from './query-suggestions-CBYkrQ5T.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* This is the `fetch` implementation the client sends every request through.
|
|
@@ -162,11 +163,12 @@ interface AdminOperations {
|
|
|
162
163
|
*
|
|
163
164
|
* @param indexName - This names the index to stream.
|
|
164
165
|
* @param options - This sets the signal, the deadline, and the headers for
|
|
165
|
-
* this request.
|
|
166
|
+
* this request. Set `queryHistory` to add the index's popular query
|
|
167
|
+
* history, which holds raw searches, to the archive.
|
|
166
168
|
* @returns The stream holds the archive's bytes in the order that the server
|
|
167
169
|
* sends them.
|
|
168
170
|
*/
|
|
169
|
-
snapshot(indexName: string, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
|
|
171
|
+
snapshot(indexName: string, options?: RequestOptions & SnapshotOptions): Promise<ReadableStream<Uint8Array>>;
|
|
170
172
|
/**
|
|
171
173
|
* Uploads a snapshot archive and replaces the named index with the
|
|
172
174
|
* archive's contents. The method also accepts the single `.nrsl` file that
|
|
@@ -352,7 +354,7 @@ interface AdminOperations {
|
|
|
352
354
|
* this request.
|
|
353
355
|
* @returns The record is the task to follow, and it ends with any failure of
|
|
354
356
|
* the change, such as `ANALYSIS_CHANGE_REPLACED` when a later change replaces
|
|
355
|
-
* this one.
|
|
357
|
+
* this one or when a restore of the index is in flight.
|
|
356
358
|
*/
|
|
357
359
|
changeAnalysis(indexName: string, change: ChangeAnalysisBody, options?: RequestOptions): Promise<TaskRecord>;
|
|
358
360
|
/**
|
|
@@ -383,12 +385,13 @@ interface BackupOperations {
|
|
|
383
385
|
* @param indexName - This names the index to back up.
|
|
384
386
|
* @param backupName - This names the backup, with 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a
|
|
385
387
|
* letter or a digit.
|
|
386
|
-
* @param options - This sets the signal, the deadline, and the headers for this request.
|
|
388
|
+
* @param options - This sets the signal, the deadline, and the headers for this request. Set `queryHistory` to add
|
|
389
|
+
* every node's popular query suggestion history of the index, which holds raw searches, to the backup.
|
|
387
390
|
* @returns The record is the task to follow.
|
|
388
391
|
* @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
|
|
389
392
|
* reports `BACKUP_ALREADY_EXISTS` or `BACKUP_DURABILITY_REQUIRED` in its `error`.
|
|
390
393
|
*/
|
|
391
|
-
createBackup(indexName: string, backupName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
394
|
+
createBackup(indexName: string, backupName: string, options?: RequestOptions & Pick<CreateBackupBody, 'queryHistory'>): Promise<TaskRecord>;
|
|
392
395
|
/**
|
|
393
396
|
* Lists the backups under the cluster's key prefix, in name order.
|
|
394
397
|
*
|
|
@@ -786,6 +789,115 @@ interface IndexOperations {
|
|
|
786
789
|
close(indexName: string, options?: RequestOptions): Promise<void>;
|
|
787
790
|
}
|
|
788
791
|
|
|
792
|
+
/**
|
|
793
|
+
* These methods count searches and manage the popular query suggestions of an
|
|
794
|
+
* index on a server, as `querySuggestions(engine)` does on an engine.
|
|
795
|
+
*
|
|
796
|
+
* @public
|
|
797
|
+
*/
|
|
798
|
+
interface QuerySuggestionOperations {
|
|
799
|
+
/**
|
|
800
|
+
* Replaces the popular query suggestions setting of an index. Turning the
|
|
801
|
+
* feature off deletes the search history of the index on the server and
|
|
802
|
+
* keeps its suggestions indexes.
|
|
803
|
+
*
|
|
804
|
+
* @param indexName - The server replaces the setting of this index.
|
|
805
|
+
* @param setting - This is the new setting, whose omitted limits take their defaults.
|
|
806
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
807
|
+
* this request.
|
|
808
|
+
* @throws A `NarsilError` with `CONFIG_INVALID` when the setting breaks a
|
|
809
|
+
* limit, names a field the schema lacks, or turns the feature on for an index
|
|
810
|
+
* with device sync on or for a server without a key.
|
|
811
|
+
*/
|
|
812
|
+
updateQuerySuggestions(indexName: string, setting: QuerySuggestionsSetting, options?: RequestOptions): Promise<void>;
|
|
813
|
+
/**
|
|
814
|
+
* Reads the setting, the last build, the next scheduled build, and the
|
|
815
|
+
* suggestions indexes of an index.
|
|
816
|
+
*
|
|
817
|
+
* @param indexName - The server reports on this index.
|
|
818
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
819
|
+
* this request.
|
|
820
|
+
* @returns The status of the index.
|
|
821
|
+
*/
|
|
822
|
+
querySuggestionsStatus(indexName: string, options?: RequestOptions): Promise<QuerySuggestionsStatus>;
|
|
823
|
+
/**
|
|
824
|
+
* Counts one search that a person followed with a click. The server takes
|
|
825
|
+
* the person and the group from its `identify` function, so this request
|
|
826
|
+
* carries the search alone.
|
|
827
|
+
*
|
|
828
|
+
* @param indexName - The index that the person searched.
|
|
829
|
+
* @param query - The search, which the server normalises before it counts it.
|
|
830
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
831
|
+
* this request, such as the credentials that `identify` reads.
|
|
832
|
+
* @returns Whether the server counted the search, and why not where it didn't.
|
|
833
|
+
* @throws A `NarsilError` with `QUERY_SUGGESTIONS_NOT_ENABLED` when the index
|
|
834
|
+
* has the feature off or the server has no `identify` function.
|
|
835
|
+
*/
|
|
836
|
+
recordQuery(indexName: string, query: string, options?: RequestOptions): Promise<RecordQueryResult>;
|
|
837
|
+
/**
|
|
838
|
+
* Starts a build of the suggestions of an index. Follow the returned record
|
|
839
|
+
* with {@link TaskOperations.waitForTask}, whose `build` field reports the
|
|
840
|
+
* build once it ends.
|
|
841
|
+
*
|
|
842
|
+
* @param indexName - The server builds the suggestions of this index.
|
|
843
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
844
|
+
* this request.
|
|
845
|
+
* @returns The record of the task that runs the build.
|
|
846
|
+
*/
|
|
847
|
+
buildQuerySuggestions(indexName: string, options?: RequestOptions): Promise<TaskRecord>;
|
|
848
|
+
/**
|
|
849
|
+
* Lists the phrases that enough people searched for, before the result
|
|
850
|
+
* checks of a build run.
|
|
851
|
+
*
|
|
852
|
+
* @param indexName - The source index.
|
|
853
|
+
* @param limit - The most phrases to list, from 1 to 1,000. Defaults to 100.
|
|
854
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
855
|
+
* this request.
|
|
856
|
+
* @returns The phrases, most counted first.
|
|
857
|
+
*/
|
|
858
|
+
previewQuerySuggestions(indexName: string, limit?: number, options?: RequestOptions): Promise<QuerySuggestionsPreview>;
|
|
859
|
+
/**
|
|
860
|
+
* Reads the ban list of an index.
|
|
861
|
+
*
|
|
862
|
+
* @param indexName - The source index.
|
|
863
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
864
|
+
* this request.
|
|
865
|
+
* @returns The banned phrases in their normal form.
|
|
866
|
+
*/
|
|
867
|
+
readQueryBans(indexName: string, options?: RequestOptions): Promise<string[]>;
|
|
868
|
+
/**
|
|
869
|
+
* Replaces the ban list of an index, and removes each newly banned phrase
|
|
870
|
+
* from every suggestions index of the index before it answers.
|
|
871
|
+
*
|
|
872
|
+
* @param indexName - The source index.
|
|
873
|
+
* @param bans - At most 1,000 phrases, which the server normalises.
|
|
874
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
875
|
+
* this request.
|
|
876
|
+
* @returns The stored ban list.
|
|
877
|
+
*/
|
|
878
|
+
replaceQueryBans(indexName: string, bans: string[], options?: RequestOptions): Promise<string[]>;
|
|
879
|
+
/**
|
|
880
|
+
* Bans a phrase and removes it from every suggestions index of an index.
|
|
881
|
+
*
|
|
882
|
+
* @param indexName - The source index.
|
|
883
|
+
* @param query - The phrase, which the server normalises.
|
|
884
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
885
|
+
* this request.
|
|
886
|
+
* @returns The number of suggestions indexes that held the phrase.
|
|
887
|
+
*/
|
|
888
|
+
removeQuery(indexName: string, query: string, options?: RequestOptions): Promise<number>;
|
|
889
|
+
/**
|
|
890
|
+
* Adds a suggestion by hand, which a build leaves in place.
|
|
891
|
+
*
|
|
892
|
+
* @param indexName - The source index.
|
|
893
|
+
* @param suggestion - The group, the phrase, and its count.
|
|
894
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
895
|
+
* this request.
|
|
896
|
+
* @returns The name of the suggestions index that holds the phrase.
|
|
897
|
+
*/
|
|
898
|
+
addManualSuggestion(indexName: string, suggestion: ManualQuerySuggestion, options?: RequestOptions): Promise<string>;
|
|
899
|
+
}
|
|
900
|
+
|
|
789
901
|
/**
|
|
790
902
|
* These methods search an index over HTTP.
|
|
791
903
|
*
|
|
@@ -937,6 +1049,76 @@ interface ServerOperations {
|
|
|
937
1049
|
isReady(options?: RequestOptions): Promise<boolean>;
|
|
938
1050
|
}
|
|
939
1051
|
|
|
1052
|
+
/**
|
|
1053
|
+
* Where a download of the published snapshot carries on from, which
|
|
1054
|
+
* {@link SyncSettingOperations.syncSnapshot} takes.
|
|
1055
|
+
*
|
|
1056
|
+
* @public
|
|
1057
|
+
*/
|
|
1058
|
+
interface SyncSnapshotResume {
|
|
1059
|
+
/** The download carries on from this byte of the archive. */
|
|
1060
|
+
offset: number;
|
|
1061
|
+
/** The earlier part of the download carried this entity tag, which the server compares with the current one. */
|
|
1062
|
+
entityTag: string;
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* One download of the published snapshot of an index.
|
|
1066
|
+
*
|
|
1067
|
+
* @public
|
|
1068
|
+
*/
|
|
1069
|
+
interface SyncSnapshotDownload {
|
|
1070
|
+
/** The archive carries this entity tag, 64 lowercase hexadecimal digits, which changes with each new snapshot. */
|
|
1071
|
+
entityTag: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* The stream starts at this byte of the archive. It is 0 where the server
|
|
1074
|
+
* published a new snapshot after the earlier part, so the caller starts
|
|
1075
|
+
* again from the first byte.
|
|
1076
|
+
*/
|
|
1077
|
+
offset: number;
|
|
1078
|
+
/** The whole archive holds this many bytes. */
|
|
1079
|
+
totalBytes: number;
|
|
1080
|
+
/** The bytes of the archive from `offset` to its end. */
|
|
1081
|
+
stream: ReadableStream<Uint8Array>;
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* These methods read and replace the device sync setting of an index, as
|
|
1085
|
+
* {@link SyncOperations} does on the engine.
|
|
1086
|
+
*
|
|
1087
|
+
* @public
|
|
1088
|
+
*/
|
|
1089
|
+
interface SyncSettingOperations {
|
|
1090
|
+
/**
|
|
1091
|
+
* Replaces the device sync setting of an index. Turning sync on gives the
|
|
1092
|
+
* index a new epoch, and turning it off deletes the published snapshot and
|
|
1093
|
+
* the history and closes every feed of the index.
|
|
1094
|
+
*
|
|
1095
|
+
* @param indexName - The server replaces the setting of this index.
|
|
1096
|
+
* @param setting - This is the new setting.
|
|
1097
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
1098
|
+
* this request.
|
|
1099
|
+
* @throws A `NarsilError` with `SYNC_DURABILITY_REQUIRED` when the server's
|
|
1100
|
+
* engine has no write-ahead log durability, and with `CONFIG_INVALID` when a
|
|
1101
|
+
* history limit is not a positive whole number.
|
|
1102
|
+
*/
|
|
1103
|
+
updateSync(indexName: string, setting: SyncSetting, options?: RequestOptions): Promise<void>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Downloads the published snapshot of an index with device sync on, or the
|
|
1106
|
+
* rest of it from where an earlier download stopped. The archive restores
|
|
1107
|
+
* through {@link Narsil.restore} like any other snapshot archive.
|
|
1108
|
+
*
|
|
1109
|
+
* @param indexName - The server sends the snapshot of this index.
|
|
1110
|
+
* @param resume - Where an earlier download of the same snapshot stopped.
|
|
1111
|
+
* @param options - This sets the signal, the deadline, and the headers for
|
|
1112
|
+
* this request.
|
|
1113
|
+
* @returns The stream, the byte it starts from, the archive's length, and
|
|
1114
|
+
* its entity tag.
|
|
1115
|
+
* @throws A `NarsilError` with `SYNC_NOT_ENABLED` when the index has sync
|
|
1116
|
+
* off, and with `SYNC_SNAPSHOT_PREPARING` while a cluster node takes the
|
|
1117
|
+
* backup that the snapshot needs.
|
|
1118
|
+
*/
|
|
1119
|
+
syncSnapshot(indexName: string, resume?: SyncSnapshotResume, options?: RequestOptions): Promise<SyncSnapshotDownload>;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
940
1122
|
/**
|
|
941
1123
|
* These settings say how {@link TaskOperations.waitForTask} follows a task.
|
|
942
1124
|
*
|
|
@@ -1043,7 +1225,7 @@ interface TaskOperations {
|
|
|
1043
1225
|
*
|
|
1044
1226
|
* @public
|
|
1045
1227
|
*/
|
|
1046
|
-
interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, BackupOperations, ServerOperations {
|
|
1228
|
+
interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, BackupOperations, ServerOperations, SyncSettingOperations, QuerySuggestionOperations {
|
|
1047
1229
|
}
|
|
1048
1230
|
/**
|
|
1049
1231
|
* Builds a client for one Narsil server, or for a list of them that it moves
|
|
@@ -1064,4 +1246,4 @@ interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperatio
|
|
|
1064
1246
|
*/
|
|
1065
1247
|
declare function createNarsilClient(options: NarsilClientOptions): NarsilClient;
|
|
1066
1248
|
|
|
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,
|
|
1249
|
+
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 QuerySuggestionOperations as Q, 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, type SyncSettingOperations as f, type SyncSnapshotDownload as g, type SyncSnapshotResume as h, createNarsilClient as i };
|