From: mahdimanesh (@mahdimanesh) <noreply+mahdimanesh@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #816: 90GB sized HSNW index not used
Date: Tue, 08 Apr 2025 08:03:17 +0000
Message-ID: <gh-pgvector-pgvector-816-c2785583958@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-816@github.com>
References: <gh-pgvector-pgvector-816@github.com>
So you mean my query like this is incorrect:
`SELECT *
FROM langchain_pg_embedding
WHERE collection_id = 'my-uuid'
ORDER BY embedding <=> '[my-vector]'
LIMIT 4;`
And I should try...
`SELECT *
FROM langchain_pg_embedding
WHERE collection_id = 'my-uuid'
ORDER BY embedding::vector(1024) <=> '[my-vector]'. -- Explicit typecast?!
LIMIT 4;`
=> Tested and it works! Many thx, @ankane! Saved my day. :-)