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

Which Redis command creates a vector index supporting KNN search over a HASH field?

  1. A FT.CREATE idx ON HASH SCHEMA vec VECTOR HNSW 6 TYPE FLOAT32 DIM 1536 DISTANCE_METRIC COSINE (correct answer)
  2. B SET idx vector
  3. C ZADD idx 0 vec
  4. D JSON.SET idx $ vec

Shortcut: CREATE with a VECTOR field defines the algorithm (HNSW or FLAT) plus TYPE, DIM, and DISTANCE_METRIC. The attribute count must match the number of parameters supplied.

FT.CREATE with a VECTOR field defines the algorithm (HNSW or FLAT) plus TYPE, DIM, and DISTANCE_METRIC. The attribute count must match the number of parameters supplied.