Skip to content

AiSearchIndex

laktory.models.resources.databricks.AiSearchIndex ¤

Bases: AiSearchIndexBase

Databricks AI Search Index

Searchable collection of records hosted on an AI Search endpoint, kept in sync with a source Delta table (DELTA_SYNC) or written to through the API (DIRECT_ACCESS). Replacement of VectorSearchIndex. Can also be declared directly in the indexes of an AiSearchEndpoint.

Examples:

import io

from laktory import models

index_yaml = '''
parent: workspaces/1234567890/endpoints/default
index_id: dev.finance.stock_news_index
primary_key: id
index_type: DELTA_SYNC
delta_sync_index_spec:
  source_table: dev.finance.slv_stock_news
  pipeline_type: TRIGGERED
  embedding_source_columns:
  - name: text
    embedding_model_endpoint: databricks-gte-large-en
'''
index = models.resources.databricks.AiSearchIndex.model_validate_yaml(
    io.StringIO(index_yaml)
)
References
BASE DESCRIPTION
delta_sync_index_spec

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

TYPE: AiSearchIndexDeltaSyncIndexSpec | None | VariableType DEFAULT: None

direct_access_index_spec

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

TYPE: AiSearchIndexDirectAccessIndexSpec | None | VariableType DEFAULT: None

index_id

The user-supplied Unity Catalog table name for the Index, per AIP-133. The server composes the full Index.name as {parent}/indexes/{index_id}. AIP-133 does not list index_id as a fields-may-be-required entry, so we annotate it OPTIONAL on the wire; the server still rejects empty values with INVALID_PARAMETER_VALUE

TYPE: str | None | VariableType DEFAULT: None

index_subtype

The subtype of the index. Set on create and immutable thereafter. Possible values are: FULL_TEXT, HYBRID, VECTOR

TYPE: str | None | VariableType DEFAULT: None

index_type

Type of index. Required on create and immutable thereafter. Possible values are: DELTA_SYNC, DIRECT_ACCESS

TYPE: str | VariableType

parent

Endpoint hosting the index, in the format workspaces/{workspace_id}/endpoints/{endpoint_id}. Set automatically when declared in the indexes of an endpoint.

TYPE: str | VariableType DEFAULT: None

primary_key

Primary key of the index. Set on create and immutable thereafter

TYPE: str | VariableType

provider_config

Configure the provider for management through account provider

TYPE: AiSearchIndexProviderConfig | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexDeltaSyncIndexSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
columns_to_sync

[Optional] Select the columns to sync with the index. If left blank, all columns from the source table are synced. The primary key column and embedding source or vector column are always synced

TYPE: list[str] | None | VariableType DEFAULT: None

embedding_source_columns

The columns that contain the embedding source

TYPE: list[AiSearchIndexDeltaSyncIndexSpecEmbeddingSourceColumns] | None | VariableType DEFAULT: None

embedding_vector_columns

The columns that contain the embedding vectors

TYPE: list[AiSearchIndexDeltaSyncIndexSpecEmbeddingVectorColumns] | None | VariableType DEFAULT: None

embedding_writeback_table

[Optional] Name of the Delta table to sync the index contents and computed embeddings to

TYPE: str | None | VariableType DEFAULT: None

pipeline_type

Pipeline execution mode. Required on create — the backend rejects an unset value. Storage Optimized endpoints accept only TRIGGERED; Standard endpoints accept both. No explicit stage — a REQUIRED field staged below its service would be dropped from combined specs while remaining in required, tripping the OpenAPI required-vs-properties consistency check. The field inherits the service's launch stage. Possible values are: CONTINUOUS, TRIGGERED

TYPE: str | VariableType

source_table

The full name of the source Delta table

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexDeltaSyncIndexSpecEmbeddingSourceColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_model_endpoint

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

TYPE: str | None | VariableType DEFAULT: None

model_endpoint_name_for_query

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

TYPE: str | None | VariableType DEFAULT: None

name

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

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexDeltaSyncIndexSpecEmbeddingVectorColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_dimension

Dimension of the embedding vector

TYPE: int | None | VariableType DEFAULT: None

name

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

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexDirectAccessIndexSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_source_columns

The columns that contain the embedding source

TYPE: list[AiSearchIndexDirectAccessIndexSpecEmbeddingSourceColumns] | None | VariableType DEFAULT: None

embedding_vector_columns

The columns that contain the embedding vectors

TYPE: list[AiSearchIndexDirectAccessIndexSpecEmbeddingVectorColumns] | None | VariableType DEFAULT: None

schema_json_

The schema of the index in JSON format. Supported types are integer, long, float, double, boolean, string, date, timestamp. Supported types for vector columns: array<float>, array<double>

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexDirectAccessIndexSpecEmbeddingSourceColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_model_endpoint

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

TYPE: str | None | VariableType DEFAULT: None

model_endpoint_name_for_query

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

TYPE: str | None | VariableType DEFAULT: None

name

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

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexDirectAccessIndexSpecEmbeddingVectorColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_dimension

Dimension of the embedding vector

TYPE: int | None | VariableType DEFAULT: None

name

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

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.aisearchindex.AiSearchIndexProviderConfig ¤

Bases: BaseModel

PARAMETER DESCRIPTION
workspace_id

Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with

TYPE: str | None | VariableType DEFAULT: None