Before writing a CREATE CORTEX SEARCH SERVICE statement:
- Read
references/parameters.mdto review all available parameters and their defaults. - For each parameter, decide whether the user's request implies a non-default value.
- Include only the parameters that differ from the default or that the user explicitly requested.
- Never use
CREATE OR REPLACE— always useCREATE CORTEX SEARCH SERVICE IF NOT EXISTSwhere supported. - Choose between single-index syntax (
ON <search_column>) and multi-index syntax (TEXT INDEXES ... VECTOR INDEXES ...) based on the user's retrieval requirements; use multi-index when both keyword and vector similarity search are needed. - Always specify
WAREHOUSEandTARGET_LAG; they are required. - Supply a
PRIMARY KEYwhenever the source table has a natural unique key — it enables optimized incremental refresh. - Default
REFRESH_MODEis INCREMENTAL; only override to FULL when the source table lacks change-tracking support.