From dd57309281cf59676aaa0122b6bdaad6aa7ac48c Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 6 Mar 2024 00:27:50 -0800 Subject: [PATCH] Added section about HNSW results - #480 [skip ci] --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8993ed7..7ad6d38 100644 --- a/README.md +++ b/README.md @@ -581,6 +581,10 @@ or choose to store vectors inline: ALTER TABLE items ALTER COLUMN embedding SET STORAGE PLAIN; ``` +#### Why are there less results for a query after adding an HNSW index? + +Results are limited by the size of the dynamic candidate list (`hnsw.ef_search`). There may be even less results due to dead tuples or filtering conditions in the query. We recommend setting `hnsw.ef_search` to at least twice the `LIMIT` of the query. If you need more than 500 results, use an IVFFlat index instead. + #### Why are there less results for a query after adding an IVFFlat index? The index was likely created with too little data for the number of lists. Drop the index until the table has more data.