Index
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.
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 viaCreateIndexRequest.index_id; the server composes the fullnameand returns it on the response.
- endpointstringOutput only
Name of the endpoint associated with the index. Ignored on create — the endpoint is taken from
CreateIndexRequest.parent; populated only on output.
- 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_SYNCindex is kept in sync with a source Delta table; aDIRECT_ACCESSindex holds rows that you write through UpsertData and RemoveData. Set on create and immutable thereafter.DELTA_SYNCDIRECT_ACCESS
- direct_access_index_specobjectImmutable
Specification for a Direct Access index. Set when
index_typeisDIRECT_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_typeisDELTA_SYNC.Show child attributesHide child attributes
- source_tablestring
Three-level Unity Catalog name of the source Delta table, in the form
catalog.schema.table.
- 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.
TRIGGEREDsyncs at creation and then each time SyncIndex is called;CONTINUOUSprocesses source changes as they arrive. Storage Optimized endpoints accept onlyTRIGGERED, and an unset value is rejected.TRIGGEREDCONTINUOUS
- 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.
Show 15 possible values
PROVISIONINGPROVISIONING_ENDPOINTPROVISIONING_INDEXPROVISIONING_PIPELINE_RESOURCESPROVISIONING_INITIAL_SNAPSHOTONLINEONLINE_CONTINUOUS_UPDATEONLINE_TRIGGERED_UPDATEONLINE_NO_PENDING_UPDATEONLINE_DIRECT_ACCESSOFFLINEOFFLINE_FAILEDONLINE_PIPELINE_FAILEDONLINE_UPDATING_PIPELINE_RESOURCESDOWNLOADING
- 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.
- index_subtypestringImmutable
Subtype of the index. Use
HYBRIDfor vector and hybrid search, orFULL_TEXTfor keyword-only search without embeddings;VECTORis not a supported create value. Set on create and immutable thereafter.VECTORFULL_TEXTHYBRID
Get an AI Search index GA
GET
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
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
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 fullIndex.nameas{parent}/indexes/{index_id}and rejects an empty value.
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 viaCreateIndexRequest.index_id; the server composes the fullnameand returns it on the response.
- 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_SYNCindex is kept in sync with a source Delta table; aDIRECT_ACCESSindex holds rows that you write through UpsertData and RemoveData. Set on create and immutable thereafter.DELTA_SYNCDIRECT_ACCESS
- direct_access_index_specobjectImmutable
Specification for a Direct Access index. Set when
index_typeisDIRECT_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_typeisDELTA_SYNC.Show child attributesHide child attributes
- source_tablestring
Three-level Unity Catalog name of the source Delta table, in the form
catalog.schema.table.
- 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.
TRIGGEREDsyncs at creation and then each time SyncIndex is called;CONTINUOUSprocesses source changes as they arrive. Storage Optimized endpoints accept onlyTRIGGERED, and an unset value is rejected.TRIGGEREDCONTINUOUS
- index_subtypestringImmutable
Subtype of the index. Use
HYBRIDfor vector and hybrid search, orFULL_TEXTfor keyword-only search without embeddings;VECTORis not a supported create value. Set on create and immutable thereafter.VECTORFULL_TEXTHYBRID
Response
Returns the Index object.
Delete an AI Search index GA
Query an AI Search index GA
POST
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
HYBRIDandFULL_TEXTqueries.
- 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, orOR, 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:
ANNfor vector similarity search,HYBRIDfor combined vector and keyword search, orFULL_TEXTfor keyword search without embeddings. Defaults toANN.
- 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_typeis 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
modelis interpreted.MODEL_TYPE_BASEMODEL_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_resultsin 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
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:
SUCCESSwhen every row was removed,PARTIAL_SUCCESSwhen some rows failed (seeresult.failed_primary_keys), orFAILUREwhen the operation failed.SUCCESSPARTIAL_SUCCESSFAILURE
- 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
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
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
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:
SUCCESSwhen every row was written,PARTIAL_SUCCESSwhen some rows failed (seeresult.failed_primary_keys), orFAILUREwhen the operation failed.SUCCESSPARTIAL_SUCCESSFAILURE
- 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.