@delali/narsil 0.1.10 → 0.1.12

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/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ArrayFilter, B as BatchResult, C as ComparisonFilter, E as ErrorCode, a as ErrorCodes, F as FacetConfig, b as FacetResult, c as FilterExpression, d as FlushConfig, G as GeoPolygonFilter, e as GeoRadiusFilter, f as GroupConfig, g as GroupReducer, h as GroupResult, H as HighlightConfig, i as HighlightMatch, j as Hit, k as HybridConfig, I as IndexContext, l as IndexInfo, m as IndexStats, n as InsertContext, M as MemoryStats, N as NarsilConfig, o as NarsilError, p as NarsilPlugin, P as PartitionContext, q as PartitionStatsResult, r as PreflightResult, s as PresenceFilter, t as ProcessMemoryReport, Q as QueryParams, u as QueryResult, R as RemoveContext, S as ScoreComponents, v as SearchContext, w as SearchMode, x as StringFilter, y as SuggestParams, z as SuggestResult, T as TermMatchPolicy, U as UpdateContext, V as VectorMaintenanceResult, D as VectorQueryConfig, W as WorkerConfig, J as WorkerContext } from './config-DX--2Owg.js';
1
+ export { A as ArrayFilter, B as BatchResult, C as ComparisonFilter, E as ErrorCode, a as ErrorCodes, F as FacetConfig, b as FacetResult, c as FilterExpression, d as FlushConfig, G as GeoPolygonFilter, e as GeoRadiusFilter, f as GroupConfig, g as GroupReducer, h as GroupResult, H as HighlightConfig, i as HighlightMatch, j as Hit, k as HybridConfig, I as IndexContext, l as IndexInfo, m as IndexStats, n as InsertContext, M as MemoryStats, N as NarsilConfig, o as NarsilError, p as NarsilPlugin, P as PartitionContext, q as PartitionStatsResult, r as PreflightResult, s as PresenceFilter, t as ProcessMemoryReport, Q as QueryParams, u as QueryResult, R as RemoveContext, S as ScoreComponents, v as SearchContext, w as SearchMode, x as StringFilter, y as SuggestParams, z as SuggestResult, T as TermMatchPolicy, U as UpdateContext, V as VectorMaintenanceResult, D as VectorQueryConfig, W as WorkerConfig, J as WorkerContext } from './config-CojEPOgS.js';
2
2
  import { L as LanguageModule } from './language-ONQ3iVDf.js';
3
- export { N as Narsil, a as NarsilEventMap, c as createNarsil } from './narsil-B3jKyXCr.js';
3
+ export { N as Narsil, a as NarsilEventMap, c as createNarsil } from './narsil-D-84Nvm4.js';
4
4
  export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, P as PartitionStatistics, b as PersistenceAdapter } from './adapters-Bo2JQg8b.js';
5
- export { A as AnyDocument, B as BM25Params, C as CustomTokenizer, E as EmbeddingFieldConfig, F as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, b as ScoringMode } from './schema-C3VhNvfw.js';
5
+ export { A as AnyDocument, B as BM25Params, C as CustomTokenizer, E as EmbeddingFieldConfig, F as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, b as ScoringMode } from './schema-DCgkO1j4.js';
6
6
 
7
7
  declare function configureNormalizationCache(maxSize: number): void;
8
8
  declare function clearNormalizationCache(): void;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { VERSION, createNarsil } from './chunk-CU6BVZEU.mjs';
2
- export { clearNormalizationCache, configureNormalizationCache, getLanguage, getNormalizationCacheSize, registerLanguage, resetNormalizationCache } from './chunk-Q4OVNESD.mjs';
1
+ export { VERSION, createNarsil } from './chunk-MEW7HD75.mjs';
2
+ export { clearNormalizationCache, configureNormalizationCache, getLanguage, getNormalizationCacheSize, registerLanguage, resetNormalizationCache } from './chunk-HMO6OMZ3.mjs';
3
3
  export { isSimdAvailable } from './chunk-S7RJJMHI.mjs';
4
4
  import './chunk-KMMJMDUA.mjs';
5
5
  import './chunk-TW6BXTOL.mjs';
@@ -1,5 +1,5 @@
1
- import { l as IndexInfo, m as IndexStats, q as PartitionStatsResult, B as BatchResult, Q as QueryParams, u as QueryResult, r as PreflightResult, y as SuggestParams, z as SuggestResult, M as MemoryStats, V as VectorMaintenanceResult, N as NarsilConfig } from './config-DX--2Owg.js';
2
- import { I as IndexConfig, A as AnyDocument, a as InsertOptions, P as PartitionConfig } from './schema-C3VhNvfw.js';
1
+ import { l as IndexInfo, m as IndexStats, q as PartitionStatsResult, B as BatchResult, Q as QueryParams, u as QueryResult, r as PreflightResult, y as SuggestParams, z as SuggestResult, M as MemoryStats, V as VectorMaintenanceResult, N as NarsilConfig } from './config-CojEPOgS.js';
2
+ import { I as IndexConfig, A as AnyDocument, a as InsertOptions, P as PartitionConfig } from './schema-DCgkO1j4.js';
3
3
  import { E as EmbeddingAdapter } from './adapters-Bo2JQg8b.js';
4
4
 
5
5
  type NarsilEventMap = {
@@ -15,6 +15,8 @@ interface IndexMetadata {
15
15
  quantization: string;
16
16
  }>;
17
17
  embedding?: IndexEmbeddingMetadata;
18
+ /** Persisted so recovered indexes keep collecting surface forms. */
19
+ surfaceForms?: boolean;
18
20
  }
19
21
  /** Persisted so recovery can restore field mappings and rebind the adapter by
20
22
  * name; the name is absent when the index was configured with a bare instance. */
@@ -1,5 +1,5 @@
1
- import { createDurableDirectory, writeSegmentedCheckpoint } from '../../chunk-CU6BVZEU.mjs';
2
- import '../../chunk-Q4OVNESD.mjs';
1
+ import { createDurableDirectory, writeSegmentedCheckpoint } from '../../chunk-MEW7HD75.mjs';
2
+ import '../../chunk-HMO6OMZ3.mjs';
3
3
  import '../../chunk-S7RJJMHI.mjs';
4
4
  import '../../chunk-KMMJMDUA.mjs';
5
5
  import '../../chunk-TW6BXTOL.mjs';
@@ -37,6 +37,11 @@ interface IndexConfig {
37
37
  strict?: boolean;
38
38
  embedding?: EmbeddingFieldConfig;
39
39
  required?: string[];
40
+ /**
41
+ * Return the words users typed from suggest() and prefix expansion
42
+ * instead of index stems, at an insert-throughput cost. Default false.
43
+ */
44
+ surfaceForms?: boolean;
40
45
  }
41
46
  interface BM25Params {
42
47
  k1?: number;
package/dist/server.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { N as Narsil } from './narsil-B3jKyXCr.js';
1
+ import { N as Narsil } from './narsil-D-84Nvm4.js';
2
2
  import { E as EmbeddingAdapter } from './adapters-Bo2JQg8b.js';
3
- import './config-DX--2Owg.js';
4
- import './schema-C3VhNvfw.js';
3
+ import './config-CojEPOgS.js';
4
+ import './schema-DCgkO1j4.js';
5
5
 
6
6
  /**
7
7
  * Context handed to {@link OnRequestHook} for every inbound request, captured
@@ -163,6 +163,7 @@ interface HttpIndexConfig {
163
163
  };
164
164
  stopWords?: string[];
165
165
  trackPositions?: boolean;
166
+ surfaceForms?: boolean;
166
167
  vectorPromotion?: Record<string, unknown>;
167
168
  strict?: boolean;
168
169
  embedding?: CreateIndexEmbedding;
package/dist/server.mjs CHANGED
@@ -586,6 +586,7 @@ function mapHttpIndexConfig(http) {
586
586
  if (http.defaultScoring !== void 0) config.defaultScoring = http.defaultScoring;
587
587
  if (http.bm25 !== void 0) config.bm25 = http.bm25;
588
588
  if (http.trackPositions !== void 0) config.trackPositions = http.trackPositions;
589
+ if (http.surfaceForms !== void 0) config.surfaceForms = http.surfaceForms === true;
589
590
  if (http.vectorPromotion !== void 0) config.vectorPromotion = http.vectorPromotion;
590
591
  if (http.strict !== void 0) config.strict = http.strict;
591
592
  if (http.required !== void 0) config.required = http.required;
@@ -1,4 +1,4 @@
1
- import { S as SchemaDefinition } from './schema-C3VhNvfw.js';
1
+ import { S as SchemaDefinition } from './schema-DCgkO1j4.js';
2
2
 
3
3
  type NodeRole = 'data' | 'coordinator' | 'controller';
4
4
  type PartitionState = 'UNASSIGNED' | 'INITIALISING' | 'ACTIVE' | 'MIGRATING' | 'DECOMMISSIONING';
@@ -15,7 +15,7 @@ async function setup() {
15
15
  } catch {
16
16
  parentPort = null;
17
17
  }
18
- const { createDirectExecutor } = await import('../direct-executor-6FOKJKLD.mjs');
18
+ const { createDirectExecutor } = await import('../direct-executor-E52FFGDE.mjs');
19
19
  const executor = createDirectExecutor();
20
20
  function buildErrorResponse(requestId, code, message) {
21
21
  return { type: "error", requestId, code, message };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delali/narsil",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "A distributed full-text search engine with cross-language portable binary format.",
6
6
  "author": "Delali (https://sondelali.com)",