No operator matches the given name and argument types. You might need to add explicit type casts

 Hitting this error when running postgres with the following queries in python 

cur.execute("""
SELECT name, category, subcategory
FROM items
ORDER BY embedding <-> %s
LIMIT 3;
""", (query_emb,))

Appparently the fix is as follows 

cur.execute("""
SELECT name, category, subcategory
FROM items
ORDER BY embedding <-> %s::vector
LIMIT 3;
""", (query_emb,))



Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type