jtibshirani opened a new pull request #656:
URL: https://github.com/apache/lucene/pull/656


   This PR adds support for a query filter in KnnVectorQuery. First, we gather 
the
   query results for each leaf as a bit set. Then the HNSW search skips over the
   non-matching documents (using the same approach as for live docs). To prevent
   HNSW search from visiting too many documents when the filter is very 
selective,
   we short-circuit if HNSW has already visited more than the number of 
documents
   that match the filter, and execute an exact search instead. This bounds the
   number of visited documents at roughly 2x the cost of just running the exact
   filter, while in most cases HNSW completes successfully and does a lot 
better.
   
   Co-authored-by: Joel Bernstein <jbern...@apache.org>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to