@delali/narsil 0.3.1-next.69 → 0.3.1-next.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{capabilities-B1wz2Zl0.d.ts → capabilities-Dt-7B4Wz.d.ts} +2 -2
  2. package/dist/{chunk-DD5X23E6.mjs → chunk-2STVUTNA.mjs} +1 -1
  3. package/dist/chunk-3JGWULDF.mjs +256 -0
  4. package/dist/{chunk-6TGZG2TV.mjs → chunk-653BNMAF.mjs} +190 -58
  5. package/dist/{chunk-YA52AC2V.mjs → chunk-FVLQ63B7.mjs} +203 -9
  6. package/dist/{chunk-5JLSTECC.mjs → chunk-GIVAGD3Q.mjs} +1 -1
  7. package/dist/{chunk-AV4IJKD2.mjs → chunk-HWQLTLNG.mjs} +18 -1
  8. package/dist/{chunk-6IT3MH5M.mjs → chunk-IOR2K26O.mjs} +178 -238
  9. package/dist/{chunk-4VU5TWCR.mjs → chunk-LMO5TJUS.mjs} +40 -35
  10. package/dist/{chunk-BEWOA4VV.mjs → chunk-M76V3OGJ.mjs} +508 -401
  11. package/dist/{chunk-YMZCMH5M.mjs → chunk-OI42GWLR.mjs} +17 -1
  12. package/dist/{chunk-2BDG2IWP.mjs → chunk-P4DSQ6M4.mjs} +16 -6
  13. package/dist/{chunk-THYRHHO2.mjs → chunk-YJDQ7NLA.mjs} +1 -1
  14. package/dist/{client-xVrOCYTW.d.ts → client-COek5GXK.d.ts} +3 -3
  15. package/dist/client.d.ts +8 -8
  16. package/dist/{config-CEeSV_Xo.d.ts → config-Dfanyqqt.d.ts} +2 -2
  17. package/dist/{config-CSvCVtB7.d.ts → config-rBpbgTw8.d.ts} +2 -2
  18. package/dist/direct-executor-GYJEKNV5.mjs +12 -0
  19. package/dist/distribution/coordinator/etcd.d.ts +2 -2
  20. package/dist/distribution/coordinator/etcd.mjs +1 -1
  21. package/dist/distribution/coordinator/in-memory.d.ts +2 -2
  22. package/dist/distribution/coordinator/in-memory.mjs +1 -1
  23. package/dist/distribution.d.ts +8 -8
  24. package/dist/distribution.mjs +109 -69
  25. package/dist/{engine-77ErLy8P.d.ts → engine-igk0aMpQ.d.ts} +109 -60
  26. package/dist/index.browser.mjs +1167 -749
  27. package/dist/index.d.ts +7 -7
  28. package/dist/index.mjs +10 -10
  29. package/dist/invalidation/filesystem.mjs +1 -1
  30. package/dist/{memory-CKF-9WLP.d.ts → memory-C7UMCMH3.d.ts} +35 -17
  31. package/dist/persistence/durability/checkpoint-worker.d.ts +2 -1
  32. package/dist/persistence/durability/checkpoint-worker.mjs +10 -10
  33. package/dist/react.d.ts +277 -182
  34. package/dist/react.mjs +189 -45
  35. package/dist/{schema-d5Afu03A.d.ts → schema-Bgzr4g7b.d.ts} +62 -10
  36. package/dist/server.d.ts +10 -10
  37. package/dist/server.mjs +11 -7
  38. package/dist/{tasks-BEiNxDRs.d.ts → tasks-BZt_zes6.d.ts} +3 -1
  39. package/dist/{thread-FLP45EUD.mjs → thread-JEVAYETR.mjs} +6 -6
  40. package/dist/{types-DAK7mnUZ.d.ts → types-gOUqhs2F.d.ts} +1 -1
  41. package/dist/vector/search-worker.d.ts +1 -1
  42. package/dist/vector/search-worker.mjs +2 -2
  43. package/dist/workers/entry.mjs +3 -3
  44. package/package.json +7 -7
  45. package/dist/chunk-VTPLKNWI.mjs +0 -135
  46. package/dist/direct-executor-3ZYXSGFX.mjs +0 -12
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { b as StopWordOverride, C as CustomTokenizer } from './schema-d5Afu03A.js';
2
- export { A as AnyDocument, B as BM25Params, E as EmbeddingFieldConfig, F as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, c as ScoringMode, V as VectorIndexConfig, d as VectorQuantizationMode, e as VectorStorageMode, W as WriteOptions } from './schema-d5Afu03A.js';
1
+ import { b as StopWordOverride, C as CustomTokenizer } from './schema-Bgzr4g7b.js';
2
+ export { A as AnyDocument, B as BM25Params, E as EmbeddingFieldConfig, F as FieldOptionChain, c as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, d as ScoringMode, T as TextFieldOption, V as VectorIndexConfig, e as VectorQuantizationMode, f as VectorStorageMode, W as WriteOptions } from './schema-Bgzr4g7b.js';
3
3
  import { L as LanguageModule } from './language-DB8KG1z5.js';
4
4
  export { T as TokenizerConfig } from './language-DB8KG1z5.js';
5
- export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, l as ComparisonFilter, D as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, m as FacetResult, n as FieldFilter, o as FilterExpression, G as GeoFilter, p as GeoPolygonFilter, q as GeoRadiusFilter, r as GroupConfig, s as GroupReducer, t as GroupResult, H as HighlightConfig, u as HighlightMatch, v as Hit, w as HybridConfig, I as IndexInfo, f as IndexStats, L as ListParams, g as ListResult, x as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, P as PartitionStatsResult, h as PreflightResult, y as PresenceFilter, z as ProcessMemoryReport, J as QueryCoverage, Q as QueryParams, e as QueryResult, K as ScoreComponents, O as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, R as SortField, T as SortSpec, U as StringFilter, j as SuggestParams, k as SuggestResult, W as TermMatchPolicy, V as VectorMaintenanceResult, X as VectorQueryConfig, Y as WorkerCopyReport, i as isNarsilError } from './memory-CKF-9WLP.js';
6
- import { N as NarsilConfig } from './config-CEeSV_Xo.js';
7
- export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-CEeSV_Xo.js';
8
- import { a as Narsil } from './engine-77ErLy8P.js';
9
- export { D as DocumentWriteOperations, I as IndexLifecycleOperations, N as NarsilEventMap } from './engine-77ErLy8P.js';
5
+ export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, l as ComparisonFilter, D as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, m as FacetResult, n as FieldFilter, o as FilterExpression, G as GeoFilter, p as GeoPolygonFilter, q as GeoRadiusFilter, r as GroupConfig, s as GroupReducer, t as GroupResult, H as HighlightConfig, u as HighlightMatch, v as Hit, w as HybridConfig, I as IndexInfo, f as IndexStats, L as ListParams, g as ListResult, x as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, P as PartitionStatsResult, h as PreflightResult, y as PresenceFilter, z as ProcessMemoryReport, J as QueryCoverage, Q as QueryParams, e as QueryResult, K as ScoreComponents, O as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, R as SortField, T as SortSpec, U as StringFilter, j as SuggestParams, k as SuggestResult, W as TermMatchPolicy, V as VectorMaintenanceResult, X as VectorQueryConfig, Y as WorkerCopyReport, i as isNarsilError } from './memory-C7UMCMH3.js';
6
+ import { N as NarsilConfig } from './config-Dfanyqqt.js';
7
+ export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-Dfanyqqt.js';
8
+ import { a as Narsil } from './engine-igk0aMpQ.js';
9
+ export { D as DocumentWriteOperations, I as IndexLifecycleOperations, N as NarsilEventMap } from './engine-igk0aMpQ.js';
10
10
  export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter } from './adapters-79OIa4xm.js';
11
11
  export { i as isSimdAvailable } from './simd-DW5AtJ6B.js';
12
12
 
package/dist/index.mjs CHANGED
@@ -1,19 +1,19 @@
1
- export { VERSION, createNarsil } from './chunk-6IT3MH5M.mjs';
1
+ export { VERSION, createNarsil } from './chunk-IOR2K26O.mjs';
2
2
  import './chunk-GCM3JFVA.mjs';
3
- import './chunk-YA52AC2V.mjs';
4
- export { getLanguage, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerStopWords, registerTokenizer } from './chunk-BEWOA4VV.mjs';
5
- import './chunk-AV4IJKD2.mjs';
6
- import './chunk-2BDG2IWP.mjs';
7
- import './chunk-5JLSTECC.mjs';
8
- export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-4VU5TWCR.mjs';
9
- import './chunk-6TGZG2TV.mjs';
3
+ import './chunk-FVLQ63B7.mjs';
4
+ export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-M76V3OGJ.mjs';
5
+ export { getLanguage, registerLanguage } from './chunk-HWQLTLNG.mjs';
6
+ import './chunk-P4DSQ6M4.mjs';
7
+ import './chunk-GIVAGD3Q.mjs';
8
+ export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-LMO5TJUS.mjs';
9
+ import './chunk-653BNMAF.mjs';
10
10
  import './chunk-TGP5M5R7.mjs';
11
- export { isSimdAvailable } from './chunk-THYRHHO2.mjs';
11
+ export { isSimdAvailable } from './chunk-YJDQ7NLA.mjs';
12
12
  import './chunk-ZJ4CSAB2.mjs';
13
13
  import './chunk-YNVIUGF5.mjs';
14
14
  import './chunk-3L4U6EJQ.mjs';
15
15
  import './chunk-IFBKLBGB.mjs';
16
16
  import './chunk-U2BKYEC7.mjs';
17
- import './chunk-YMZCMH5M.mjs';
17
+ import './chunk-OI42GWLR.mjs';
18
18
  import './chunk-POWOTUKJ.mjs';
19
19
  export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-USKFU7J5.mjs';
@@ -1,4 +1,4 @@
1
- import { compareCodePoints } from '../chunk-YMZCMH5M.mjs';
1
+ import { compareCodePoints } from '../chunk-OI42GWLR.mjs';
2
2
  import { DEFAULT_POLL_INTERVAL_MS, MARKER_MAX_AGE_MS } from '../chunk-YEO6G2NG.mjs';
3
3
 
4
4
  // src/invalidation/filesystem.ts
@@ -1,4 +1,4 @@
1
- import { A as AnyDocument, S as SchemaDefinition, c as ScoringMode } from './schema-d5Afu03A.js';
1
+ import { A as AnyDocument, S as SchemaDefinition, d as ScoringMode } from './schema-Bgzr4g7b.js';
2
2
 
3
3
  /**
4
4
  * Every code a {@link NarsilError} carries, grouped by the part of the engine
@@ -593,19 +593,36 @@ type ComparisonFilter = {
593
593
  between?: [number, number];
594
594
  };
595
595
  /**
596
- * Everything {@link ComparisonFilter} offers, with the set and prefix tests a
597
- * string field also supports.
596
+ * The engine tests a text field against this filter for equality, for a text
597
+ * range, or with the set and prefix tests.
598
598
  *
599
- * On a `string[]` field, the engine compares each element of the list, so
600
- * `eq`, `in`, `startsWith`, and `endsWith` match a document where one element
601
- * matches, and `ne` and `nin` match a document where no element matches.
599
+ * The engine compares each element of a `string[]` or `verbatim[]` field, so
600
+ * it matches a document with `eq`, `in`, `startsWith`, or `endsWith` where
601
+ * one element passes the test, while it matches a document with `ne` or `nin`
602
+ * where every element differs from the values.
603
+ *
604
+ * The engine applies the range tests `gt`, `gte`, `lt`, `lte`, and `between`
605
+ * to a single `string` or `verbatim` field whose type includes `sortable`,
606
+ * while it throws `SEARCH_INVALID_FILTER` for a text range on any other field.
607
+ * It orders the values as a sort on the field does, comparing their case folds
608
+ * first and their raw code points only where the folds are equal.
602
609
  *
603
610
  * @public
604
611
  */
605
- type StringFilter = ComparisonFilter & {
612
+ type StringFilter = Pick<ComparisonFilter, 'eq' | 'ne'> & {
613
+ /** This matches a value that comes after the text in sort order. */
614
+ gt?: string;
615
+ /** This matches a value that comes before the text in sort order. */
616
+ lt?: string;
617
+ /** This matches a value equal to the text or after it in sort order. */
618
+ gte?: string;
619
+ /** This matches a value equal to the text or before it in sort order. */
620
+ lte?: string;
621
+ /** This matches a value inside the inclusive range in sort order, given as `[low, high]`. */
622
+ between?: [string, string];
606
623
  /** This matches a field equal to any value in the list. */
607
624
  in?: string[];
608
- /** This matches a field equal to none of the values in the list. */
625
+ /** This matches a field that differs from every value in the list. */
609
626
  nin?: string[];
610
627
  /** This matches a field starting with the text. */
611
628
  startsWith?: string;
@@ -915,15 +932,16 @@ interface QueryParams {
915
932
  /**
916
933
  * The engine sorts the hits by the values of these fields, in place of the
917
934
  * relevance ranking. Pass an object keyed by field, or a list of fields in
918
- * the order that the engine compares them. A sort can name a `number`,
919
- * `boolean`, `enum`, or `string:sortable` field, or a list field, which the
920
- * engine reduces to one value by the entry's `mode`. The engine throws
921
- * `SEARCH_INVALID_FIELD` for a sort on a plain `string`, a `geopoint`, or a
922
- * vector field, because ordering a plain string takes far more memory per
923
- * document than ordering a number, while the other two types have no order.
924
- * The engine orders hybrid results by fusion, so it throws
925
- * `SEARCH_INVALID_MODE` for a hybrid query that sets a sort, and it throws
926
- * the same code for a direction other than `asc` and `desc`.
935
+ * the order that the engine compares them. The engine sorts by a `number`,
936
+ * `boolean`, or `enum` field, by a text field whose type includes
937
+ * `sortable`, or by a list of any of these, which it reduces to one value by
938
+ * the entry's `mode`. It throws `SEARCH_INVALID_FIELD` for a sort on a
939
+ * `geopoint` or a vector field, because neither type has an order. It throws
940
+ * the same code for a sort on any other text field, since the engine keeps
941
+ * up to the first 512 code points of every document's value in memory to
942
+ * sort by a text field. The engine orders hybrid results by fusion, so it
943
+ * throws `SEARCH_INVALID_MODE` for a sort on a hybrid query. It also throws
944
+ * that code for a direction other than `asc` and `desc`.
927
945
  */
928
946
  sort?: SortSpec;
929
947
  /** These settings collapse the hits into groups by field value. */
@@ -1,4 +1,4 @@
1
- import { P as PartitionConfig, c as ScoringMode, V as VectorIndexConfig } from '../../schema-d5Afu03A.js';
1
+ import { P as PartitionConfig, d as ScoringMode, V as VectorIndexConfig } from '../../schema-Bgzr4g7b.js';
2
2
  import '../../adapters-79OIa4xm.js';
3
3
 
4
4
  interface IndexMetadata {
@@ -36,6 +36,7 @@ interface IndexMetadata {
36
36
  strict?: boolean;
37
37
  required?: string[];
38
38
  vectorPromotion?: VectorIndexConfig;
39
+ patternValueLimit?: number;
39
40
  }
40
41
  /** Persisted so recovery can restore field mappings and rebind the adapter by
41
42
  * name; the name is absent when the index was configured with a bare instance. */
@@ -1,20 +1,20 @@
1
- import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments } from '../../chunk-6IT3MH5M.mjs';
1
+ import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments } from '../../chunk-IOR2K26O.mjs';
2
2
  import '../../chunk-GCM3JFVA.mjs';
3
- import '../../chunk-YA52AC2V.mjs';
4
- import '../../chunk-BEWOA4VV.mjs';
5
- import '../../chunk-AV4IJKD2.mjs';
6
- import '../../chunk-2BDG2IWP.mjs';
7
- import '../../chunk-5JLSTECC.mjs';
8
- import '../../chunk-4VU5TWCR.mjs';
9
- import '../../chunk-6TGZG2TV.mjs';
3
+ import '../../chunk-FVLQ63B7.mjs';
4
+ import '../../chunk-M76V3OGJ.mjs';
5
+ import '../../chunk-HWQLTLNG.mjs';
6
+ import '../../chunk-P4DSQ6M4.mjs';
7
+ import '../../chunk-GIVAGD3Q.mjs';
8
+ import '../../chunk-LMO5TJUS.mjs';
9
+ import '../../chunk-653BNMAF.mjs';
10
10
  import '../../chunk-TGP5M5R7.mjs';
11
- import '../../chunk-THYRHHO2.mjs';
11
+ import '../../chunk-YJDQ7NLA.mjs';
12
12
  import '../../chunk-ZJ4CSAB2.mjs';
13
13
  import '../../chunk-YNVIUGF5.mjs';
14
14
  import '../../chunk-3L4U6EJQ.mjs';
15
15
  import '../../chunk-IFBKLBGB.mjs';
16
16
  import '../../chunk-U2BKYEC7.mjs';
17
- import '../../chunk-YMZCMH5M.mjs';
17
+ import '../../chunk-OI42GWLR.mjs';
18
18
  import '../../chunk-POWOTUKJ.mjs';
19
19
  import '../../chunk-USKFU7J5.mjs';
20
20