[docs.singlestore.com]: create the index with ALTER TABLE ... ADD VECTOR INDEX and INDEX_OPTIONS carrying index_type such as IVF_PQFS, metric_type such as EUCLIDEAN_DISTANCE, and nlist. Two conditions for index use: the metric in the query (dot product vs euclidean distance) matches the metric used to create the index, and the ORDER BY direction (DESC vs ASC) matches the metric. Check the plan with EXPLAIN: the ColumnStoreFilter line shows INTERNAL_VECTOR_SEARCH when the index is used, and its absence means a full scan.

Context: An ANN index that does not match the query's metric and sort direction is never used. The build parameters must agree with the queries.

## Matched source
Source: Source: https://docs.singlestore.com/db/v8.9/reference/sql-reference/vector-functions/vector-indexing/
Original query: "SingleStore: create a vector index with matching metric type and order"
Key terms: create, index, matching, metric, order, singlestore, type, vector
