diff --git a/docs/src/js/classes/Table.md b/docs/src/js/classes/Table.md index 431796843..77c234cb0 100644 --- a/docs/src/js/classes/Table.md +++ b/docs/src/js/classes/Table.md @@ -354,8 +354,10 @@ Indices on vector columns will speed up vector searches. Indices on scalar columns will speed up filtering (in both vector and non-vector searches) -We currently don't support custom named indexes. -The index name will always be `${column}_idx`. +The index name defaults to `${column}_idx`. Set [IndexOptions.name](../interfaces/IndexOptions.md#name) +to use a custom name containing 1–128 ASCII letters, digits, dashes, +underscores, or periods, excluding `.` and `..`. +See [IndexOptions.name](../interfaces/IndexOptions.md#name) for legacy-name cleanup guidance. On LanceDB Embedded tables the index is built before the returned promise resolves. On LanceDB Enterprise tables it resolves once the build is diff --git a/docs/web/indexing/vector-index.mdx b/docs/web/indexing/vector-index.mdx index 33fc802fa..87f25cfde 100644 --- a/docs/web/indexing/vector-index.mdx +++ b/docs/web/indexing/vector-index.mdx @@ -339,6 +339,21 @@ These fields are populated for LanceDB Embedded tables. In LanceDB Enterprise, ` The `{column}_idx` suffix is the default naming convention. Pass `name=...` to `create_index()` to override it. Once set, the custom name will be reflected in `list_indices()`, `index_stats(name)`, and `wait_for_index([name])`. +{/* +Draft for the index-name validation release (#5007). Publish this guidance +after the SDK changes ship. + +Custom index names must contain 1–128 ASCII letters, digits, dashes, +underscores, or periods, excluding `.` and `..`. These restrictions apply +when you supply a name to `create_index()`; generated names still use the +column name and remain usable through index operations. + +Remote tables reject empty names, `.` and `..` in index operations to prevent +URL path normalization. Existing indexes named `.` or `..` require +server-side cleanup on managed tables, or a native connection with direct +access to the dataset. Other existing names remain usable. +*/} + {VectorIndexCustomName} diff --git a/nodejs/lancedb/table.ts b/nodejs/lancedb/table.ts index 185088424..6c67fd03b 100644 --- a/nodejs/lancedb/table.ts +++ b/nodejs/lancedb/table.ts @@ -465,8 +465,10 @@ export abstract class Table { * Indices on scalar columns will speed up filtering (in both * vector and non-vector searches) * - * We currently don't support custom named indexes. - * The index name will always be `${column}_idx`. + * The index name defaults to `${column}_idx`. Set {@link IndexOptions.name} + * to use a custom name containing 1–128 ASCII letters, digits, dashes, + * underscores, or periods, excluding `.` and `..`. + * See {@link IndexOptions.name} for legacy-name cleanup guidance. * * On LanceDB Embedded tables the index is built before the returned promise * resolves. On LanceDB Enterprise tables it resolves once the build is