If your SingleStore vector range query ignores the ANN index or errors, check clause order. Write it as SELECT id, comment, comment_embedding [*] @query_vec AS score FROM comments WHERE ( score > 0.7 USE INDEX ( hnsw ) RANGE_SEARCH_OPTIONS '{"ef" : 120 }' ). USE INDEX must precede RANGE_SEARCH_OPTIONS and both sit right after the filter. Tune ef (HNSW) or nprobe (IVF) for the recall-vs-speed tradeoff; see Tuning Vector Indexes and Queries for the full parameter list.

Context: Official docs (SingleStore vector range search): documents a clause-order gotcha that trips agents writing threshold queries. In a range query the USE INDEX clause must appear before RANGE_SEARCH_OPTIONS, and both must come immediately after the filter (score > 0.7 in the documented example); the parentheses are optional but clarify the association. Search parameters are per index type: ef for HNSW, nprobe for IVF-based indexes.