@infino-ai/infino 0.7.1 → 0.8.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.
Files changed (2) hide show
  1. package/infino/native.d.ts +22 -2
  2. package/package.json +7 -7
@@ -106,6 +106,18 @@ export interface FtsOptions {
106
106
  * batches still carry it).
107
107
  */
108
108
  stored?: boolean
109
+ /**
110
+ * BM25 term-frequency saturation, `> 0`; defaults to 1.2. Recorded
111
+ * with the table, and the stored score bounds are built with it,
112
+ * so a search that does not override it pays nothing. Pass with
113
+ * `b` or not at all.
114
+ */
115
+ k1?: number
116
+ /**
117
+ * BM25 length normalization, in `[0, 1]`; defaults to 0.75. Pass
118
+ * with `k1` or not at all.
119
+ */
120
+ b?: number
109
121
  }
110
122
  /**
111
123
  * Open (or create) a catalog rooted at `uri` (local dir, `memory://`, or
@@ -129,7 +141,7 @@ export declare class IndexSpec {
129
141
  constructor()
130
142
  /**
131
143
  * Mark `column` (a UTF-8 string column) as full-text indexed,
132
- * with optional per-column `options` (analyzer, stored).
144
+ * with optional per-column `options` (analyzer, stored, k1/b).
133
145
  */
134
146
  fts(column: string, options?: FtsOptions | undefined | null): IndexSpec
135
147
  /**
@@ -188,8 +200,16 @@ export declare class Table {
188
200
  * `["_id", "score"]` for just id + score, or omit for full rows.
189
201
  * `score` is a similarity (higher is better) — opposite direction
190
202
  * from `vectorSearch`'s distance. Fuse with `hybridSearch`.
203
+ *
204
+ * `k1` / `b` override the columns' declared BM25 similarity
205
+ * parameters for this search only — pass both or neither. The
206
+ * stored score bounds belong to the declared pair, so the reader
207
+ * corrects them for the difference: results stay exact and only
208
+ * pruning power is traded, and nothing is rebuilt. A pair you mean
209
+ * to keep belongs on the column (`IndexSpec.fts`), where the
210
+ * bounds are built with it and the correction disappears.
191
211
  */
192
- bm25Search(column: string, query: string, k: number, mode?: string | undefined | null, stats?: string | undefined | null, projection?: Array<string> | undefined | null): Buffer
212
+ bm25Search(column: string, query: string, k: number, mode?: string | undefined | null, stats?: string | undefined | null, projection?: Array<string> | undefined | null, k1?: number | undefined | null, b?: number | undefined | null): Buffer
193
213
  /**
194
214
  * Vector kNN over one vector column. `query` is a `Float32Array`
195
215
  * (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.7.1",
3
+ "version": "0.8.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.7.1",
86
- "infx-darwin-arm64": "0.7.1",
87
- "infx-linux-x64-gnu": "0.7.1",
88
- "infx-linux-arm64-gnu": "0.7.1",
89
- "infx-linux-x64-musl": "0.7.1",
90
- "infx-linux-arm64-musl": "0.7.1"
85
+ "infx-darwin-x64": "0.8.0",
86
+ "infx-darwin-arm64": "0.8.0",
87
+ "infx-linux-x64-gnu": "0.8.0",
88
+ "infx-linux-arm64-gnu": "0.8.0",
89
+ "infx-linux-x64-musl": "0.8.0",
90
+ "infx-linux-arm64-musl": "0.8.0"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@napi-rs/cli": "^2.18.0",