@delali/narsil 0.2.3-next.33 → 0.2.3-next.35
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 +2 -2
- package/dist/{chunk-C6VVLMRX.mjs → chunk-36ER4WCG.mjs} +1 -0
- package/dist/{chunk-MFFAJ2NR.mjs → chunk-GODECMDT.mjs} +1 -1
- package/dist/{chunk-TEAJO7CU.mjs → chunk-OOA7OBLA.mjs} +29 -3
- package/dist/{client-DQHB_swQ.d.ts → client-DAJ_UHOa.d.ts} +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/{config-ChZ7lfqc.d.ts → config-CzTJJili.d.ts} +1 -1
- package/dist/distribution/coordinator/etcd.d.ts +1 -1
- package/dist/distribution/coordinator/etcd.mjs +94 -15
- package/dist/distribution/coordinator/in-memory.d.ts +1 -1
- package/dist/distribution/coordinator/in-memory.mjs +10 -3
- package/dist/distribution/transport/grpc.mjs +2 -2
- package/dist/distribution/transport/in-memory.mjs +1 -1
- package/dist/distribution/transport/tcp.mjs +2 -2
- package/dist/distribution.d.ts +30 -6
- package/dist/distribution.mjs +1910 -1042
- package/dist/{engine-DScGlT2Z.d.ts → engine-DEtRLYpB.d.ts} +1 -1
- package/dist/index.browser.mjs +19 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +2 -2
- package/dist/react.d.ts +3 -3
- package/dist/{search-CQ-9bKxo.d.ts → search-Dt4dkzpf.d.ts} +24 -1
- package/dist/server.d.ts +2 -2
- package/dist/{types-Bfhhnh3G.d.ts → types-BhdINMtE.d.ts} +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
-
import { I as IndexInfo, f as IndexStats, P as PartitionStatsResult, B as BatchResult, L as ListParams, g as ListResult, Q as QueryParams, e as QueryResult, h as PreflightResult, i as SuggestParams, j as SuggestResult, M as MemoryStats, V as VectorMaintenanceResult } from './search-
|
|
2
|
+
import { I as IndexInfo, f as IndexStats, P as PartitionStatsResult, B as BatchResult, L as ListParams, g as ListResult, Q as QueryParams, e as QueryResult, h as PreflightResult, i as SuggestParams, j as SuggestResult, M as MemoryStats, V as VectorMaintenanceResult } from './search-Dt4dkzpf.js';
|
|
3
3
|
import { I as IndexConfig, A as AnyDocument, a as InsertOptions, P as PartitionConfig } from './schema-emTQfEiX.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.browser.mjs
CHANGED
|
@@ -22181,6 +22181,23 @@ function partitionsFor(manager, partitionIds) {
|
|
|
22181
22181
|
}
|
|
22182
22182
|
return partitions;
|
|
22183
22183
|
}
|
|
22184
|
+
function coverageFor(manager, partitionIds) {
|
|
22185
|
+
if (partitionIds === void 0) {
|
|
22186
|
+
return {
|
|
22187
|
+
totalPartitions: manager.partitionCount,
|
|
22188
|
+
queriedPartitions: manager.partitionCount,
|
|
22189
|
+
timedOutPartitions: 0,
|
|
22190
|
+
failedPartitions: 0
|
|
22191
|
+
};
|
|
22192
|
+
}
|
|
22193
|
+
const queriedPartitions = partitionsFor(manager, partitionIds).length;
|
|
22194
|
+
return {
|
|
22195
|
+
totalPartitions: partitionIds.length,
|
|
22196
|
+
queriedPartitions,
|
|
22197
|
+
timedOutPartitions: 0,
|
|
22198
|
+
failedPartitions: partitionIds.length - queriedPartitions
|
|
22199
|
+
};
|
|
22200
|
+
}
|
|
22184
22201
|
function partitionsForVectorSearch(manager, vecIndex, partitionIds) {
|
|
22185
22202
|
if (partitionIds === void 0) {
|
|
22186
22203
|
return void 0;
|
|
@@ -22642,7 +22659,8 @@ async function executeQuery(params, context) {
|
|
|
22642
22659
|
elapsed,
|
|
22643
22660
|
cursor: nextCursor,
|
|
22644
22661
|
facets,
|
|
22645
|
-
groups
|
|
22662
|
+
groups,
|
|
22663
|
+
coverage: coverageFor(manager, context.partitionIds)
|
|
22646
22664
|
};
|
|
22647
22665
|
}
|
|
22648
22666
|
async function executePreflight(params, context) {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { c as StopWordOverride, C as CustomTokenizer } from './schema-emTQfEiX.j
|
|
|
2
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, b as ScoringMode, V as VectorIndexConfig, d as VectorQuantizationMode } from './schema-emTQfEiX.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, k as ComparisonFilter, D as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, l as FacetResult, m as FieldFilter, n as FilterExpression, G as GeoFilter, o as GeoPolygonFilter, p as GeoRadiusFilter, q as GroupConfig, r as GroupReducer, s as GroupResult, H as HighlightConfig, t as HighlightMatch, u as Hit, v as HybridConfig, I as IndexInfo, f as IndexStats, L as ListParams, g as ListResult, w as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, P as PartitionStatsResult, h as PreflightResult, x as PresenceFilter, y as ProcessMemoryReport, Q as QueryParams, e as QueryResult,
|
|
6
|
-
import { N as NarsilConfig } from './config-
|
|
7
|
-
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as InsertContext, b as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, c as StaleAnalysis, U as UpdateContext, W as WorkerConfig, d as WorkerContext } from './config-
|
|
8
|
-
import { N as Narsil } from './engine-
|
|
9
|
-
export { a as NarsilEventMap } from './engine-
|
|
5
|
+
export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, k as ComparisonFilter, D as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, l as FacetResult, m as FieldFilter, n as FilterExpression, G as GeoFilter, o as GeoPolygonFilter, p as GeoRadiusFilter, q as GroupConfig, r as GroupReducer, s as GroupResult, H as HighlightConfig, t as HighlightMatch, u as Hit, v as HybridConfig, I as IndexInfo, f as IndexStats, L as ListParams, g as ListResult, w as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, P as PartitionStatsResult, h as PreflightResult, x as PresenceFilter, y as ProcessMemoryReport, z as QueryCoverage, Q as QueryParams, e as QueryResult, J as ScoreComponents, K as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, O as SortField, R as SortSpec, T as StringFilter, i as SuggestParams, j as SuggestResult, U as TermMatchPolicy, V as VectorMaintenanceResult, W as VectorQueryConfig } from './search-Dt4dkzpf.js';
|
|
6
|
+
import { N as NarsilConfig } from './config-CzTJJili.js';
|
|
7
|
+
export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as InsertContext, b as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, c as StaleAnalysis, U as UpdateContext, W as WorkerConfig, d as WorkerContext } from './config-CzTJJili.js';
|
|
8
|
+
import { N as Narsil } from './engine-DEtRLYpB.js';
|
|
9
|
+
export { a as NarsilEventMap } from './engine-DEtRLYpB.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
|
|
|
12
12
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-OOA7OBLA.mjs';
|
|
2
|
+
import './chunk-36ER4WCG.mjs';
|
|
3
3
|
export { clearNormalizationCache, configureNormalizationCache, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerStopWords, registerTokenizer, resetNormalizationCache } from './chunk-RO4EFWE6.mjs';
|
|
4
4
|
import './chunk-TGP5M5R7.mjs';
|
|
5
5
|
import './chunk-OBXS7OZM.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createDurableDirectory, writeSegmentedCheckpoint } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { createDurableDirectory, writeSegmentedCheckpoint } from '../../chunk-OOA7OBLA.mjs';
|
|
2
|
+
import '../../chunk-36ER4WCG.mjs';
|
|
3
3
|
import '../../chunk-RO4EFWE6.mjs';
|
|
4
4
|
import '../../chunk-TGP5M5R7.mjs';
|
|
5
5
|
import '../../chunk-OBXS7OZM.mjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { N as NarsilError, L as ListParams, g as ListResult, I as IndexInfo, f as IndexStats, Q as QueryParams, h as PreflightResult, e as QueryResult, i as SuggestParams, j as SuggestResult } from './search-
|
|
2
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes } from './search-
|
|
1
|
+
import { N as NarsilError, L as ListParams, g as ListResult, I as IndexInfo, f as IndexStats, Q as QueryParams, h as PreflightResult, e as QueryResult, i as SuggestParams, j as SuggestResult } from './search-Dt4dkzpf.js';
|
|
2
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes } from './search-Dt4dkzpf.js';
|
|
3
3
|
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-CnMLpfk-.js';
|
|
4
4
|
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-CnMLpfk-.js';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
import { N as NarsilClient, I as ImportSource } from './client-
|
|
6
|
+
import { N as NarsilClient, I as ImportSource } from './client-DAJ_UHOa.js';
|
|
7
7
|
import { A as AnyDocument } from './schema-emTQfEiX.js';
|
|
8
8
|
import './adapters-79OIa4xm.js';
|
|
9
9
|
|
|
@@ -229,6 +229,29 @@ interface QueryResult<T = AnyDocument> {
|
|
|
229
229
|
groups?: GroupResult[];
|
|
230
230
|
/** This turns true when the index's terms came from an older analysis than its language module produces now. */
|
|
231
231
|
analysisStale?: boolean;
|
|
232
|
+
/** The search read this much of the index, which is how you spot a degraded answer. */
|
|
233
|
+
coverage: QueryCoverage;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* How much of an index one search read, which is what you check before you
|
|
237
|
+
* trust a count or a ranking.
|
|
238
|
+
*
|
|
239
|
+
* An embedded engine reads every partition it holds, so `queriedPartitions`
|
|
240
|
+
* matches `totalPartitions` there and the other two stay zero. A search across
|
|
241
|
+
* a cluster may find a node slow or unreachable, which it counts here while
|
|
242
|
+
* still returning the hits the other nodes gave it.
|
|
243
|
+
*
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
interface QueryCoverage {
|
|
247
|
+
/** The search should have read this many partitions. */
|
|
248
|
+
totalPartitions: number;
|
|
249
|
+
/** The search read this many of them. */
|
|
250
|
+
queriedPartitions: number;
|
|
251
|
+
/** The search counts a partition here when the node holding it took longer than the query allowed. */
|
|
252
|
+
timedOutPartitions: number;
|
|
253
|
+
/** The search counts a partition here when the node holding it returned an error, and when no active replica served it. */
|
|
254
|
+
failedPartitions: number;
|
|
232
255
|
}
|
|
233
256
|
/**
|
|
234
257
|
* One matching document, with the score that ranked it.
|
|
@@ -996,4 +1019,4 @@ interface ListParams {
|
|
|
996
1019
|
document?: DocumentProjection;
|
|
997
1020
|
}
|
|
998
1021
|
|
|
999
|
-
export { type ArrayFilter as A, type BatchResult as B, type ClientErrorCode as C, type DocumentProjection as D, type ErrorCode as E, type FacetConfig as F, type GeoFilter as G, type HighlightConfig as H, type IndexInfo as I, type
|
|
1022
|
+
export { type ArrayFilter as A, type BatchResult as B, type ClientErrorCode as C, type DocumentProjection as D, type ErrorCode as E, type FacetConfig as F, type GeoFilter as G, type HighlightConfig as H, type IndexInfo as I, type ScoreComponents as J, type SearchMode as K, type ListParams as L, type MemoryStats as M, NarsilError as N, type SortField as O, type PartitionStatsResult as P, type QueryParams as Q, type SortSpec as R, type ServerErrorCode as S, type StringFilter as T, type TermMatchPolicy as U, type VectorMaintenanceResult as V, type VectorQueryConfig as W, ClientErrorCodes as a, ErrorCodes as b, type NarsilErrorCode as c, ServerErrorCodes as d, type QueryResult as e, type IndexStats as f, type ListResult as g, type PreflightResult as h, type SuggestParams as i, type SuggestResult as j, type ComparisonFilter as k, type FacetResult as l, type FieldFilter as m, type FilterExpression as n, type GeoPolygonFilter as o, type GeoRadiusFilter as p, type GroupConfig as q, type GroupReducer as r, type GroupResult as s, type HighlightMatch as t, type Hit as u, type HybridConfig as v, type ListedDocument as w, type PresenceFilter as x, type ProcessMemoryReport as y, type QueryCoverage as z };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as ServerOptions, N as NarsilServer } from './options-BORJg5XB.js';
|
|
2
2
|
export { A as ASYNC_IMPORT_CAPABILITY, C as CorsOptions, E as ErrorEnvelope, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, c as RequestContext, d as RequestDenial, S as SERVER_CAPABILITIES, e as ServerLimits, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './options-BORJg5XB.js';
|
|
3
|
-
import { N as Narsil } from './engine-
|
|
3
|
+
import { N as Narsil } from './engine-DEtRLYpB.js';
|
|
4
4
|
import { h as TaskStore, e as TaskRecord, d as TaskProgress, b as ImportResult } from './tasks-CnMLpfk-.js';
|
|
5
5
|
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, i as CreateIndexRequest, H as HttpIndexConfig, I as ImportError, T as TaskListPage, c as TaskListQuery, f as TaskStatus, g as TaskType } from './tasks-CnMLpfk-.js';
|
|
6
|
-
export { d as ServerErrorCodes } from './search-
|
|
6
|
+
export { d as ServerErrorCodes } from './search-Dt4dkzpf.js';
|
|
7
7
|
import './adapters-79OIa4xm.js';
|
|
8
8
|
import './schema-emTQfEiX.js';
|
|
9
9
|
|
|
@@ -71,6 +71,8 @@ interface PartitionAssignment {
|
|
|
71
71
|
state: PartitionState;
|
|
72
72
|
/** This rises each time the primary changes, which is what makes a stale primary's writes detectable. */
|
|
73
73
|
primaryTerm: number;
|
|
74
|
+
/** The primary has acknowledged every sequence number up to here, so every in-sync replica holds them. */
|
|
75
|
+
commitPoint: number;
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
76
78
|
* How one index's partitions are spread across the cluster.
|
package/package.json
CHANGED