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-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