@infino-ai/infino 0.11.21 → 0.11.23

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
@@ -262,6 +262,10 @@ export interface MatchOptions {
262
262
  projection?: string[];
263
263
  arrow?: boolean;
264
264
  }
265
+ export interface SortedSearchOptions extends MatchOptions {
266
+ /** Highest first; lowest first when omitted. */
267
+ descending?: boolean;
268
+ }
265
269
  export interface CountOptions {
266
270
  mode?: BoolMode;
267
271
  }
@@ -322,6 +326,13 @@ export declare class Table {
322
326
  arrow: true;
323
327
  }): arrow.Table;
324
328
  exactMatch(column: string, value: string, opts?: MatchOptions): RowRecord[];
329
+ /** The first `k` rows by one range-indexed `column`, highest first with
330
+ * `descending`; rows sharing a value come in `_id` order and rows without
331
+ * one last. Rows as records (or an Arrow `Table`), in that order. */
332
+ sortedSearch(column: string, k: number, opts: SortedSearchOptions & {
333
+ arrow: true;
334
+ }): arrow.Table;
335
+ sortedSearch(column: string, k: number, opts?: SortedSearchOptions): RowRecord[];
325
336
  /** Count rows matching a BM25 keyword `query` over `column`, without
326
337
  * fetching them. `mode` is `"or"` (default) or `"and"`. */
327
338
  count(column: string, query: string, opts?: CountOptions): number;
package/infino/index.js CHANGED
@@ -328,6 +328,10 @@ class Table {
328
328
  const buf = guard(this.remote, () => this.inner.exactMatch(column, value, opts.projection));
329
329
  return decode(buf, opts.arrow);
330
330
  }
331
+ sortedSearch(column, k, opts = {}) {
332
+ const buf = guard(this.remote, () => this.inner.sortedSearch(column, k, opts.descending, opts.projection));
333
+ return decode(buf, opts.arrow);
334
+ }
331
335
  /** Count rows matching a BM25 keyword `query` over `column`, without
332
336
  * fetching them. `mode` is `"or"` (default) or `"and"`. */
333
337
  count(column, query, opts = {}) {
@@ -391,6 +391,14 @@ export declare class Table {
391
391
  * columns (omit for full rows).
392
392
  */
393
393
  exactMatch(column: string, value: string, projection?: Array<string> | undefined | null): Buffer
394
+ /**
395
+ * The first `k` rows by one range-indexed `column`, lowest first, or
396
+ * highest first with `descending`; rows sharing a value come in `_id`
397
+ * order and rows without one last. Read from the column's range index.
398
+ * Returns Arrow rows in that order like [`Table::bm25_search`], with
399
+ * `score` = 0.0. `projection` selects columns (omit for `_id` + `score`).
400
+ */
401
+ sortedSearch(column: string, k: number, descending?: boolean | undefined | null, projection?: Array<string> | undefined | null): Buffer
394
402
  /**
395
403
  * Count rows matching a BM25 keyword `query` over `column`, without
396
404
  * fetching them. `mode` is `"or"` (default) or `"and"`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infino-ai/infino",
3
- "version": "0.11.21",
3
+ "version": "0.11.23",
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.11.21",
86
- "infx-darwin-arm64": "0.11.21",
87
- "infx-linux-x64-gnu": "0.11.21",
88
- "infx-linux-arm64-gnu": "0.11.21",
89
- "infx-linux-x64-musl": "0.11.21",
90
- "infx-linux-arm64-musl": "0.11.21"
85
+ "infx-darwin-x64": "0.11.23",
86
+ "infx-darwin-arm64": "0.11.23",
87
+ "infx-linux-x64-gnu": "0.11.23",
88
+ "infx-linux-arm64-gnu": "0.11.23",
89
+ "infx-linux-x64-musl": "0.11.23",
90
+ "infx-linux-arm64-musl": "0.11.23"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@napi-rs/cli": "^2.18.0",