redis-stack / redis-stack-docs

6 stars 55 forks source link

Redis as a vector database quick start guide #250

Open tshaiman opened 8 months ago

tshaiman commented 8 months ago

whem trying to create the index using the command on the tutorial

FT.CREATE idx:bikes_vss ON JSON 
  PREFIX 1 bikes: SCORE 1.0 
  SCHEMA 
    $.model TEXT WEIGHT 1.0 NOSTEM 
    $.brand TEXT WEIGHT 1.0 NOSTEM 
    $.price NUMERIC 
    $.type TAG SEPARATOR "," 
    $.description AS description TEXT WEIGHT 1.0 
    $.description_embeddings AS vector VECTOR FLAT 6 TYPE FLOAT32 DIM 768 DISTANCE_METRIC COSINE

you get an error : "Unknown argument ``"

image

dwdougherty commented 8 months ago

Have you tried running the command all on a single line, as follows?

FT.CREATE idx:bikes_vss ON JSON PREFIX 1 bikes: SCORE 1.0 SCHEMA $.model TEXT WEIGHT 1.0 NOSTEM $.brand TEXT WEIGHT 1.0 NOSTEM $.price NUMERIC $.type TAG SEPARATOR "," $.description AS description TEXT WEIGHT 1.0 $.description_embeddings AS vector VECTOR FLAT 6 TYPE FLOAT32 DIM 768 DISTANCE_METRIC COSINE