From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #734: How to bypass approximate index for certain query?
Date: Fri, 13 Dec 2024 15:08:07 +0000
Message-ID: <gh-pgvector-pgvector-734-c2541660769@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-734@github.com>
References: <gh-pgvector-pgvector-734@github.com>
Hi @mitya12342, you can change the `ORDER BY` clause to an expression that isn't indexed, like:
```sql
ORDER BY (embedding <=> $1) + 0
```
Alternatively, for IVFFlat, you can set `ivfflat.probes` to the number of lists.