v1

latestOpenAPI 3.1.1Apache 2.02026-07-2654130166.5 KB
Table
Index
Metadata

Create a scalar index on a table

Create a scalar index on a table field for faster filtering operations. Supports scalar indexes (BTREE, BITMAP, LABEL_LIST, FTS, etc.). This is an alias for CreateTableIndex specifically for scalar indexes. Index creation is handled asynchronously. Use the ListTableIndices and DescribeTableIndexStats operations to monitor index creation progress.

post/v1/table/{id}/create_scalar_index

Request body

contextContext

Arbitrary context as key-value pairs. How to use the context is custom to the specific implementation.

On a request, it carries caller-provided context to the implementation. On a response, it carries implementation-provided context back to the caller.

REST NAMESPACE ONLY Context entries are mapped to and from HTTP headers using the header. prefix:

  • On a request, any entry whose key starts with header. is sent as an HTTP request header with the prefix stripped. For example, the entry {"header.Authorization": "Bearer abc"} is sent as the request header Authorization: Bearer abc.
  • On a response, every HTTP response header is returned as an entry whose key is the header name prefixed with header.. For example, the response header x-request-id: abc123 is returned as the entry {"header.x-request-id": "abc123"}.
idstring[]
branchstring

Branch to target. When not specified, the main branch is used.

columnstring required

Lance field path to create the index on. Nested fields use dot-separated segments; use backtick-quoted segments for literal dots and double backticks inside quoted segments. Use canonical full paths for display and errors; leaf names alone only identify top-level fields; invalid or unresolved paths should return InvalidInput or TableColumnNotFound.

index_typestring required

Type of index to create (e.g., BTREE, BITMAP, LABEL_LIST, IVF_FLAT, IVF_PQ, IVF_HNSW_SQ, FTS)

namestring nullable

Optional name for the index. If not provided, a name will be auto-generated.

distance_typestring

Distance metric type for vector indexes (e.g., l2, cosine, dot)

with_positionboolean nullable

Optional FTS parameter for position tracking

base_tokenizerstring nullable

Optional FTS parameter for base tokenizer

languagestring nullable

Optional FTS parameter for language

max_token_lengthinteger nullable

Optional FTS parameter for maximum token length

lower_caseboolean nullable

Optional FTS parameter for lowercase conversion

stemboolean nullable

Optional FTS parameter for stemming

remove_stop_wordsboolean nullable

Optional FTS parameter for stop word removal

ascii_foldingboolean nullable

Optional FTS parameter for ASCII folding

Response

Scalar index created successfully

contextContext

Arbitrary context as key-value pairs. How to use the context is custom to the specific implementation.

On a request, it carries caller-provided context to the implementation. On a response, it carries implementation-provided context back to the caller.

REST NAMESPACE ONLY Context entries are mapped to and from HTTP headers using the header. prefix:

  • On a request, any entry whose key starts with header. is sent as an HTTP request header with the prefix stripped. For example, the entry {"header.Authorization": "Bearer abc"} is sent as the request header Authorization: Bearer abc.
  • On a response, every HTTP response header is returned as an entry whose key is the header name prefixed with header.. For example, the response header x-request-id: abc123 is returned as the entry {"header.x-request-id": "abc123"}.
transaction_idstring

Optional transaction identifier