pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #716: LIMIT clause is not Respected > 40 < 2575
3+ messages / 2 participants
[nested] [flat]
* [pgvector/pgvector] issue #716: LIMIT clause is not Respected > 40 < 2575
@ 2024-11-22 20:16 "dpresonate (@dpresonate)" <noreply+dpresonate@github.com>
0 siblings, 0 replies; 3+ messages in thread
From: dpresonate (@dpresonate) @ 2024-11-22 20:16 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Noticing some unexpected behavior when I run a query. I am using the following query:
```SQL
SELECT *, embedding <=> ('[...]') AS distance FROM public.<table>
WHERE embedding <=> ('[...]') < ('1.0'::double precision) ORDER BY distance LIMIT 50
```
When I run this query, I am only getting 40 results returned. This happens for and LIMIT > 40. However when I go to >= 2575 I am getting the correct number returned. What is going on here, is this a bug?
I created the table with the following:
```SQL
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE TABLE IF NOT EXISTS vector_store (
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
content text,
metadata json,
embedding vector(1536) // 1536 is the default embedding dimension
);
CREATE INDEX ON vector_store USING HNSW (embedding vector_cosine_ops);
```
^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #716: LIMIT clause is not Respected > 40 < 2575
@ 2024-11-22 20:19 "ankane (@ankane)" <noreply+ankane@github.com>
1 sibling, 0 replies; 3+ messages in thread
From: ankane (@ankane) @ 2024-11-22 20:19 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @dpresonate, check out the [troubleshooting docs](https://github.com/pgvector/pgvector?tab=readme-ov-file#why-are-there-less-results-for-a-query-after...).
^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #716: LIMIT clause is not Respected > 40 < 2575
@ 2024-11-22 20:19 "ankane (@ankane)" <noreply+ankane@github.com>
1 sibling, 0 replies; 3+ messages in thread
From: ankane (@ankane) @ 2024-11-22 20:19 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-11-22 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-22 20:16 [pgvector/pgvector] issue #716: LIMIT clause is not Respected > 40 < 2575 "dpresonate (@dpresonate)" <noreply+dpresonate@github.com>
2024-11-22 20:19 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-11-22 20:19 ` "ankane (@ankane)" <noreply+ankane@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox