Q3 Redis Domain 2 · 25–30% of exam Priority · Real Exam

What is the correct FT.SEARCH syntax for the 5 nearest neighbours of a query vector?

  1. A '*=>[KNN 5 @vec $BLOB AS score]' with PARAMS BLOB <bytes> and DIALECT 2 (correct answer)
  2. B '@vec:[5]'
  3. C 'KNN 5 vec'
  4. D 'FT.KNN idx 5'

Shortcut: KNN queries use the =>[KNN k @field $param] syntax, require the vector passed as a binary parameter via PARAMS, and need DIALECT 2 or higher.