-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
Description
When using client.ft.create() to create an index schema containing a VECTOR field with INDEXMISSING: true, the client serializes the FT.CREATE command with INDEXMISSING immediately after VECTOR, before the required vector algorithm token (HNSW/FLAT). Redis expects the algorithm to follow VECTOR positionally, so the generated command is invalid and fails.
await client.ft.create(
'idx:example',
{
vector1: {
type: 'VECTOR',
ALGORITHM: 'HNSW',
TYPE: 'FLOAT32',
DIM: 5,
DISTANCE_METRIC: 'L2',
INDEXMISSING: true,
},
},
{ ON: 'HASH' }
);Actual Generated Command
"FT.CREATE" "idx:example" "ON" "HASH" "SCHEMA"
"vector1" "VECTOR" "INDEXMISSING" "HNSW" "6"
"TYPE" "FLOAT32" "DIM" "5" "DISTANCE_METRIC" "L2"
Expected Generated Command
"FT.CREATE" "idx:example" "ON" "HASH" "SCHEMA"
"vector1" "VECTOR" "HNSW" "6"
"TYPE" "FLOAT32" "DIM" "5" "DISTANCE_METRIC" "L2"
"INDEXMISSING"
Node.js Version
24
Redis Server Version
8.4
Node Redis Version
5.10.0
Reactions are currently unavailable