@infino-ai/infino 0.1.9 → 0.2.0

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/infino/index.d.ts CHANGED
@@ -7,6 +7,9 @@ export declare const BUILDER_ID: string;
7
7
  export type Metric = "cosine" | "l2sq" | "negdot";
8
8
  /** Boolean mode for multi-term FTS queries. */
9
9
  export type BoolMode = "or" | "and";
10
+ /** BM25 statistics scope: per-superfile IDF (default) or corpus-wide
11
+ * `"global"` IDF across superfiles. */
12
+ export type Bm25Stats = "per_superfile" | "global";
10
13
  /** A row from a query/search when not materializing to Arrow. */
11
14
  export type RowRecord = Record<string, unknown>;
12
15
  /** A plain `{ column: type }` schema descriptor for `createTable`. */
@@ -80,6 +83,8 @@ export interface OptimizeOptions {
80
83
  }
81
84
  export interface Bm25SearchOptions {
82
85
  mode?: BoolMode;
86
+ /** BM25 statistics scope: `"per_superfile"` (default) or `"global"`. */
87
+ stats?: Bm25Stats;
83
88
  /** Columns to return, e.g. `["_id", "score"]`; omit for full rows. */
84
89
  projection?: string[];
85
90
  arrow?: boolean;
package/infino/index.js CHANGED
@@ -208,7 +208,7 @@ class Table {
208
208
  this.inner.append(dataToIpc(data, () => this.schema()));
209
209
  }
210
210
  bm25Search(column, query, k, opts = {}) {
211
- const buf = this.inner.bm25Search(column, query, k, opts.mode, opts.projection);
211
+ const buf = this.inner.bm25Search(column, query, k, opts.mode, opts.stats, opts.projection);
212
212
  return decode(buf, opts.arrow);
213
213
  }
214
214
  vectorSearch(column, query, k, opts = {}) {
@@ -165,7 +165,7 @@ export declare class Table {
165
165
  * `score` is a similarity (higher is better) — opposite direction
166
166
  * from `vectorSearch`'s distance. Fuse with `hybridSearch`.
167
167
  */
168
- bm25Search(column: string, query: string, k: number, mode?: string | undefined | null, projection?: Array<string> | undefined | null): Buffer
168
+ bm25Search(column: string, query: string, k: number, mode?: string | undefined | null, stats?: string | undefined | null, projection?: Array<string> | undefined | null): Buffer
169
169
  /**
170
170
  * Vector kNN over one vector column. `query` is a `Float32Array`
171
171
  * (crosses by reference — no copy). Returns matching rows as an Arrow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infino-ai/infino",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "description": "Fast search on object storage — SQL, full-text, and vector search.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -82,12 +82,12 @@
82
82
  "apache-arrow": "^17"
83
83
  },
84
84
  "optionalDependencies": {
85
- "infx-darwin-x64": "0.1.9",
86
- "infx-darwin-arm64": "0.1.9",
87
- "infx-linux-x64-gnu": "0.1.9",
88
- "infx-linux-arm64-gnu": "0.1.9",
89
- "infx-linux-x64-musl": "0.1.9",
90
- "infx-linux-arm64-musl": "0.1.9"
85
+ "infx-darwin-x64": "0.2.0",
86
+ "infx-darwin-arm64": "0.2.0",
87
+ "infx-linux-x64-gnu": "0.2.0",
88
+ "infx-linux-arm64-gnu": "0.2.0",
89
+ "infx-linux-x64-musl": "0.2.0",
90
+ "infx-linux-arm64-musl": "0.2.0"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@napi-rs/cli": "^2.18.0",