@infino-ai/infino 0.1.8 → 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 +11 -0
- package/infino/index.js +9 -1
- package/infino/native.d.ts +1 -1
- package/package.json +7 -7
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;
|
|
@@ -193,6 +198,12 @@ export declare class Table {
|
|
|
193
198
|
export declare class Connection {
|
|
194
199
|
private inner;
|
|
195
200
|
constructor(inner: any);
|
|
201
|
+
/**
|
|
202
|
+
* Provision the database this connection targets. On the hosted service this
|
|
203
|
+
* registers the database (throws if it already exists); on a local backend the
|
|
204
|
+
* catalog root is the database, so it is a no-op success.
|
|
205
|
+
*/
|
|
206
|
+
createDatabase(): void;
|
|
196
207
|
/** Create a table from an apache-arrow `Schema` or `{ column: type }`. */
|
|
197
208
|
createTable(name: string, schema: arrow.Schema | SchemaDescriptor | Buffer, indexes: IndexSpec): Table;
|
|
198
209
|
openTable(name: string): Table;
|
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 = {}) {
|
|
@@ -263,6 +263,14 @@ class Connection {
|
|
|
263
263
|
constructor(inner) {
|
|
264
264
|
this.inner = inner;
|
|
265
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* Provision the database this connection targets. On the hosted service this
|
|
268
|
+
* registers the database (throws if it already exists); on a local backend the
|
|
269
|
+
* catalog root is the database, so it is a no-op success.
|
|
270
|
+
*/
|
|
271
|
+
createDatabase() {
|
|
272
|
+
this.inner.createDatabase();
|
|
273
|
+
}
|
|
266
274
|
/** Create a table from an apache-arrow `Schema` or `{ column: type }`. */
|
|
267
275
|
createTable(name, schema, indexes) {
|
|
268
276
|
return new Table(this.inner.createTable(name, schemaToIpc(schema), indexes));
|
package/infino/native.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
86
|
-
"infx-darwin-arm64": "0.
|
|
87
|
-
"infx-linux-x64-gnu": "0.
|
|
88
|
-
"infx-linux-arm64-gnu": "0.
|
|
89
|
-
"infx-linux-x64-musl": "0.
|
|
90
|
-
"infx-linux-arm64-musl": "0.
|
|
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",
|