face-postgre
face-postgre copied to clipboard
issue while executing query
[42883] ERROR: operator does not exist: cube <-> cube
Hi i am getting this error
My query is
**SELECT name FROM vectors WHERE (cube(array[-0.15382039546966553,0.01020173728466034]) <-> vec_low ) **
@vearutop is it necessary to perform
SELECT name FROM vectors WHERE sqrt(power(CUBE(array[{}]) <-> vec ,2) when i am finding that i am able to save 128 dimension in cube?
Thanks
You are likely missing cube
extension (https://github.com/vearutop/face-postgre/blob/master/db.py#L6) if you receive such error.
By default cube extension is limited to 100 floats in a vector, if you have a patched PostgreSQL version that allows 128 dimensions you can simplify query to SELECT name FROM vectors WHERE CUBE(array[{}]) <-> vec
. No need to sqrt(power(..))
.