Skip to main content

ai-search command group

note

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

The ai-search command group within the Databricks CLI contains commands to manage AI Search endpoints and indexes. An AI Search endpoint represents the compute resources to host AI Search indexes. See AI Search.

databricks ai-search create-endpoint

Create an AI Search endpoint.

databricks ai-search create-endpoint PARENT ENDPOINT_TYPE [flags]

Arguments

PARENT

    The workspace where this endpoint will be created. Format: workspaces/{workspace_id}

ENDPOINT_TYPE

    Type of endpoint. Supported values: STANDARD, STORAGE_OPTIMIZED

Options

--budget-policy-id string

    The user-selected budget policy ID for the endpoint.

--endpoint-id string

    The user-supplied short name for the endpoint.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--name string

    Name of the AI Search endpoint.

--replica-count int

    The desired number of replicas for the endpoint.

--target-qps int

    Target QPS (queries per second) for the endpoint.

--usage-policy-id string

    The usage policy ID applied to the endpoint.

Global flags

databricks ai-search create-index

Create an AI Search index.

databricks ai-search create-index PARENT PRIMARY_KEY INDEX_TYPE [flags]

Arguments

PARENT

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

PRIMARY_KEY

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

INDEX_TYPE

    Type of index. Supported values: DELTA_SYNC, DIRECT_ACCESS

Options

--index-id string

    The user-supplied Unity Catalog table name for the index.

--index-subtype IndexSubtype

    The subtype of the index. Supported values: FULL_TEXT, HYBRID, VECTOR

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--name string

    Name of the AI Search index.

Global flags

databricks ai-search delete-endpoint

Delete an AI Search endpoint.

databricks ai-search delete-endpoint NAME [flags]

Arguments

NAME

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

Options

Global flags

databricks ai-search delete-index

Delete an AI Search index.

databricks ai-search delete-index NAME [flags]

Arguments

NAME

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

Options

Global flags

databricks ai-search get-endpoint

Get an AI Search endpoint.

databricks ai-search get-endpoint NAME [flags]

Arguments

NAME

    Full resource name of the endpoint. Format: workspaces/{workspace_id}/endpoints/{endpoint_id}

Options

Global flags

databricks ai-search get-index

Get an AI Search index.

databricks ai-search get-index NAME [flags]

Arguments

NAME

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

Options

Global flags

databricks ai-search list-endpoints

List AI Search endpoints.

databricks ai-search list-endpoints PARENT [flags]

Arguments

PARENT

    The workspace that owns this collection of endpoints. Format: workspaces/{workspace_id}

Options

--limit int

    Maximum number of results to return.

--page-size int

    Best-effort upper bound on the number of results to return.

Global flags

databricks ai-search list-indexes

List AI Search indexes.

databricks ai-search list-indexes PARENT [flags]

Arguments

PARENT

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

Options

--limit int

    Maximum number of results to return.

--page-size int

    Best-effort upper bound on the number of results to return.

Global flags

databricks ai-search query-index

Query an AI Search index.

databricks ai-search query-index NAME [flags]

Arguments

NAME

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

Options

--filters-json string

    JSON string describing query filters.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--max-results int

    Maximum number of results to return.

--query-text string

    Query text.

--query-type string

    Query type: ANN, HYBRID, or FULL_TEXT.

--score-threshold float

    Score threshold for the approximate nearest-neighbor search.

Global flags

databricks ai-search remove-data

Remove data from an AI Search index.

databricks ai-search remove-data NAME [flags]

Arguments

NAME

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

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

Global flags

databricks ai-search scan-index

Scan an AI Search index.

databricks ai-search scan-index NAME [flags]

Arguments

NAME

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

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--page-size int

    Maximum number of rows to return in this page.

--page-token string

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

Global flags

databricks ai-search sync-index

Synchronize an AI Search index.

databricks ai-search sync-index NAME [flags]

Arguments

NAME

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

Options

Global flags

databricks ai-search update-endpoint

Update an AI Search endpoint.

databricks ai-search update-endpoint NAME UPDATE_MASK ENDPOINT_TYPE [flags]

Arguments

NAME

    Name of the AI Search endpoint. Full resource path on output (Format: workspaces/{workspace_id}/endpoints/{endpoint_id}).

UPDATE_MASK

    The list of fields to update.

ENDPOINT_TYPE

    Type of endpoint. Supported values: STANDARD, STORAGE_OPTIMIZED

Options

--budget-policy-id string

    The user-selected budget policy ID for the endpoint.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--name string

    Name of the AI Search endpoint.

--replica-count int

    The desired number of replicas for the endpoint.

--target-qps int

    Target QPS (queries per second) for the endpoint.

--usage-policy-id string

    The usage policy ID applied to the endpoint.

Global flags

databricks ai-search upsert-data

Upsert data into an AI Search index.

databricks ai-search upsert-data NAME INPUTS_JSON [flags]

Arguments

NAME

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

INPUTS_JSON

    JSON document describing the rows to upsert.

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

Global flags

Global flags

--debug

  Whether to enable debug logging.

-h or --help

    Display help for the Databricks CLI or the related command group or the related command.

--log-file string

    A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.

--log-format format

    The log format type, text or json. The default value is text.

--log-level string

    A string representing the log format level. If not specified then the log format level is disabled.

-o, --output type

    The command output type, text or json. The default value is text.

-p, --profile string

    The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.

--progress-format format

    The format to display progress logs: default, append, inplace, or json

-t, --target string

    If applicable, the bundle target to use