Skip to main content

Index

View as Markdown

Index object​

An AI Search index — a searchable collection of vectors and metadata hosted on an AI Search endpoint. Indexes are children of endpoints; customers create, get, list, and delete them. The {index} segment of the resource name is the index's Unity Catalog table name.

namestringIDImmutable

Name of the AI Search index. Server-assigned full resource path (workspaces/{workspace}/endpoints/{endpoint}/indexes/{index}) on output, where {index} is the index's Unity Catalog table name. On create, the user-supplied UC table name is conveyed via CreateIndexRequest.index_id; the server composes the full name and returns it on the response.

Example: workspaces/1234567890123456/endpoints/docs-endpoint/indexes/main.default.docs_index

endpointstringOutput only

Name of the endpoint associated with the index. Ignored on create — the endpoint is taken from CreateIndexRequest.parent; populated only on output.

Example: docs-endpoint

primary_keystringImmutable

Name of the column that uniquely identifies each row. It must exist in the source table (Delta Sync) or in schema_json (Direct Access) and cannot be the embedding source or vector column. Set on create and immutable thereafter.

index_typestringImmutable

Type of index. A DELTA_SYNC index is kept in sync with a source Delta table; a DIRECT_ACCESS index holds rows that you write through UpsertData and RemoveData. Set on create and immutable thereafter.

Values:

  • DELTA_SYNC
  • DIRECT_ACCESS
direct_access_index_specobjectImmutable

Specification for a Direct Access index. Set when index_type is DIRECT_ACCESS.

Show child attributesHide child attributes
embedding_vector_columnsarray of object

Columns that hold precomputed embedding vectors. A single vector column is supported, and it cannot be the primary key.

Show child attributesHide child attributes
namestring

Name of the column that holds the precomputed embedding vectors.

embedding_dimensionint32

Number of elements in each embedding vector. It must be positive.

schema_jsonstring

The schema of the index in JSON format, mapping each column name to its type. Supported types are integer, long, float, double, boolean, string, date, timestamp. Supported types for vector columns: array<float>, array<double>. The schema must include the primary key column and the embedding vector column.

embedding_source_columnsarray of object

Columns that contain the text to embed, each with the model endpoint that computes its embeddings.

Show child attributesHide child attributes
namestring

Name of the column whose text is embedded.

embedding_model_endpointstring

Name of the embedding model endpoint, used by default for both ingestion and querying.

model_endpoint_name_for_querystring

Name of the embedding model endpoint which, if specified, is used for querying (not ingestion).

delta_sync_index_specobjectImmutable

Specification for a Delta Sync index. Set when index_type is DELTA_SYNC.

Show child attributesHide child attributes
source_tablestring

Three-level Unity Catalog name of the source Delta table, in the form catalog.schema.table.

Example: main.default.docs

embedding_source_columnsarray of object

Columns whose text Databricks embeds during sync, using the model endpoint named on each column. Set either this field or embedding_vector_columns, not both.

Show child attributesHide child attributes
namestring

Name of the column whose text is embedded.

embedding_model_endpointstring

Name of the embedding model endpoint, used by default for both ingestion and querying.

model_endpoint_name_for_querystring

Name of the embedding model endpoint which, if specified, is used for querying (not ingestion).

embedding_vector_columnsarray of object

Columns of the source table that already hold precomputed embedding vectors. Set either this field or embedding_source_columns, not both.

Show child attributesHide child attributes
namestring

Name of the column that holds the precomputed embedding vectors.

embedding_dimensionint32

Number of elements in each embedding vector. It must be positive.

embedding_writeback_tablestring

Three-level name of a Delta table to write the synced rows and computed embeddings to. It applies only when embeddings are computed from embedding_source_columns, and the table must not already exist.

columns_to_syncarray of string

Columns of the source table to include in the index. When empty, all columns are synced. The primary key and the embedding source or vector column are always synced. Only synced columns can be returned in query results or used in filters.

pipeline_idstringOutput only

The ID of the pipeline that is used to sync the index.

pipeline_typestring

Sync mode of the pipeline that keeps the index up to date. TRIGGERED syncs at creation and then each time SyncIndex is called; CONTINUOUS processes source changes as they arrive. Storage Optimized endpoints accept only TRIGGERED, and an unset value is rejected.

Values:

  • TRIGGERED
  • CONTINUOUS
statusobjectOutput only

Current status of the index.

Show child attributesHide child attributes
detailed_statestringOutput only

Lifecycle and ingestion state. An online index can still have a failed update.

Values:

Show 15 possible values
  • PROVISIONING
  • PROVISIONING_ENDPOINT
  • PROVISIONING_INDEX
  • PROVISIONING_PIPELINE_RESOURCES
  • PROVISIONING_INITIAL_SNAPSHOT
  • ONLINE
  • ONLINE_CONTINUOUS_UPDATE
  • ONLINE_TRIGGERED_UPDATE
  • ONLINE_NO_PENDING_UPDATE
  • ONLINE_DIRECT_ACCESS
  • OFFLINE
  • OFFLINE_FAILED
  • ONLINE_PIPELINE_FAILED
  • ONLINE_UPDATING_PIPELINE_RESOURCES
  • DOWNLOADING
messagestringOutput only

Human-readable detail about the index's current state.

indexed_row_countint64Output only

Number of rows indexed.

readybooleanOutput only

Whether the index can serve queries. After CreateIndex, poll GetIndex until true; message describes progress. This does not guarantee freshness or update success; check detailed_state for update failures.

index_urlstringOutput only

Index API URL used to perform operations on the index.

creatorstringOutput only

Creator of the index.

Example: john@example.com

index_subtypestringImmutable

Subtype of the index. Use HYBRID for vector and hybrid search, or FULL_TEXT for keyword-only search without embeddings; VECTOR is not a supported create value. Set on create and immutable thereafter.

Values:

  • VECTOR
  • FULL_TEXT
  • HYBRID

Get an AI Search index GA​

GET /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}

Get details for a single AI Search index.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Response​

Returns the Index object.

List AI Search indexes GA​

GET /api/2.0/ai-search/{parent=workspaces/*/endpoints/*}/indexes

List AI Search indexes on an endpoint.

API scopes: ai-search

Parameters​

parentstringRequiredpath

The Endpoint that owns this collection of indexes. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}

page_sizeint32query

Maximum number of indexes to return. When unset, every index on the endpoint is returned.

page_tokenstringquery

Page token from a previous response. If not provided, returns the first page.

Response​

Returns a list of Index objects.

Create an AI Search index GA​

POST /api/2.0/ai-search/{parent=workspaces/*/endpoints/*}/indexes

Create a new AI Search index. The index is provisioned asynchronously; status.ready on GetIndex reports when it can serve queries.

API scopes: ai-search

Parameters​

parentstringRequiredpath

The Endpoint where this Index will be created. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}

index_idstringquery

Three-level Unity Catalog table name for the new index, in the form catalog.schema.name. The server composes the full Index.name as {parent}/indexes/{index_id} and rejects an empty value.

Example: main.default.docs_index

Request body​

The Index resource to create. Fields other than index.name carry the desired configuration; index.name is server-assigned from parent and index_id.

namestringIDImmutable

Name of the AI Search index. Server-assigned full resource path (workspaces/{workspace}/endpoints/{endpoint}/indexes/{index}) on output, where {index} is the index's Unity Catalog table name. On create, the user-supplied UC table name is conveyed via CreateIndexRequest.index_id; the server composes the full name and returns it on the response.

Example: workspaces/1234567890123456/endpoints/docs-endpoint/indexes/main.default.docs_index

primary_keystringRequiredImmutable

Name of the column that uniquely identifies each row. It must exist in the source table (Delta Sync) or in schema_json (Direct Access) and cannot be the embedding source or vector column. Set on create and immutable thereafter.

index_typestringRequiredImmutable

Type of index. A DELTA_SYNC index is kept in sync with a source Delta table; a DIRECT_ACCESS index holds rows that you write through UpsertData and RemoveData. Set on create and immutable thereafter.

Values:

  • DELTA_SYNC
  • DIRECT_ACCESS
direct_access_index_specobjectImmutable

Specification for a Direct Access index. Set when index_type is DIRECT_ACCESS.

Show child attributesHide child attributes
embedding_vector_columnsarray of object

Columns that hold precomputed embedding vectors. A single vector column is supported, and it cannot be the primary key.

Show child attributesHide child attributes
namestring

Name of the column that holds the precomputed embedding vectors.

embedding_dimensionint32

Number of elements in each embedding vector. It must be positive.

schema_jsonstring

The schema of the index in JSON format, mapping each column name to its type. Supported types are integer, long, float, double, boolean, string, date, timestamp. Supported types for vector columns: array<float>, array<double>. The schema must include the primary key column and the embedding vector column.

embedding_source_columnsarray of object

Columns that contain the text to embed, each with the model endpoint that computes its embeddings.

Show child attributesHide child attributes
namestring

Name of the column whose text is embedded.

embedding_model_endpointstring

Name of the embedding model endpoint, used by default for both ingestion and querying.

model_endpoint_name_for_querystring

Name of the embedding model endpoint which, if specified, is used for querying (not ingestion).

delta_sync_index_specobjectImmutable

Specification for a Delta Sync index. Set when index_type is DELTA_SYNC.

Show child attributesHide child attributes
source_tablestring

Three-level Unity Catalog name of the source Delta table, in the form catalog.schema.table.

Example: main.default.docs

embedding_source_columnsarray of object

Columns whose text Databricks embeds during sync, using the model endpoint named on each column. Set either this field or embedding_vector_columns, not both.

Show child attributesHide child attributes
namestring

Name of the column whose text is embedded.

embedding_model_endpointstring

Name of the embedding model endpoint, used by default for both ingestion and querying.

model_endpoint_name_for_querystring

Name of the embedding model endpoint which, if specified, is used for querying (not ingestion).

embedding_vector_columnsarray of object

Columns of the source table that already hold precomputed embedding vectors. Set either this field or embedding_source_columns, not both.

Show child attributesHide child attributes
namestring

Name of the column that holds the precomputed embedding vectors.

embedding_dimensionint32

Number of elements in each embedding vector. It must be positive.

embedding_writeback_tablestring

Three-level name of a Delta table to write the synced rows and computed embeddings to. It applies only when embeddings are computed from embedding_source_columns, and the table must not already exist.

columns_to_syncarray of string

Columns of the source table to include in the index. When empty, all columns are synced. The primary key and the embedding source or vector column are always synced. Only synced columns can be returned in query results or used in filters.

pipeline_typestringRequired

Sync mode of the pipeline that keeps the index up to date. TRIGGERED syncs at creation and then each time SyncIndex is called; CONTINUOUS processes source changes as they arrive. Storage Optimized endpoints accept only TRIGGERED, and an unset value is rejected.

Values:

  • TRIGGERED
  • CONTINUOUS
index_subtypestringImmutable

Subtype of the index. Use HYBRID for vector and hybrid search, or FULL_TEXT for keyword-only search without embeddings; VECTOR is not a supported create value. Set on create and immutable thereafter.

Values:

  • VECTOR
  • FULL_TEXT
  • HYBRID

Response​

Returns the Index object.

Delete an AI Search index GA​

DELETE /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}

Delete an AI Search index.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index to delete. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Query an AI Search index GA​

POST /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}:query

Query (search) an AI Search index. Read-only, so a read-scoped token may invoke it.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index to query. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Request body​

columnsarray of stringRequired

Columns to include in each result row. Only columns that are part of the index can be returned.

query_vectorarray of floatdouble

Query vector. Required for Direct Access indexes and Delta Sync indexes with self-managed vectors.

query_textstring

Query text. Required for Delta Sync indexes that compute embeddings from a model endpoint, and for HYBRID and FULL_TEXT queries.

filters_jsonstring

JSON object of filters to apply, serialized as a string. Each key is a column name with an optional operator suffix such as <, >=, NOT, or OR, and each value is the value to compare against. Only columns that are part of the index can be filtered. See https://docs.databricks.com/aws/en/ai-search/query-ai-search#filters for the supported operators.

score_thresholdfloatdouble

Score threshold for the approximate nearest-neighbor search; results that score below it are not returned. Defaults to 0.0.

query_typestring

Query type: ANN for vector similarity search, HYBRID for combined vector and keyword search, or FULL_TEXT for keyword search without embeddings. Defaults to ANN.

columns_to_rerankarray of string

Columns whose values are sent to the reranker.

rerankerobject

If set, results are reranked before being returned. See https://docs.databricks.com/aws/en/ai-search/query-ai-search#rerank for details.

Show child attributesHide child attributes
modelstring

Reranker identifier: "databricks_reranker" for the base model, or a Model Serving endpoint name when model_type is MODEL_TYPE_FINETUNED.

parametersobject

Parameters controlling reranking.

Show child attributesHide child attributes
columns_to_rerankarray of string

Columns whose values are concatenated and sent to the reranker.

model_typestring

Discriminator for how model is interpreted.

Values:

  • MODEL_TYPE_BASE
  • MODEL_TYPE_FINETUNED
query_columnsarray of string

Text columns to search for query_text. When empty, all text columns are searched.

sort_columnsarray of string

Sort clauses, e.g. ["rating DESC", "price ASC"]. Overrides relevance ordering.

facetsarray of string

Facets to compute over the matched results (e.g. "category TOP 5").

max_resultsint32

Maximum number of results to return. Defaults to 10. It corresponds to num_results in the Vector Search API.

Response​

manifestobjectOutput only

Metadata describing the result columns.

Show child attributesHide child attributes
column_countint32Output only

Number of columns in the result set.

columnsarray of objectOutput only

Information about each column in the result set.

Show child attributesHide child attributes
namestringOutput only

Name of the column.

type_textstringOutput only

Data type of the column (e.g., "string", "int", "array<float>").

facet_column_countint32Output only

Number of columns in the facet result.

facet_columnsarray of objectOutput only

Information about each facet column.

Show child attributesHide child attributes
namestringOutput only

Name of the column.

type_textstringOutput only

Data type of the column (e.g., "string", "int", "array<float>").

resultobjectOutput only

The matched result rows.

Show child attributesHide child attributes
row_countint32Output only

Number of rows in the result set.

data_arrayarray of array of objectOutput only

Result rows; each row is a list of column values aligned with the manifest columns.

facet_resultobjectOutput only

Facet aggregation rows, when facets were requested.

Show child attributesHide child attributes
facet_row_countint32Output only

Number of facet rows returned.

facet_arrayarray of array of objectOutput only

Facet rows; each row is [facet_column_name, value_or_range, count].

Remove data from an AI Search index GA​

POST /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}:removeData

Remove rows by primary key from a Direct Access AI Search index.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index. Must be a Direct Access index. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Request body​

primary_keysarray of stringRequired

Primary keys of the rows to remove.

Response​

statusstringOutput only

Overall status of the delete: SUCCESS when every row was removed, PARTIAL_SUCCESS when some rows failed (see result.failed_primary_keys), or FAILURE when the operation failed.

Values:

  • SUCCESS
  • PARTIAL_SUCCESS
  • FAILURE
resultobjectOutput only

Per-row outcome of the delete.

Show child attributesHide child attributes
success_row_countint64Output only

Count of rows processed successfully.

failed_primary_keysarray of stringOutput only

Primary keys of rows that failed to process.

Scan an AI Search index GA​

POST /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}:scan

Scan (paginate over) the rows of an AI Search index.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index to scan. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Request body​

page_sizeint32

Maximum number of rows to return in this page. Defaults to 10.

page_tokenstring

Page token from a previous response; if unset, scanning starts from the beginning.

Response​

dataarray of objectOutput only

Rows in this page, ordered by primary key. Each row is a JSON object that maps column names to values.

next_page_tokenstringOutput only

Token for the next page; empty when the scan is exhausted.

Synchronize an AI Search index GA​

POST /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}:sync

Start a sync of a Delta Sync AI Search index with its source Delta table. Use it with TRIGGERED pipelines; CONTINUOUS pipelines sync automatically. Direct Access indexes are written through UpsertData instead.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index to synchronize. Must be a Delta Sync index. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Upsert data into an AI Search index GA​

POST /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}:upsertData

Upsert rows into a Direct Access AI Search index.

API scopes: ai-search

Parameters​

namestringRequiredpath

Full resource name of the index. Must be a Direct Access index. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}

Request body​

inputs_jsonstringRequired

JSON array of the rows to insert or update, serialized as a string. Each element is an object that maps column names to values and must include the primary key column; vector columns are given as arrays of numbers. A row whose primary key already exists is overwritten. The array must not be empty.

Response​

statusstringOutput only

Overall status of the upsert: SUCCESS when every row was written, PARTIAL_SUCCESS when some rows failed (see result.failed_primary_keys), or FAILURE when the operation failed.

Values:

  • SUCCESS
  • PARTIAL_SUCCESS
  • FAILURE
resultobjectOutput only

Per-row outcome of the upsert.

Show child attributesHide child attributes
success_row_countint64Output only

Count of rows processed successfully.

failed_primary_keysarray of stringOutput only

Primary keys of rows that failed to process.