CORTEX_SEARCH_BATCH

functionsupportedAI & ML

docs.snowflake.com ↗

Table functions

This table function submits a batch of queries to a Cortex Search service for high-throughput offline use cases such as entity resolution, deduplication, audience matching, or clustering. Batch search uses dedicated serverless compute that scales independently of interactive search traffic. For a full guide including cost considerations, usage notes, and examples, see Batch Cortex Search.

Syntax

supportedpartialnot supportednot scored

CORTEX_SEARCH_BATCH(
      SERVICE_NAME => '<string>'
      [, QUERY => <string_column> ]
      [, MULTI_INDEX_QUERY => <variant_column> ]
      [, FILTER => <variant_column> ]
      [, LIMIT => <integer> ]
      [, OPTIONS => <variant_column> ]
)

Parameters

NameRequiredDescription
SERVICE_NAME => 'string'requiredFully-qualified name of the Cortex Search service to query. You can specify any of the following: Unqualified name (service_name) Partially qualified name (schema_name.service_name) Fully qualified name (database_name.schema_name.service_name)
QUERY => string_columnoptionalColumn containing query strings for searching the service.
MULTI_INDEX_QUERY => variant_columnoptionalColumn containing an object that specifies one or more vector or keyword query inputs to search against the service index. See multi_index_query for details.
FILTER => variant_columnoptionalColumn containing filter objects to apply to the search results.
LIMIT => integeroptionalMaximum number of results to return per query. Default: 10.
OPTIONS => variant_columnoptionalColumn containing a VARIANT object with optional per-query settings. Supported keys: scoring_config: Customize ranking for the query. See Customize scoring. replicas: Number of index copies serving the query (default: 2). Higher values complete jobs faster.

Usage notes

Output

The function returns columns from the indexed service data that match each query, including relevance scores.