Snowflake for Gen AI · Topic 8 of 13
Cortex Search Capabilities, Multi-Index Queries and Access Control
Cortex Search capabilities: multi-index queries, filters and scoring, access control privileges, and the SQL, Python and REST ways to query a service.
- 4 min
- Includes a diagram
- Multi-index:
multi_index_query; at least one vector index; preview; not in the Playground. - Filter operators:
@eq,@contains,@gte,@lte,@primarykey; combine with@and,@or,@not. - Query access: USAGE on service, database and schema; owner's rights.
What it is
Beyond creating a service, the exam tests what a service can do and how to query and secure it. The capabilities are hybrid retrieval, filtering, scoring controls, multiple indexes in one service and several query paths. The security model is object privileges with owner's rights.
How it works
Capabilities
- Hybrid search: vector search for meaning, keyword search for exact terms, then semantic reranking of the top results.
- Filters: applied to ATTRIBUTES columns with
@eq,@contains,@gte,@lteand@primarykey, combined with@and,@orand@not. - Scoring:
scoring_configadjusts ranking with numeric boosts, time decays and component weights. Reranking is on by default and can be turned off with"reranker": "none". Ascoring_profileoverridesscoring_config. - Result size:
limitdefaults to 10 and has a maximum of 1000. - Refresh: TARGET_LAG sets how far the service may trail the source. Indexing suspends automatically after five consecutive refresh failures.
Multi-index queries
A service can index several columns as text indexes, vector indexes or both. It can also use pre computed vectors you supply, which are indexed without embedding cost. The documentation marks multi-index queries as preview.
The multi_index_query parameter names which indexes to search, which reduces cost. Without it, all indexes are searched. Each query must include at least one vector index.
- Weights for texts, vectors and the reranker are relative to each other.
text_boostsandvector_boostsadjust individual indexes.- The Snowsight Playground does not support multi-index services and shows an error.
Multi-index querying is a preview feature, and the Snowsight Playground cannot test a multi-index service. Test it through SQL, Python or REST instead.
Access control requirements

| Action | Requirement |
|---|---|
| Create a service | SNOWFLAKE.CORTEX_USER or SNOWFLAKE.CORTEX_EMBED_USER database role, CREATE CORTEX SEARCH SERVICE on the schema (or schema OWNERSHIP), SELECT on the source, USAGE on the warehouse |
| Query | USAGE on the service, its database and its schema |
| Suspend and resume | OPERATE on the service |
| View refresh history | MONITOR, OPERATE or OWNERSHIP on the service |
Services run with owner's rights. A querier can see indexed data without access to the source tables, so the right to query the service is effectively the right to read what it indexes. Grant carefully and expose only the columns the audience should see.
Different ways to use Cortex Search
| Way | Notes |
|---|---|
SQL SNOWFLAKE.CORTEX.SEARCH_PREVIEW | Testing only; string literals only; higher latency; response capped at 300 KB |
Python snowflake.core | snowflake package 0.8.0 or later (1.6.0 for multi-index); search() takes query, columns, filter, limit |
| REST | POST /api/v2/databases/{database}/schemas/{schema}/cortex-search-services/{service_name}:query; response capped at 10 MB |
| Snowsight Playground | Interactive testing; not for multi-index services |
| Cortex Agents | A Cortex Search tool inside an agent |
| Cortex Knowledge Extensions | A shared search service from a provider |
The query body uses query (required), columns, filter, scoring_config, scoring_profile and limit.
SELECT SNOWFLAKE.CORTEX.SEARCH_PREVIEW(
'docs_search',
'{"query": "refund policy", "columns": ["chunk_text","doc_url"],
"filter": {"@eq": {"region": "EMEA"}}, "limit": 5}');
Other limits to know: throughput is 20 queries per second per service and 140 per account, and clients should back off on HTTP 429.
For an application, use REST or Python. SEARCH_PREVIEW is for validating a service while you build.
Common mistakes
Putting SEARCH_PREVIEW behind an app. It is documented for testing and validation only.
Filtering on a column not in ATTRIBUTES. It cannot be used as a filter.
Granting SELECT on the source to let users search. Users need USAGE on service, database and schema.
Believing owner's rights are harmless. They let a role read indexed content without table access.
Hammering the service. Respect the 20 QPS limit and retry on 429.
What to remember for the exam
- Multi-index:
multi_index_query; at least one vector index; preview; not in the Playground. - Filter operators:
@eq,@contains,@gte,@lte,@primarykey; combine with@and,@or,@not. - Query access: USAGE on service, database and schema; owner's rights.
- Reranker off:
"reranker": "none". - SQL preview is for testing; Python and REST for apps.
Check yourself
What does a role need to query a Cortex Search service?
USAGE on the service, its database and its schema.
Why can a user read indexed data without SELECT on the table?
The service runs with owner's rights.
Which parameter restricts a multi-index query to chosen indexes?
multi_index_query.
Topic 8 of 13 in Snowflake for Gen AI
Test yourself on Snowflake for Gen AI
The full Snowflake GES-C02 question bank has 585 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.