@lancedb/lancedb 0.33.0 → 0.37.1-beta.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/dist/indices.d.ts CHANGED
@@ -520,6 +520,13 @@ export interface FtsOptions {
520
520
  * whether to only index the prefix of the token for ngram tokenizer
521
521
  */
522
522
  prefixOnly?: boolean;
523
+ /**
524
+ * Number of documents per compressed posting block.
525
+ *
526
+ * The default is 128. Supported values are 128 and 256. A value of 256 uses
527
+ * the experimental FTS V3 format and may introduce breaking changes.
528
+ */
529
+ blockSize?: 128 | 256;
523
530
  }
524
531
  export declare class Index {
525
532
  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?.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
@@ -63,7 +63,7 @@ export declare class Index {
63
63
  static bitmap(): Index
64
64
  static labelList(): Index
65
65
  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
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, blockSize?: number | undefined | null): Index
67
67
  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
68
  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
69
  }
@@ -118,7 +118,7 @@ export declare class NativeMergeInsertBuilder {
118
118
  whenNotMatchedBySourceDelete(filter?: string | undefined | null): NativeMergeInsertBuilder
119
119
  setTimeout(timeout: number): void
120
120
  useIndex(useIndex: boolean): NativeMergeInsertBuilder
121
- useLsmWrite(useLsmWrite: boolean): NativeMergeInsertBuilder
121
+ useLsm(enable: boolean): NativeMergeInsertBuilder
122
122
  validateSingleShard(validateSingleShard: boolean): NativeMergeInsertBuilder
123
123
  execute(buf: Buffer): Promise<MergeResult>
124
124
  }
@@ -152,6 +152,7 @@ export declare class Query {
152
152
  nearestToRaw(data: Uint8Array, dtype: string): VectorQuery
153
153
  fastSearch(): void
154
154
  withRowId(): void
155
+ useLsm(enable: boolean): void
155
156
  orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
156
157
  outputSchema(): Promise<Buffer>
157
158
  execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
@@ -275,6 +276,7 @@ export declare class TakeQuery {
275
276
  select(columns: Array<[string, string]>): void
276
277
  selectColumns(columns: Array<string>): void
277
278
  withRowId(): void
279
+ useLsm(enable: boolean): void
278
280
  outputSchema(): Promise<Buffer>
279
281
  execute(maxBatchLength?: number | undefined | null, timeoutMs?: number | undefined | null): Promise<RecordBatchIterator>
280
282
  explainPlan(verbose: boolean): Promise<string>
@@ -302,6 +304,7 @@ export declare class VectorQuery {
302
304
  offset(offset: number): void
303
305
  fastSearch(): void
304
306
  withRowId(): void
307
+ useLsm(enable: boolean): void
305
308
  rerank(rerankHybrid: (arg: RerankHybridCallbackArgs) => Promise<Buffer>): void
306
309
  orderBy(ordering?: Array<ColumnOrdering> | undefined | null): void
307
310
  outputSchema(): Promise<Buffer>
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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 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.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.37.1-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
591
591
  }
592
592
  return binding;
593
593
  }
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/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.0",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -106,13 +106,13 @@
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.0",
110
+ "@lancedb/lancedb-linux-x64-gnu": "0.37.1-beta.0",
111
+ "@lancedb/lancedb-linux-arm64-gnu": "0.37.1-beta.0",
112
+ "@lancedb/lancedb-linux-x64-musl": "0.37.1-beta.0",
113
+ "@lancedb/lancedb-linux-arm64-musl": "0.37.1-beta.0",
114
+ "@lancedb/lancedb-win32-x64-msvc": "0.37.1-beta.0",
115
+ "@lancedb/lancedb-win32-arm64-msvc": "0.37.1-beta.0"
116
116
  },
117
117
  "peerDependencies": {
118
118
  "apache-arrow": ">=15.0.0 <=18.1.0"