You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/11/18 18:45:30 UTC

[GitHub] [lucene] msokolov commented on pull request #11946: add similarity threshold for hnsw

msokolov commented on PR #11946:
URL: https://github.com/apache/lucene/pull/11946#issuecomment-1320401647

   > If we use only post-filter in KnnVectorQuery, then we have to set k = Integer.MAX_VALUE (or another very big value) and calculate similarity with all vectors. So the complexity would be O(n).
   
   No, we don't have to do that. We can simply post-filter. Think of it like this - we want K matches with score > T. So we get the K top-scoring matches. If any have score less than T, we drop them. It's the same result as if we did the thresholding while collecting.


-- 
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-unsubscribe@lucene.apache.org

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


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