@infino-ai/infino 0.8.0 → 0.8.1
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 +9 -0
- package/infino/index.js +12 -0
- package/infino/native.d.ts +51 -2
- package/package.json +7 -7
package/infino/index.d.ts
CHANGED
|
@@ -157,6 +157,15 @@ export declare class Table {
|
|
|
157
157
|
* append == one commit.
|
|
158
158
|
*/
|
|
159
159
|
append(data: AppendData): void;
|
|
160
|
+
/**
|
|
161
|
+
* {@link append}, naming the source the rows came from. The superfiles
|
|
162
|
+
* this commit writes are keyed `data/<stem>-<uuid>.sf.parquet`, with the
|
|
163
|
+
* stem the key-safe form of `sourceName` (lowercase `[a-z0-9_]`), so a
|
|
164
|
+
* bucket listing shows where each came from. The table behaves exactly as
|
|
165
|
+
* after `append`; the name is a label on the object key. Not available on
|
|
166
|
+
* a hosted table.
|
|
167
|
+
*/
|
|
168
|
+
appendNamed(data: AppendData, sourceName: string): void;
|
|
160
169
|
/** Ranked BM25 search; rows as records (or an Arrow `Table`). `score` is a
|
|
161
170
|
* similarity (higher is better) — opposite direction from `vectorSearch`'s
|
|
162
171
|
* distance. Fuse with `hybridSearch`. */
|
package/infino/index.js
CHANGED
|
@@ -250,6 +250,18 @@ class Table {
|
|
|
250
250
|
const ipc = dataToIpc(data, () => this.schema());
|
|
251
251
|
guard(this.remote, () => this.inner.append(ipc));
|
|
252
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* {@link append}, naming the source the rows came from. The superfiles
|
|
255
|
+
* this commit writes are keyed `data/<stem>-<uuid>.sf.parquet`, with the
|
|
256
|
+
* stem the key-safe form of `sourceName` (lowercase `[a-z0-9_]`), so a
|
|
257
|
+
* bucket listing shows where each came from. The table behaves exactly as
|
|
258
|
+
* after `append`; the name is a label on the object key. Not available on
|
|
259
|
+
* a hosted table.
|
|
260
|
+
*/
|
|
261
|
+
appendNamed(data, sourceName) {
|
|
262
|
+
const ipc = dataToIpc(data, () => this.schema());
|
|
263
|
+
guard(this.remote, () => this.inner.appendNamed(ipc, sourceName));
|
|
264
|
+
}
|
|
253
265
|
bm25Search(column, query, k, opts = {}) {
|
|
254
266
|
const buf = guard(this.remote, () => this.inner.bm25Search(column, query, k, opts.mode, opts.stats, opts.projection));
|
|
255
267
|
return decode(buf, opts.arrow);
|
package/infino/native.d.ts
CHANGED
|
@@ -99,6 +99,46 @@ export interface FtsOptions {
|
|
|
99
99
|
* table and cannot be changed afterwards.
|
|
100
100
|
*/
|
|
101
101
|
analyzer?: string
|
|
102
|
+
/**
|
|
103
|
+
* Remove this column's stopwords — the very common words whose
|
|
104
|
+
* presence says almost nothing about what a document is about.
|
|
105
|
+
* `"english"` is the only set; omit for none (the default).
|
|
106
|
+
*
|
|
107
|
+
* Applies to both sides: the words leave the index and they leave
|
|
108
|
+
* a query, and each one removed leaves a hole in the token
|
|
109
|
+
* positions, so an exact phrase still knows the words it matched
|
|
110
|
+
* were not adjacent in the text. The trade is that once a word is
|
|
111
|
+
* not indexed, no query can find it — declare it on prose, not on
|
|
112
|
+
* short identifiers. Recorded with the table and unchangeable
|
|
113
|
+
* afterwards, since it decides what is in the index: the words it
|
|
114
|
+
* removed were never written, so changing it means re-ingesting
|
|
115
|
+
* from the source text. With `stored: false` that text is never
|
|
116
|
+
* kept, so the combination is permanent.
|
|
117
|
+
*/
|
|
118
|
+
stopwords?: string
|
|
119
|
+
/**
|
|
120
|
+
* Reduce this column's words to their stems, so a search for one
|
|
121
|
+
* inflection finds the others (`running`, `runs`, `run`).
|
|
122
|
+
* `"english"` is the only stemmer; omit for none (the default).
|
|
123
|
+
*
|
|
124
|
+
* Applies to both sides, like `stopwords`. The trade is precision:
|
|
125
|
+
* stemming conflates words a reader would not, and there is no way
|
|
126
|
+
* to ask for an unstemmed form on a stemmed column. Recorded with
|
|
127
|
+
* the table and unchangeable afterwards: a stem is not invertible
|
|
128
|
+
* — the index holds `run`, never the `running` it came from — so
|
|
129
|
+
* changing it means re-ingesting from the source text, and with
|
|
130
|
+
* `stored: false` that text is never kept, making the combination
|
|
131
|
+
* permanent.
|
|
132
|
+
*/
|
|
133
|
+
stemmer?: string
|
|
134
|
+
/**
|
|
135
|
+
* Record token positions, which is what exact phrase queries
|
|
136
|
+
* (`'"climate policy"'`) need. Default false: positions roughly
|
|
137
|
+
* double the column's index footprint, so they are a per-column
|
|
138
|
+
* opt-in. A column without them answers a phrase query with an
|
|
139
|
+
* error naming the column, never a silent bag-of-words fallback.
|
|
140
|
+
*/
|
|
141
|
+
positions?: boolean
|
|
102
142
|
/**
|
|
103
143
|
* Keep the raw text in the table (default true). `false` makes the
|
|
104
144
|
* column index-only: searchable, but the text is never stored, so
|
|
@@ -140,8 +180,9 @@ export declare function builderId(): string
|
|
|
140
180
|
export declare class IndexSpec {
|
|
141
181
|
constructor()
|
|
142
182
|
/**
|
|
143
|
-
* Mark `column` (a UTF-8 string column) as full-text indexed,
|
|
144
|
-
*
|
|
183
|
+
* Mark `column` (a UTF-8 string column) as full-text indexed, with
|
|
184
|
+
* optional per-column `options` (analyzer, stopwords, stemmer,
|
|
185
|
+
* positions, stored, k1/b).
|
|
145
186
|
*/
|
|
146
187
|
fts(column: string, options?: FtsOptions | undefined | null): IndexSpec
|
|
147
188
|
/**
|
|
@@ -193,6 +234,14 @@ export declare class Table {
|
|
|
193
234
|
* concatenated into one commit; an empty stream is a no-op.
|
|
194
235
|
*/
|
|
195
236
|
append(data: Buffer): void
|
|
237
|
+
/**
|
|
238
|
+
* `append`, naming the source the rows came from: the superfiles this
|
|
239
|
+
* commit writes are keyed `data/<stem>-<uuid>.sf.parquet`, with the stem
|
|
240
|
+
* the key-safe form of `sourceName` (lowercase `[a-z0-9_]`), so a bucket
|
|
241
|
+
* listing shows where each came from. The table behaves exactly as
|
|
242
|
+
* after `append`; the name is a label on the object key.
|
|
243
|
+
*/
|
|
244
|
+
appendNamed(data: Buffer, sourceName: string): void
|
|
196
245
|
/**
|
|
197
246
|
* BM25 search over one FTS column. Returns matching rows as an Arrow
|
|
198
247
|
* IPC `Buffer` (read with `tableFromIPC`). `mode` is `"or"` (default)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infino-ai/infino",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
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.8.
|
|
86
|
-
"infx-darwin-arm64": "0.8.
|
|
87
|
-
"infx-linux-x64-gnu": "0.8.
|
|
88
|
-
"infx-linux-arm64-gnu": "0.8.
|
|
89
|
-
"infx-linux-x64-musl": "0.8.
|
|
90
|
-
"infx-linux-arm64-musl": "0.8.
|
|
85
|
+
"infx-darwin-x64": "0.8.1",
|
|
86
|
+
"infx-darwin-arm64": "0.8.1",
|
|
87
|
+
"infx-linux-x64-gnu": "0.8.1",
|
|
88
|
+
"infx-linux-arm64-gnu": "0.8.1",
|
|
89
|
+
"infx-linux-x64-musl": "0.8.1",
|
|
90
|
+
"infx-linux-arm64-musl": "0.8.1"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@napi-rs/cli": "^2.18.0",
|