@lancedb/lancedb 0.21.3 → 0.21.4-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
@@ -585,5 +585,25 @@ export interface IndexOptions {
585
585
  * The default is true
586
586
  */
587
587
  replace?: boolean;
588
+ /**
589
+ * Timeout in seconds to wait for index creation to complete.
590
+ *
591
+ * If not specified, the method will return immediately after starting the index creation.
592
+ */
588
593
  waitTimeoutSeconds?: number;
594
+ /**
595
+ * Optional custom name for the index.
596
+ *
597
+ * If not provided, a default name will be generated based on the column name.
598
+ */
599
+ name?: string;
600
+ /**
601
+ * Whether to train the index with existing data.
602
+ *
603
+ * If true (default), the index will be trained with existing data in the table.
604
+ * If false, the index will be created empty and populated as new data is added.
605
+ *
606
+ * Note: This option is only supported for scalar indices. Vector indices always train.
607
+ */
608
+ train?: boolean;
589
609
  }
package/dist/native.d.ts CHANGED
@@ -468,7 +468,7 @@ export class Table {
468
468
  add(buf: Buffer, mode: string): Promise<AddResult>
469
469
  countRows(filter?: string | undefined | null): Promise<number>
470
470
  delete(predicate: string): Promise<DeleteResult>
471
- createIndex(index: Index | undefined | null, column: string, replace?: boolean | undefined | null, waitTimeoutS?: number | undefined | null): Promise<void>
471
+ 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>
472
472
  dropIndex(indexName: string): Promise<void>
473
473
  prewarmIndex(indexName: string): Promise<void>
474
474
  waitForIndex(indexNames: Array<string>, timeoutS: number): Promise<void>
package/dist/table.js CHANGED
@@ -123,7 +123,7 @@ class LocalTable extends Table {
123
123
  // Bit of a hack to get around the fact that TS has no package-scope.
124
124
  // biome-ignore lint/suspicious/noExplicitAny: skip
125
125
  const nativeIndex = options?.config?.inner;
126
- await this.inner.createIndex(nativeIndex, column, options?.replace, options?.waitTimeoutSeconds);
126
+ await this.inner.createIndex(nativeIndex, column, options?.replace, options?.waitTimeoutSeconds, options?.name, options?.train);
127
127
  }
128
128
  async dropIndex(name) {
129
129
  await this.inner.dropIndex(name);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "ann"
12
12
  ],
13
13
  "private": false,
14
- "version": "0.21.3",
14
+ "version": "0.21.4-beta.0",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -100,14 +100,14 @@
100
100
  "reflect-metadata": "^0.2.2"
101
101
  },
102
102
  "optionalDependencies": {
103
- "@lancedb/lancedb-darwin-x64": "0.21.3",
104
- "@lancedb/lancedb-darwin-arm64": "0.21.3",
105
- "@lancedb/lancedb-linux-x64-gnu": "0.21.3",
106
- "@lancedb/lancedb-linux-arm64-gnu": "0.21.3",
107
- "@lancedb/lancedb-linux-x64-musl": "0.21.3",
108
- "@lancedb/lancedb-linux-arm64-musl": "0.21.3",
109
- "@lancedb/lancedb-win32-x64-msvc": "0.21.3",
110
- "@lancedb/lancedb-win32-arm64-msvc": "0.21.3"
103
+ "@lancedb/lancedb-darwin-x64": "0.21.4-beta.0",
104
+ "@lancedb/lancedb-darwin-arm64": "0.21.4-beta.0",
105
+ "@lancedb/lancedb-linux-x64-gnu": "0.21.4-beta.0",
106
+ "@lancedb/lancedb-linux-arm64-gnu": "0.21.4-beta.0",
107
+ "@lancedb/lancedb-linux-x64-musl": "0.21.4-beta.0",
108
+ "@lancedb/lancedb-linux-arm64-musl": "0.21.4-beta.0",
109
+ "@lancedb/lancedb-win32-x64-msvc": "0.21.4-beta.0",
110
+ "@lancedb/lancedb-win32-arm64-msvc": "0.21.4-beta.0"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "apache-arrow": ">=15.0.0 <=18.1.0"