@lancedb/lancedb 0.13.0 → 0.14.0-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/native.d.ts CHANGED
@@ -165,6 +165,11 @@ export interface IndexStatistics {
165
165
  /** The number of parts this index is split into. */
166
166
  numIndices?: number
167
167
  }
168
+ export interface Version {
169
+ version: number
170
+ timestamp: number
171
+ metadata: Record<string, string>
172
+ }
168
173
  export interface ConnectionOptions {
169
174
  /**
170
175
  * (For LanceDB OSS only): The interval, in seconds, at which to check for
@@ -279,6 +284,7 @@ export class VectorQuery {
279
284
  postfilter(): void
280
285
  refineFactor(refineFactor: number): void
281
286
  nprobes(nprobe: number): void
287
+ ef(ef: number): void
282
288
  bypassVectorIndex(): void
283
289
  onlyIf(predicate: string): void
284
290
  fullTextSearch(query: string, columns?: Array<string> | undefined | null): void
@@ -311,6 +317,7 @@ export class Table {
311
317
  version(): Promise<number>
312
318
  checkout(version: number): Promise<void>
313
319
  checkoutLatest(): Promise<void>
320
+ listVersions(): Promise<Array<Version>>
314
321
  restore(): Promise<void>
315
322
  optimize(olderThanMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null): Promise<OptimizeStats>
316
323
  listIndices(): Promise<Array<IndexConfig>>
package/dist/query.d.ts CHANGED
@@ -181,6 +181,16 @@ export declare class VectorQuery extends QueryBase<NativeVectorQuery> {
181
181
  * you the desired recall.
182
182
  */
183
183
  nprobes(nprobes: number): VectorQuery;
184
+ /**
185
+ * Set the number of candidates to consider during the search
186
+ *
187
+ * This argument is only used when the vector column has an HNSW index.
188
+ * If there is no index then this value is ignored.
189
+ *
190
+ * Increasing this value will increase the recall of your query but will
191
+ * also increase the latency of your query. The default value is 1.5*limit.
192
+ */
193
+ ef(ef: number): VectorQuery;
184
194
  /**
185
195
  * Set the vector column to query
186
196
  *
package/dist/query.js CHANGED
@@ -308,6 +308,19 @@ class VectorQuery extends QueryBase {
308
308
  super.doCall((inner) => inner.nprobes(nprobes));
309
309
  return this;
310
310
  }
311
+ /**
312
+ * Set the number of candidates to consider during the search
313
+ *
314
+ * This argument is only used when the vector column has an HNSW index.
315
+ * If there is no index then this value is ignored.
316
+ *
317
+ * Increasing this value will increase the recall of your query but will
318
+ * also increase the latency of your query. The default value is 1.5*limit.
319
+ */
320
+ ef(ef) {
321
+ super.doCall((inner) => inner.ef(ef));
322
+ return this;
323
+ }
311
324
  /**
312
325
  * Set the vector column to query
313
326
  *
package/dist/table.d.ts CHANGED
@@ -47,6 +47,11 @@ export interface OptimizeOptions {
47
47
  cleanupOlderThan: Date;
48
48
  deleteUnverified: boolean;
49
49
  }
50
+ export interface Version {
51
+ version: number;
52
+ timestamp: Date;
53
+ metadata: Record<string, string>;
54
+ }
50
55
  /**
51
56
  * A Table is a collection of Records in a LanceDB Database.
52
57
  *
@@ -297,6 +302,10 @@ export declare abstract class Table {
297
302
  * version of the table.
298
303
  */
299
304
  abstract checkoutLatest(): Promise<void>;
305
+ /**
306
+ * List all the versions of the table
307
+ */
308
+ abstract listVersions(): Promise<Version[]>;
300
309
  /**
301
310
  * Restore the table to the currently checked out version
302
311
  *
@@ -385,6 +394,7 @@ export declare class LocalTable extends Table {
385
394
  version(): Promise<number>;
386
395
  checkout(version: number): Promise<void>;
387
396
  checkoutLatest(): Promise<void>;
397
+ listVersions(): Promise<Version[]>;
388
398
  restore(): Promise<void>;
389
399
  optimize(options?: Partial<OptimizeOptions>): Promise<OptimizeStats>;
390
400
  listIndices(): Promise<IndexConfig[]>;
package/dist/table.js CHANGED
@@ -211,6 +211,13 @@ class LocalTable extends Table {
211
211
  async checkoutLatest() {
212
212
  await this.inner.checkoutLatest();
213
213
  }
214
+ async listVersions() {
215
+ return (await this.inner.listVersions()).map((version) => ({
216
+ version: version.version,
217
+ timestamp: new Date(version.timestamp / 1000),
218
+ metadata: version.metadata,
219
+ }));
220
+ }
214
221
  async restore() {
215
222
  await this.inner.restore();
216
223
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "vector database",
11
11
  "ann"
12
12
  ],
13
- "version": "0.13.0",
13
+ "version": "0.14.0-beta.0",
14
14
  "main": "dist/index.js",
15
15
  "exports": {
16
16
  ".": "./dist/index.js",
@@ -24,10 +24,12 @@
24
24
  "triples": {
25
25
  "defaults": false,
26
26
  "additional": [
27
- "aarch64-apple-darwin",
28
- "aarch64-unknown-linux-gnu",
29
27
  "x86_64-apple-darwin",
28
+ "aarch64-apple-darwin",
30
29
  "x86_64-unknown-linux-gnu",
30
+ "aarch64-unknown-linux-gnu",
31
+ "x86_64-unknown-linux-musl",
32
+ "aarch64-unknown-linux-musl",
31
33
  "x86_64-pc-windows-msvc"
32
34
  ]
33
35
  }
@@ -94,11 +96,13 @@
94
96
  "reflect-metadata": "^0.2.2"
95
97
  },
96
98
  "optionalDependencies": {
97
- "@lancedb/lancedb-darwin-arm64": "0.13.0",
98
- "@lancedb/lancedb-linux-arm64-gnu": "0.13.0",
99
- "@lancedb/lancedb-darwin-x64": "0.13.0",
100
- "@lancedb/lancedb-linux-x64-gnu": "0.13.0",
101
- "@lancedb/lancedb-win32-x64-msvc": "0.13.0"
99
+ "@lancedb/lancedb-darwin-x64": "0.14.0-beta.0",
100
+ "@lancedb/lancedb-darwin-arm64": "0.14.0-beta.0",
101
+ "@lancedb/lancedb-linux-x64-gnu": "0.14.0-beta.0",
102
+ "@lancedb/lancedb-linux-arm64-gnu": "0.14.0-beta.0",
103
+ "@lancedb/lancedb-linux-x64-musl": "0.14.0-beta.0",
104
+ "@lancedb/lancedb-linux-arm64-musl": "0.14.0-beta.0",
105
+ "@lancedb/lancedb-win32-x64-msvc": "0.14.0-beta.0"
102
106
  },
103
107
  "peerDependencies": {
104
108
  "apache-arrow": ">=13.0.0 <=17.0.0"