@lancedb/lancedb 0.33.0 → 0.37.1-beta.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/CONTRIBUTING.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Contributing to LanceDB Typescript
2
2
 
3
3
  This document outlines the process for contributing to LanceDB Typescript.
4
- For general contribution guidelines, see [CONTRIBUTING.md](../CONTRIBUTING.md).
4
+ For general contribution guidelines, see [CONTRIBUTING.md](https://github.com/lancedb/lancedb/blob/main/CONTRIBUTING.md).
5
5
 
6
6
  ## Project layout
7
7
 
@@ -1,7 +1,8 @@
1
1
  import { Data, SchemaLike, TableLike } from "./arrow";
2
+ import { Table as ArrowTable } from "./arrow";
2
3
  import { EmbeddingFunctionConfig } from "./embedding/registry";
3
4
  import { Connection as LanceDbConnection } from "./native";
4
- import type { CreateNamespaceResponse, DescribeNamespaceResponse, DropNamespaceResponse, ListNamespacesResponse } from "./native";
5
+ import type { CreateNamespaceResponse, DescribeNamespaceResponse, DropNamespaceResponse, Job, JobDescription, JobInfo, ListNamespacesResponse } from "./native";
5
6
  export type { CreateNamespaceResponse, DescribeNamespaceResponse, DropNamespaceResponse, ListNamespacesResponse, };
6
7
  import { Table } from "./table";
7
8
  export interface CreateTableOptions {
@@ -333,6 +334,35 @@ export declare abstract class Connection {
333
334
  * `newNamespacePath` is omitted the table stays in `namespacePath`.
334
335
  */
335
336
  abstract renameTable(currentName: string, newName: string, options?: RenameTableOptions): Promise<void>;
337
+ /**
338
+ * A {@link Job} handle for a server-side job by id.
339
+ *
340
+ * The handle is constructed without a server round trip; an unknown id
341
+ * surfaces when the handle is used. Dropping the handle has no effect on
342
+ * the job itself.
343
+ */
344
+ abstract job(jobId: string): Job;
345
+ /** List server-side jobs across the database's tables. */
346
+ abstract listJobs(): Promise<JobInfo[]>;
347
+ /**
348
+ * Describe a single server-side job by id.
349
+ *
350
+ * Resolves to `null` when the server has no such job.
351
+ */
352
+ abstract getJob(jobId: string): Promise<JobDescription | null>;
353
+ /**
354
+ * Request cancellation of a server-side job by id.
355
+ *
356
+ * Resolves to true if the server accepted the cancellation, false if no
357
+ * such job exists. Cancelling an already-terminal job is a no-op success.
358
+ */
359
+ abstract cancelJob(jobId: string): Promise<boolean>;
360
+ /**
361
+ * The lifecycle event history of a server-side job, as an Arrow table.
362
+ *
363
+ * Lists history across all jobs when `jobId` is omitted.
364
+ */
365
+ abstract jobHistory(jobId?: string): Promise<ArrowTable>;
336
366
  }
337
367
  /** @hideconstructor */
338
368
  export declare class LocalConnection extends Connection {
@@ -364,6 +394,11 @@ export declare class LocalConnection extends Connection {
364
394
  createNamespace(namespacePath: string[], options?: Partial<CreateNamespaceOptions>): Promise<CreateNamespaceResponse>;
365
395
  dropNamespace(namespacePath: string[], options?: Partial<DropNamespaceOptions>): Promise<DropNamespaceResponse>;
366
396
  renameTable(currentName: string, newName: string, options?: RenameTableOptions): Promise<void>;
397
+ job(jobId: string): Job;
398
+ listJobs(): Promise<JobInfo[]>;
399
+ getJob(jobId: string): Promise<JobDescription | null>;
400
+ cancelJob(jobId: string): Promise<boolean>;
401
+ jobHistory(jobId?: string): Promise<ArrowTable>;
367
402
  }
368
403
  /**
369
404
  * Takes storage options and makes all the keys snake case.
@@ -4,6 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.LocalConnection = exports.Connection = void 0;
6
6
  exports.cleanseStorageOptions = cleanseStorageOptions;
7
+ const apache_arrow_1 = require("apache-arrow");
7
8
  const arrow_1 = require("./arrow");
8
9
  const arrow_2 = require("./arrow");
9
10
  const registry_1 = require("./embedding/registry");
@@ -191,6 +192,25 @@ class LocalConnection extends Connection {
191
192
  async renameTable(currentName, newName, options) {
192
193
  return this.inner.renameTable(currentName, newName, options?.namespacePath ?? [], options?.newNamespacePath);
193
194
  }
195
+ job(jobId) {
196
+ return this.inner.job(jobId);
197
+ }
198
+ async listJobs() {
199
+ return this.inner.listJobs();
200
+ }
201
+ async getJob(jobId) {
202
+ return this.inner.getJob(jobId);
203
+ }
204
+ async cancelJob(jobId) {
205
+ return this.inner.cancelJob(jobId);
206
+ }
207
+ async jobHistory(jobId) {
208
+ const buf = await this.inner.jobHistory(jobId);
209
+ if (buf.length === 0) {
210
+ return new arrow_2.Table();
211
+ }
212
+ return (0, apache_arrow_1.tableFromIPC)(buf);
213
+ }
194
214
  }
195
215
  exports.LocalConnection = LocalConnection;
196
216
  /**
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { instrumentLanceDbMetrics } from "./otel";
8
8
  export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
9
9
  export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
10
10
  export { Connection, CreateTableOptions, TableNamesOptions, OpenTableOptions, ListNamespacesOptions, CreateNamespaceOptions, DropNamespaceOptions, ListNamespacesResponse, CreateNamespaceResponse, DropNamespaceResponse, DescribeNamespaceResponse, RenameTableOptions, } from "./connection";
11
- export { Session } from "./native.js";
11
+ export { Job, JobDescription, JobFailureInfo, JobInfo, Session, } from "./native.js";
12
12
  export { ExecutableQuery, Query, QueryBase, VectorQuery, TakeQuery, AnalyzePlanDistributedMetrics, QueryExecutionOptions, ColumnOrdering, FullTextSearchOptions, RecordBatchIterator, FullTextQuery, MatchQuery, PhraseQuery, BoostQuery, MultiMatchQuery, BooleanQuery, FullTextQueryType, Operator, Occur, } from "./query";
13
13
  export { Index, IndexOptions, IvfPqOptions, IvfRqOptions, IvfFlatOptions, HnswPqOptions, HnswSqOptions, FtsOptions, BaseTokenizer, } from "./indices";
14
14
  export { Table, Branches, BranchColumnSummary, BranchColumnChange, BranchIndexSummary, BranchRowCountSummary, MergeBlocker, BranchDiff, MergePreview, MergeBranchResult, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, FtsToken, TokenizeTableOptions, LsmWriteSpec, ColumnAlteration, FieldMetadataUpdate, } from "./table";
@@ -39,6 +39,15 @@ export interface TokenizeOptions {
39
39
  stem?: boolean;
40
40
  /** Whether to remove stop words. */
41
41
  removeStopWords?: boolean;
42
+ /**
43
+ * Custom stop words that replace the built-in list for `language`.
44
+ *
45
+ * This option only affects tokenization when `removeStopWords` is true.
46
+ *
47
+ * `undefined` keeps the built-in language list. An empty array explicitly
48
+ * replaces it with no stop words.
49
+ */
50
+ customStopWords?: string[];
42
51
  /** Whether to fold ASCII characters. */
43
52
  asciiFolding?: boolean;
44
53
  /** N-gram minimum length. */
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-FileCopyrightText: Copyright The LanceDB Authors
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.packBits = exports.rerankers = exports.Scannable = exports.PermutationBuilder = exports.permutationBuilder = exports.embedding = exports.MergeInsertBuilder = exports.OAuthFlowType = exports.OAuthHeaderProvider = exports.StaticHeaderProvider = exports.HeaderProvider = exports.Branches = exports.Table = exports.Index = exports.Occur = exports.Operator = exports.FullTextQueryType = exports.BooleanQuery = exports.MultiMatchQuery = exports.BoostQuery = exports.PhraseQuery = exports.MatchQuery = exports.RecordBatchIterator = exports.TakeQuery = exports.VectorQuery = exports.QueryBase = exports.Query = exports.Session = exports.Connection = exports.VectorColumnOptions = exports.MakeArrowTableOptions = exports.makeArrowTable = exports.BranchContents = exports.TagContents = exports.Tags = exports.instrumentLanceDbMetrics = exports.NativeJsHeaderProvider = void 0;
5
+ exports.packBits = exports.rerankers = exports.Scannable = exports.PermutationBuilder = exports.permutationBuilder = exports.embedding = exports.MergeInsertBuilder = exports.OAuthFlowType = exports.OAuthHeaderProvider = exports.StaticHeaderProvider = exports.HeaderProvider = exports.Branches = exports.Table = exports.Index = exports.Occur = exports.Operator = exports.FullTextQueryType = exports.BooleanQuery = exports.MultiMatchQuery = exports.BoostQuery = exports.PhraseQuery = exports.MatchQuery = exports.RecordBatchIterator = exports.TakeQuery = exports.VectorQuery = exports.QueryBase = exports.Query = exports.Session = exports.Job = exports.Connection = exports.VectorColumnOptions = exports.MakeArrowTableOptions = exports.makeArrowTable = exports.BranchContents = exports.TagContents = exports.Tags = exports.instrumentLanceDbMetrics = exports.NativeJsHeaderProvider = void 0;
6
6
  exports.tokenize = tokenize;
7
7
  exports.connect = connect;
8
8
  exports.connectNamespace = connectNamespace;
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "VectorColumnOptions", { enumerable: true, get: f
27
27
  var connection_2 = require("./connection");
28
28
  Object.defineProperty(exports, "Connection", { enumerable: true, get: function () { return connection_2.Connection; } });
29
29
  var native_js_4 = require("./native.js");
30
+ Object.defineProperty(exports, "Job", { enumerable: true, get: function () { return native_js_4.Job; } });
30
31
  Object.defineProperty(exports, "Session", { enumerable: true, get: function () { return native_js_4.Session; } });
31
32
  var query_1 = require("./query");
32
33
  Object.defineProperty(exports, "Query", { enumerable: true, get: function () { return query_1.Query; } });
@@ -71,7 +72,7 @@ Object.defineProperty(exports, "packBits", { enumerable: true, get: function ()
71
72
  * {@link Index.fts}.
72
73
  */
73
74
  async function tokenize(query, options) {
74
- return await (0, native_js_1.tokenize)(query, options?.baseTokenizer, options?.language, options?.maxTokenLength, options?.lowercase, options?.stem, options?.removeStopWords, options?.asciiFolding, options?.ngramMinLength, options?.ngramMaxLength, options?.prefixOnly);
75
+ return await (0, native_js_1.tokenize)(query, options?.baseTokenizer, options?.language, options?.maxTokenLength, options?.lowercase, options?.stem, options?.removeStopWords, options?.customStopWords, options?.asciiFolding, options?.ngramMinLength, options?.ngramMaxLength, options?.prefixOnly);
75
76
  }
76
77
  async function connect(uriOrOptions, optionsOrSession, sessionOrHeaderProvider, headerProvider) {
77
78
  let uri;
package/dist/indices.d.ts CHANGED
@@ -504,6 +504,15 @@ export interface FtsOptions {
504
504
  * whether to remove stop words
505
505
  */
506
506
  removeStopWords?: boolean;
507
+ /**
508
+ * Custom stop words that replace the built-in list for `language`.
509
+ *
510
+ * This option only affects tokenization when `removeStopWords` is true.
511
+ *
512
+ * `undefined` keeps the built-in language list. An empty array explicitly
513
+ * replaces it with no stop words.
514
+ */
515
+ customStopWords?: string[];
507
516
  /**
508
517
  * whether to remove punctuation
509
518
  */
@@ -520,6 +529,13 @@ export interface FtsOptions {
520
529
  * whether to only index the prefix of the token for ngram tokenizer
521
530
  */
522
531
  prefixOnly?: boolean;
532
+ /**
533
+ * Number of documents per compressed posting block.
534
+ *
535
+ * The default is 128. Supported values are 128 and 256. A value of 256 uses
536
+ * the experimental FTS V3 format and may introduce breaking changes.
537
+ */
538
+ blockSize?: 128 | 256;
523
539
  }
524
540
  export declare class Index {
525
541
  private readonly inner;
package/dist/indices.js CHANGED
@@ -136,7 +136,7 @@ class Index {
136
136
  * You can combine filters with full text search.
137
137
  */
138
138
  static fts(options) {
139
- return new Index(native_1.Index.fts(options?.withPosition, options?.baseTokenizer, options?.language, options?.maxTokenLength, options?.lowercase, options?.stem, options?.removeStopWords, options?.asciiFolding, options?.ngramMinLength, options?.ngramMaxLength, options?.prefixOnly));
139
+ return new Index(native_1.Index.fts(options?.withPosition, options?.baseTokenizer, options?.language, options?.maxTokenLength, options?.lowercase, options?.stem, options?.removeStopWords, options?.customStopWords, options?.asciiFolding, options?.ngramMinLength, options?.ngramMaxLength, options?.prefixOnly, options?.blockSize));
140
140
  }
141
141
  /**
142
142
  *
package/dist/merge.d.ts CHANGED
@@ -57,17 +57,16 @@ export declare class MergeInsertBuilder {
57
57
  */
58
58
  useIndex(useIndex: boolean): MergeInsertBuilder;
59
59
  /**
60
- * Controls whether the merge uses the MemWAL LSM write path.
60
+ * Control MemWAL routing for this merge.
61
61
  *
62
62
  * By default (unset), a `mergeInsert` on a table with an LSM write spec is
63
- * routed through Lance's MemWAL shard writer, and a table without one uses
64
- * the standard path. Pass `false` to force the standard path even when a
65
- * spec is set. Pass `true` to require a spec — `mergeInsert` rejects if none
66
- * is installed.
63
+ * routed through Lance's MemWAL shard writer, and a table without one uses the
64
+ * standard path.
67
65
  *
68
- * @param useLsmWrite - Whether to use the LSM write path.
66
+ * @param enable - `true` forces MemWAL routing and errors if the table has no
67
+ * LSM write spec. `false` forces the standard write path even when a spec is set.
69
68
  */
70
- useLsmWrite(useLsmWrite: boolean): MergeInsertBuilder;
69
+ useLsm(enable: boolean): MergeInsertBuilder;
71
70
  /**
72
71
  * Controls how an LSM merge checks that its input targets a single shard.
73
72
  *
package/dist/merge.js CHANGED
@@ -69,18 +69,17 @@ class MergeInsertBuilder {
69
69
  return new MergeInsertBuilder(this.#native.useIndex(useIndex), this.#schema);
70
70
  }
71
71
  /**
72
- * Controls whether the merge uses the MemWAL LSM write path.
72
+ * Control MemWAL routing for this merge.
73
73
  *
74
74
  * By default (unset), a `mergeInsert` on a table with an LSM write spec is
75
- * routed through Lance's MemWAL shard writer, and a table without one uses
76
- * the standard path. Pass `false` to force the standard path even when a
77
- * spec is set. Pass `true` to require a spec — `mergeInsert` rejects if none
78
- * is installed.
75
+ * routed through Lance's MemWAL shard writer, and a table without one uses the
76
+ * standard path.
79
77
  *
80
- * @param useLsmWrite - Whether to use the LSM write path.
78
+ * @param enable - `true` forces MemWAL routing and errors if the table has no
79
+ * LSM write spec. `false` forces the standard write path even when a spec is set.
81
80
  */
82
- useLsmWrite(useLsmWrite) {
83
- return new MergeInsertBuilder(this.#native.useLsmWrite(useLsmWrite), this.#schema);
81
+ useLsm(enable) {
82
+ return new MergeInsertBuilder(this.#native.useLsm(enable), this.#schema);
84
83
  }
85
84
  /**
86
85
  * Controls how an LSM merge checks that its input targets a single shard.
package/dist/native.d.ts CHANGED
@@ -39,6 +39,31 @@ export declare class Connection {
39
39
  /** Drop table with the name. Or raise an error if the table does not exist. */
40
40
  dropTable(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
41
41
  dropAllTables(namespacePath?: Array<string> | undefined | null): Promise<void>
42
+ /**
43
+ * A `Job` handle for a server-side job by id.
44
+ *
45
+ * The handle is constructed without a server round trip; an unknown id
46
+ * surfaces when the handle is used.
47
+ */
48
+ job(jobId: string): Job
49
+ /** List server-side jobs across the database's tables. */
50
+ listJobs(): Promise<Array<JobInfo>>
51
+ /**
52
+ * Describe a single server-side job by id. `null` when the server has
53
+ * no such job.
54
+ */
55
+ getJob(jobId: string): Promise<JobDescription | null>
56
+ /**
57
+ * Request cancellation of a server-side job by id. Returns true if the
58
+ * server accepted the cancellation, false if no such job exists.
59
+ */
60
+ cancelJob(jobId: string): Promise<boolean>
61
+ /**
62
+ * The lifecycle event history of a server-side job (all jobs when
63
+ * `job_id` is null), as an Arrow IPC stream buffer. Empty when there is
64
+ * no history.
65
+ */
66
+ jobHistory(jobId?: string | undefined | null): Promise<Buffer>
42
67
  /** Describe a namespace and return its properties. */
43
68
  describeNamespace(namespacePath: Array<string>): Promise<DescribeNamespaceResponse>
44
69
  /** List child namespaces under the given namespace path */
@@ -63,11 +88,33 @@ export declare class Index {
63
88
  static bitmap(): Index
64
89
  static labelList(): Index
65
90
  static fm(): Index
66
- static fts(withPosition?: boolean | undefined | null, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null): Index
91
+ static fts(withPosition?: boolean | undefined | null, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null, blockSize?: number | undefined | null): Index
67
92
  static hnswPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
68
93
  static hnswSq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null): Index
69
94
  }
70
95
 
96
+ /** A handle to an operation that may still be running. */
97
+ export declare class Job {
98
+ /**
99
+ * Identifies the operation on the server that is running it. Operations
100
+ * that run in this process have no server id. The value is opaque.
101
+ */
102
+ get id(): string | null
103
+ /**
104
+ * The operation's current lifecycle state: "running", "finished",
105
+ * "failed", or "cancelled".
106
+ *
107
+ * A point snapshot; unlike {@link Job.wait} it does not block or reject
108
+ * on a terminal failure state. States a newer server reports that this
109
+ * client version does not know pass through as-is.
110
+ */
111
+ status(): Promise<string>
112
+ /** Wait until the operation reaches a terminal state. */
113
+ wait(): Promise<void>
114
+ /** Request cancellation. Cancelling a finished operation is a no-op. */
115
+ cancel(): Promise<void>
116
+ }
117
+
71
118
  export declare class JsFullTextQuery {
72
119
  static matchQuery(query: string, column: string, boost: number, fuzziness: number | undefined | null, maxExpansions: number, operator: string, prefixLength: number): JsFullTextQuery
73
120
  static phraseQuery(query: string, column: string, slop: number): JsFullTextQuery
@@ -118,7 +165,7 @@ export declare class NativeMergeInsertBuilder {
118
165
  whenNotMatchedBySourceDelete(filter?: string | undefined | null): NativeMergeInsertBuilder
119
166
  setTimeout(timeout: number): void
120
167
  useIndex(useIndex: boolean): NativeMergeInsertBuilder
121
- useLsmWrite(useLsmWrite: boolean): NativeMergeInsertBuilder
168
+ useLsm(enable: boolean): NativeMergeInsertBuilder
122
169
  validateSingleShard(validateSingleShard: boolean): NativeMergeInsertBuilder
123
170
  execute(buf: Buffer): Promise<MergeResult>
124
171
  }
@@ -152,6 +199,7 @@ export declare class Query {
152
199
  nearestToRaw(data: Uint8Array, dtype: string): VectorQuery
153
200
  fastSearch(): void
154
201
  withRowId(): void
202
+ useLsm(enable: boolean): void
155
203
  orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
156
204
  outputSchema(): Promise<Buffer>
157
205
  execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
@@ -217,6 +265,7 @@ export declare class Table {
217
265
  countRows(filter?: string | undefined | null): Promise<number>
218
266
  delete(predicate: string): Promise<DeleteResult>
219
267
  createIndex(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null, name?: string | undefined | null, train?: boolean | undefined | null): Promise<void>
268
+ createIndexAsync(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null, name?: string | undefined | null, train?: boolean | undefined | null): Promise<Job>
220
269
  dropIndex(indexName: string): Promise<void>
221
270
  prewarmIndex(indexName: string): Promise<void>
222
271
  prewarmData(columns?: Array<string> | undefined | null): Promise<void>
@@ -275,6 +324,7 @@ export declare class TakeQuery {
275
324
  select(columns: Array<[string, string]>): void
276
325
  selectColumns(columns: Array<string>): void
277
326
  withRowId(): void
327
+ useLsm(enable: boolean): void
278
328
  outputSchema(): Promise<Buffer>
279
329
  execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
280
330
  explainPlan(verbose: boolean): Promise<string>
@@ -302,6 +352,7 @@ export declare class VectorQuery {
302
352
  offset(offset: number): void
303
353
  fastSearch(): void
304
354
  withRowId(): void
355
+ useLsm(enable: boolean): void
305
356
  rerank(rerankHybrid: (arg: RerankHybridCallbackArgs) => Promise<Buffer>): void
306
357
  orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
307
358
  outputSchema(): Promise<Buffer>
@@ -652,6 +703,46 @@ export interface IndexStatistics {
652
703
  numIndices?: number
653
704
  }
654
705
 
706
+ /** A described job from `Connection.getJob`. */
707
+ export interface JobDescription {
708
+ jobId: string
709
+ jobType: string
710
+ /** Lifecycle state: "running", "finished", "failed", or "cancelled". */
711
+ state: string
712
+ /** When the job was created, in milliseconds since the epoch. */
713
+ creationMs: number
714
+ /** The job-type-specific specification as a JSON string, when present. */
715
+ specJson?: string
716
+ /**
717
+ * Why the job failed, when the job is failed and the server reports a
718
+ * reason.
719
+ */
720
+ failure?: JobFailureInfo
721
+ }
722
+
723
+ /** The server's account of why a job failed. */
724
+ export interface JobFailureInfo {
725
+ phase?: string
726
+ message?: string
727
+ retryable?: boolean
728
+ }
729
+
730
+ /** A row from `Connection.listJobs`: one server-side job. */
731
+ export interface JobInfo {
732
+ /**
733
+ * The job id -- what `Connection.getJob` and `Connection.cancelJob`
734
+ * accept.
735
+ */
736
+ jobId: string
737
+ /** The table the job runs against, without URI or namespace. */
738
+ table: string
739
+ jobType: string
740
+ /** Lifecycle state: "running", "finished", "failed", or "cancelled". */
741
+ state: string
742
+ /** When the job was created, in milliseconds since the epoch. */
743
+ createdAtMillis: number
744
+ }
745
+
655
746
  /** The catalog of described LanceDB metrics. Empty until the recorder is installed. */
656
747
  export declare function lancedbMetricsCatalog(): Array<MetricDescription>
657
748
 
@@ -675,7 +766,10 @@ export interface LsmWriteSpec {
675
766
  column?: string
676
767
  /** Bucket variant: the number of buckets, in `[1, 1024]`. */
677
768
  numBuckets?: number
678
- /** Names of indexes the MemWAL should keep up to date during writes. */
769
+ /**
770
+ * Indexes the MemWAL keeps up to date. Omitted resolves every
771
+ * maintainable index on install; an empty array means none.
772
+ */
679
773
  maintainedIndexes?: Array<string>
680
774
  /** Default `ShardWriter` configuration recorded in the MemWAL index. */
681
775
  writerConfigDefaults?: Record<string, string>
@@ -936,7 +1030,7 @@ export interface TlsConfig {
936
1030
  assertHostname?: boolean
937
1031
  }
938
1032
 
939
- export declare function tokenize(query: string, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null): Array<FtsToken>
1033
+ export declare function tokenize(query: string, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null): Array<FtsToken>
940
1034
 
941
1035
  export interface UpdateFieldMetadataResult {
942
1036
  version: number
package/dist/native.js CHANGED
@@ -76,8 +76,8 @@ function requireNative() {
76
76
  try {
77
77
  const binding = require('@lancedb/lancedb-android-arm64');
78
78
  const bindingPackageVersion = require('@lancedb/lancedb-android-arm64/package.json').version;
79
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
80
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
79
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
80
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
81
81
  }
82
82
  return binding;
83
83
  }
@@ -95,8 +95,8 @@ function requireNative() {
95
95
  try {
96
96
  const binding = require('@lancedb/lancedb-android-arm-eabi');
97
97
  const bindingPackageVersion = require('@lancedb/lancedb-android-arm-eabi/package.json').version;
98
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
99
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
98
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
99
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
100
100
  }
101
101
  return binding;
102
102
  }
@@ -120,8 +120,8 @@ function requireNative() {
120
120
  try {
121
121
  const binding = require('@lancedb/lancedb-win32-x64-gnu');
122
122
  const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-gnu/package.json').version;
123
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
124
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
123
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
124
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
125
125
  }
126
126
  return binding;
127
127
  }
@@ -139,8 +139,8 @@ function requireNative() {
139
139
  try {
140
140
  const binding = require('@lancedb/lancedb-win32-x64-msvc');
141
141
  const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-msvc/package.json').version;
142
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
143
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
142
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
143
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
144
144
  }
145
145
  return binding;
146
146
  }
@@ -159,8 +159,8 @@ function requireNative() {
159
159
  try {
160
160
  const binding = require('@lancedb/lancedb-win32-ia32-msvc');
161
161
  const bindingPackageVersion = require('@lancedb/lancedb-win32-ia32-msvc/package.json').version;
162
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
164
164
  }
165
165
  return binding;
166
166
  }
@@ -178,8 +178,8 @@ function requireNative() {
178
178
  try {
179
179
  const binding = require('@lancedb/lancedb-win32-arm64-msvc');
180
180
  const bindingPackageVersion = require('@lancedb/lancedb-win32-arm64-msvc/package.json').version;
181
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
182
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
181
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
182
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
183
183
  }
184
184
  return binding;
185
185
  }
@@ -201,8 +201,8 @@ function requireNative() {
201
201
  try {
202
202
  const binding = require('@lancedb/lancedb-darwin-universal');
203
203
  const bindingPackageVersion = require('@lancedb/lancedb-darwin-universal/package.json').version;
204
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
204
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
206
206
  }
207
207
  return binding;
208
208
  }
@@ -219,8 +219,8 @@ function requireNative() {
219
219
  try {
220
220
  const binding = require('@lancedb/lancedb-darwin-x64');
221
221
  const bindingPackageVersion = require('@lancedb/lancedb-darwin-x64/package.json').version;
222
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
223
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
222
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
223
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
224
224
  }
225
225
  return binding;
226
226
  }
@@ -238,8 +238,8 @@ function requireNative() {
238
238
  try {
239
239
  const binding = require('@lancedb/lancedb-darwin-arm64');
240
240
  const bindingPackageVersion = require('@lancedb/lancedb-darwin-arm64/package.json').version;
241
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
241
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
243
243
  }
244
244
  return binding;
245
245
  }
@@ -262,8 +262,8 @@ function requireNative() {
262
262
  try {
263
263
  const binding = require('@lancedb/lancedb-freebsd-x64');
264
264
  const bindingPackageVersion = require('@lancedb/lancedb-freebsd-x64/package.json').version;
265
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
265
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
267
267
  }
268
268
  return binding;
269
269
  }
@@ -281,8 +281,8 @@ function requireNative() {
281
281
  try {
282
282
  const binding = require('@lancedb/lancedb-freebsd-arm64');
283
283
  const bindingPackageVersion = require('@lancedb/lancedb-freebsd-arm64/package.json').version;
284
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
285
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
284
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
285
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
286
286
  }
287
287
  return binding;
288
288
  }
@@ -306,8 +306,8 @@ function requireNative() {
306
306
  try {
307
307
  const binding = require('@lancedb/lancedb-linux-x64-musl');
308
308
  const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-musl/package.json').version;
309
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
310
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
309
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
310
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
311
311
  }
312
312
  return binding;
313
313
  }
@@ -325,8 +325,8 @@ function requireNative() {
325
325
  try {
326
326
  const binding = require('@lancedb/lancedb-linux-x64-gnu');
327
327
  const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-gnu/package.json').version;
328
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
328
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
330
330
  }
331
331
  return binding;
332
332
  }
@@ -346,8 +346,8 @@ function requireNative() {
346
346
  try {
347
347
  const binding = require('@lancedb/lancedb-linux-arm64-musl');
348
348
  const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-musl/package.json').version;
349
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
350
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
349
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
350
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
351
351
  }
352
352
  return binding;
353
353
  }
@@ -365,8 +365,8 @@ function requireNative() {
365
365
  try {
366
366
  const binding = require('@lancedb/lancedb-linux-arm64-gnu');
367
367
  const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-gnu/package.json').version;
368
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
369
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
368
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
369
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
370
370
  }
371
371
  return binding;
372
372
  }
@@ -386,8 +386,8 @@ function requireNative() {
386
386
  try {
387
387
  const binding = require('@lancedb/lancedb-linux-arm-musleabihf');
388
388
  const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-musleabihf/package.json').version;
389
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
390
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
389
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
390
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
391
391
  }
392
392
  return binding;
393
393
  }
@@ -405,8 +405,8 @@ function requireNative() {
405
405
  try {
406
406
  const binding = require('@lancedb/lancedb-linux-arm-gnueabihf');
407
407
  const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-gnueabihf/package.json').version;
408
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
409
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
408
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
409
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
410
410
  }
411
411
  return binding;
412
412
  }
@@ -426,8 +426,8 @@ function requireNative() {
426
426
  try {
427
427
  const binding = require('@lancedb/lancedb-linux-loong64-musl');
428
428
  const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-musl/package.json').version;
429
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
429
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
431
431
  }
432
432
  return binding;
433
433
  }
@@ -445,8 +445,8 @@ function requireNative() {
445
445
  try {
446
446
  const binding = require('@lancedb/lancedb-linux-loong64-gnu');
447
447
  const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-gnu/package.json').version;
448
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
449
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
448
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
449
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
450
450
  }
451
451
  return binding;
452
452
  }
@@ -466,8 +466,8 @@ function requireNative() {
466
466
  try {
467
467
  const binding = require('@lancedb/lancedb-linux-riscv64-musl');
468
468
  const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-musl/package.json').version;
469
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
470
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
469
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
470
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
471
471
  }
472
472
  return binding;
473
473
  }
@@ -485,8 +485,8 @@ function requireNative() {
485
485
  try {
486
486
  const binding = require('@lancedb/lancedb-linux-riscv64-gnu');
487
487
  const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-gnu/package.json').version;
488
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
489
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
488
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
489
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
490
490
  }
491
491
  return binding;
492
492
  }
@@ -505,8 +505,8 @@ function requireNative() {
505
505
  try {
506
506
  const binding = require('@lancedb/lancedb-linux-ppc64-gnu');
507
507
  const bindingPackageVersion = require('@lancedb/lancedb-linux-ppc64-gnu/package.json').version;
508
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
509
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
508
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
509
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
510
510
  }
511
511
  return binding;
512
512
  }
@@ -524,8 +524,8 @@ function requireNative() {
524
524
  try {
525
525
  const binding = require('@lancedb/lancedb-linux-s390x-gnu');
526
526
  const bindingPackageVersion = require('@lancedb/lancedb-linux-s390x-gnu/package.json').version;
527
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
528
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
527
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
528
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
529
529
  }
530
530
  return binding;
531
531
  }
@@ -548,8 +548,8 @@ function requireNative() {
548
548
  try {
549
549
  const binding = require('@lancedb/lancedb-openharmony-arm64');
550
550
  const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm64/package.json').version;
551
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
552
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
551
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
552
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
553
553
  }
554
554
  return binding;
555
555
  }
@@ -567,8 +567,8 @@ function requireNative() {
567
567
  try {
568
568
  const binding = require('@lancedb/lancedb-openharmony-x64');
569
569
  const bindingPackageVersion = require('@lancedb/lancedb-openharmony-x64/package.json').version;
570
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
571
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
570
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
571
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
572
572
  }
573
573
  return binding;
574
574
  }
@@ -586,8 +586,8 @@ function requireNative() {
586
586
  try {
587
587
  const binding = require('@lancedb/lancedb-openharmony-arm');
588
588
  const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm/package.json').version;
589
- if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
590
- throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
589
+ if (bindingPackageVersion !== '0.37.1-beta.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
590
+ throw new Error(`Native binding package version mismatch, expected 0.37.1-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
591
591
  }
592
592
  return binding;
593
593
  }
@@ -665,6 +665,7 @@ module.exports.BranchContents = nativeBinding.BranchContents;
665
665
  module.exports.Branches = nativeBinding.Branches;
666
666
  module.exports.Connection = nativeBinding.Connection;
667
667
  module.exports.Index = nativeBinding.Index;
668
+ module.exports.Job = nativeBinding.Job;
668
669
  module.exports.JsFullTextQuery = nativeBinding.JsFullTextQuery;
669
670
  module.exports.JsHeaderProvider = nativeBinding.JsHeaderProvider;
670
671
  module.exports.NapiScannable = nativeBinding.NapiScannable;
package/dist/query.d.ts CHANGED
@@ -224,6 +224,26 @@ export declare class StandardQueryBase<NativeQueryType extends NativeQuery | Nat
224
224
  * Use {@link Table#optimize} to index all un-indexed data.
225
225
  */
226
226
  fastSearch(): this;
227
+ /**
228
+ * Control MemWAL read routing for this query.
229
+ *
230
+ * By default (unset), when the table carries a MemWAL write spec (see
231
+ * {@link Table#setLsmWriteSpec}), reads are routed through the LSM scanner so
232
+ * they also return data written via the `mergeInsert` LSM path that has not yet
233
+ * been compacted into the base table (the active/frozen in-memory memtables and
234
+ * the flushed generations), deduplicated by primary key; a table without a spec
235
+ * reads the base table.
236
+ *
237
+ * @param enable - `true` forces the LSM scanner and errors if the table has no
238
+ * MemWAL write spec. `false` bypasses the MemWAL and reads the base table only,
239
+ * even when a spec is present.
240
+ *
241
+ * Note: the LSM scanner does not support every query shape (e.g. reranking,
242
+ * hybrid search, `orderBy`). On a MemWAL table those shapes error unless
243
+ * `useLsm(false)` is set, because a base-only read would silently exclude
244
+ * un-compacted MemWAL data.
245
+ */
246
+ useLsm(enable: boolean): this;
227
247
  }
228
248
  /**
229
249
  * An interface for a query that can be executed
@@ -399,6 +419,16 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
399
419
  */
400
420
  export declare class TakeQuery extends QueryBase<NativeTakeQuery> {
401
421
  constructor(inner: NativeTakeQuery);
422
+ /**
423
+ * Control MemWAL read routing for this take query.
424
+ *
425
+ * `false` bypasses the MemWAL and reads the base table only — the escape hatch,
426
+ * since take-by-row-id/offset is not supported on the LSM scanner and, on a
427
+ * MemWAL table, auto-routes to it and errors otherwise.
428
+ *
429
+ * @param enable - `false` reads the base table only.
430
+ */
431
+ useLsm(enable: boolean): this;
402
432
  }
403
433
  /** A builder for LanceDB queries.
404
434
  *
package/dist/query.js CHANGED
@@ -362,6 +362,29 @@ class StandardQueryBase extends QueryBase {
362
362
  this.doCall((inner) => inner.fastSearch());
363
363
  return this;
364
364
  }
365
+ /**
366
+ * Control MemWAL read routing for this query.
367
+ *
368
+ * By default (unset), when the table carries a MemWAL write spec (see
369
+ * {@link Table#setLsmWriteSpec}), reads are routed through the LSM scanner so
370
+ * they also return data written via the `mergeInsert` LSM path that has not yet
371
+ * been compacted into the base table (the active/frozen in-memory memtables and
372
+ * the flushed generations), deduplicated by primary key; a table without a spec
373
+ * reads the base table.
374
+ *
375
+ * @param enable - `true` forces the LSM scanner and errors if the table has no
376
+ * MemWAL write spec. `false` bypasses the MemWAL and reads the base table only,
377
+ * even when a spec is present.
378
+ *
379
+ * Note: the LSM scanner does not support every query shape (e.g. reranking,
380
+ * hybrid search, `orderBy`). On a MemWAL table those shapes error unless
381
+ * `useLsm(false)` is set, because a base-only read would silently exclude
382
+ * un-compacted MemWAL data.
383
+ */
384
+ useLsm(enable) {
385
+ this.doCall((inner) => inner.useLsm(enable));
386
+ return this;
387
+ }
365
388
  }
366
389
  exports.StandardQueryBase = StandardQueryBase;
367
390
  /**
@@ -621,6 +644,19 @@ class TakeQuery extends QueryBase {
621
644
  constructor(inner) {
622
645
  super(inner);
623
646
  }
647
+ /**
648
+ * Control MemWAL read routing for this take query.
649
+ *
650
+ * `false` bypasses the MemWAL and reads the base table only — the escape hatch,
651
+ * since take-by-row-id/offset is not supported on the LSM scanner and, on a
652
+ * MemWAL table, auto-routes to it and errors otherwise.
653
+ *
654
+ * @param enable - `false` reads the base table only.
655
+ */
656
+ useLsm(enable) {
657
+ this.doCall((inner) => inner.useLsm(enable));
658
+ return this;
659
+ }
624
660
  }
625
661
  exports.TakeQuery = TakeQuery;
626
662
  /** A builder for LanceDB queries.
package/dist/sanitize.js CHANGED
@@ -42,7 +42,7 @@ function sanitizeMetadata(metadataLike) {
42
42
  throw Error("Expected metadata, if present, to be a Map<string, string>");
43
43
  }
44
44
  for (const item of metadataLike) {
45
- if (!(typeof item[0] === "string" || !(typeof item[1] === "string"))) {
45
+ if (typeof item[0] !== "string" || typeof item[1] !== "string") {
46
46
  throw Error("Expected metadata, if present, to be a Map<string, string> but it had non-string keys or values");
47
47
  }
48
48
  }
package/dist/table.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Table as ArrowTable, Data, DataType, Field, IntoVector, MultiVector, Schema } from "./arrow";
2
2
  import { IndexOptions } from "./indices";
3
3
  import { MergeInsertBuilder } from "./merge";
4
- import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, BranchContents, DeleteResult, DropColumnsResult, IndexConfig, IndexStatistics, Branches as NativeBranches, OptimizeStats, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
4
+ import { AddColumnsResult, AddColumnsSql, AddResult, AlterColumnsResult, BranchContents, DeleteResult, DropColumnsResult, IndexConfig, IndexStatistics, Job, Branches as NativeBranches, OptimizeStats, TableStatistics, Tags, UpdateFieldMetadataResult, UpdateResult, Table as _NativeTable } from "./native";
5
5
  import { FullTextQuery, Query, TakeQuery, VectorQuery } from "./query";
6
6
  import { IntoSql } from "./util";
7
7
  export { IndexConfig } from "./native";
@@ -142,7 +142,11 @@ export interface LsmWriteSpec {
142
142
  column?: string;
143
143
  /** Bucket variant: the number of buckets, in `[1, 1024]`. */
144
144
  numBuckets?: number;
145
- /** Names of indexes the MemWAL should keep up to date during writes. */
145
+ /**
146
+ * Indexes the MemWAL keeps up to date. Omit to maintain every supported
147
+ * index, resolved on install — a snapshot, so indexes created later are not
148
+ * maintained. Pass `[]` for none.
149
+ */
146
150
  maintainedIndexes?: string[];
147
151
  /** Default `ShardWriter` configuration recorded in the MemWAL index. */
148
152
  writerConfigDefaults?: Record<string, string>;
@@ -284,6 +288,13 @@ export declare abstract class Table {
284
288
  * await table.createIndex("my_float_col");
285
289
  */
286
290
  abstract createIndex(column: string, options?: Partial<IndexOptions>): Promise<void>;
291
+ /**
292
+ * Create an index, returning a handle to the indexing job.
293
+ *
294
+ * The job may already be complete when returned; callers must not assume
295
+ * the index exists until {@link Job.wait} resolves.
296
+ */
297
+ abstract createIndexAsync(column: string, options?: Partial<IndexOptions>): Promise<Job>;
287
298
  /**
288
299
  * Drop an index from the table.
289
300
  *
@@ -486,6 +497,11 @@ export declare abstract class Table {
486
497
  * All variants require the table to have an unenforced primary key
487
498
  * ({@link Table#setUnenforcedPrimaryKey}); bucket sharding additionally
488
499
  * requires it to be the single column being bucketed.
500
+ *
501
+ * Omitting `maintainedIndexes` maintains every index on the table, resolved
502
+ * here, failing if one cannot be maintained — name them to install anyway.
503
+ * Naming them pins an exact set, and a still-building index is rejected
504
+ * rather than quietly omitted.
489
505
  * @param {LsmWriteSpec} spec The sharding spec to install.
490
506
  * @returns {Promise<void>}
491
507
  * @example
@@ -513,9 +529,10 @@ export declare abstract class Table {
513
529
  *
514
530
  * Resolves to `undefined` when the MemWAL LSM write path is not enabled (no
515
531
  * spec has been set, or it was removed with {@link Table#unsetLsmWriteSpec}).
516
- * The returned spec including its `maintainedIndexes` and
517
- * `writerConfigDefaults` mirrors what was passed to
518
- * {@link Table#setLsmWriteSpec}.
532
+ * The returned spec mirrors what was passed to
533
+ * {@link Table#setLsmWriteSpec}, except that `maintainedIndexes` always
534
+ * reports the concrete list resolved when the spec was set — `undefined`
535
+ * never round-trips.
519
536
  * @returns {Promise<LsmWriteSpec | undefined>}
520
537
  */
521
538
  abstract getLsmWriteSpec(): Promise<LsmWriteSpec | undefined>;
@@ -702,6 +719,7 @@ export declare class LocalTable extends Table {
702
719
  countRows(filter?: string): Promise<number>;
703
720
  delete(predicate: string): Promise<DeleteResult>;
704
721
  createIndex(column: string, options?: Partial<IndexOptions>): Promise<void>;
722
+ createIndexAsync(column: string, options?: Partial<IndexOptions>): Promise<Job>;
705
723
  dropIndex(name: string): Promise<void>;
706
724
  prewarmIndex(name: string): Promise<void>;
707
725
  prewarmData(columns?: string[]): Promise<void>;
package/dist/table.js CHANGED
@@ -139,6 +139,11 @@ class LocalTable extends Table {
139
139
  const nativeIndex = options?.config?.inner;
140
140
  await this.inner.createIndex(nativeIndex, column, options?.replace, options?.waitTimeoutSeconds, options?.name, options?.train);
141
141
  }
142
+ async createIndexAsync(column, options) {
143
+ // biome-ignore lint/suspicious/noExplicitAny: skip
144
+ const nativeIndex = options?.config?.inner;
145
+ return await this.inner.createIndexAsync(nativeIndex, column, options?.replace, options?.waitTimeoutSeconds, options?.name, options?.train);
146
+ }
142
147
  async dropIndex(name) {
143
148
  await this.inner.dropIndex(name);
144
149
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "ann"
12
12
  ],
13
13
  "private": false,
14
- "version": "0.33.0",
14
+ "version": "0.37.1-beta.1",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -106,15 +106,21 @@
106
106
  "optionalDependencies": {
107
107
  "@huggingface/transformers": "3.0.2",
108
108
  "openai": "4.29.2",
109
- "@lancedb/lancedb-darwin-arm64": "0.33.0",
110
- "@lancedb/lancedb-linux-x64-gnu": "0.33.0",
111
- "@lancedb/lancedb-linux-arm64-gnu": "0.33.0",
112
- "@lancedb/lancedb-linux-x64-musl": "0.33.0",
113
- "@lancedb/lancedb-linux-arm64-musl": "0.33.0",
114
- "@lancedb/lancedb-win32-x64-msvc": "0.33.0",
115
- "@lancedb/lancedb-win32-arm64-msvc": "0.33.0"
109
+ "@lancedb/lancedb-darwin-arm64": "0.37.1-beta.1",
110
+ "@lancedb/lancedb-linux-x64-gnu": "0.37.1-beta.1",
111
+ "@lancedb/lancedb-linux-arm64-gnu": "0.37.1-beta.1",
112
+ "@lancedb/lancedb-linux-x64-musl": "0.37.1-beta.1",
113
+ "@lancedb/lancedb-linux-arm64-musl": "0.37.1-beta.1",
114
+ "@lancedb/lancedb-win32-x64-msvc": "0.37.1-beta.1",
115
+ "@lancedb/lancedb-win32-arm64-msvc": "0.37.1-beta.1"
116
116
  },
117
117
  "peerDependencies": {
118
+ "@types/node": ">=18",
118
119
  "apache-arrow": ">=15.0.0 <=18.1.0"
120
+ },
121
+ "peerDependenciesMeta": {
122
+ "@types/node": {
123
+ "optional": true
124
+ }
119
125
  }
120
126
  }