sgup432 commented on code in PR #15836:
URL: https://github.com/apache/lucene/pull/15836#discussion_r2962274618


##########
lucene/core/src/java/org/apache/lucene/search/AbstractVectorSimilarityQuery.java:
##########
@@ -122,7 +122,17 @@ public ScorerSupplier scorerSupplier(LeafReaderContext 
context) throws IOExcepti
 
         // If there is no filter
         if (filterWeight == null) {
-          // Return exhaustive results
+          if (traversalSimilarity == Float.NEGATIVE_INFINITY && queryTimeout 
== null) {
+            // When traversalSimilarity is -∞ and there is no timeout, the 
intent is to
+            // find all vectors above resultSimilarity. The approximate graph 
search may
+            // miss nodes in this case, so use exact search to guarantee 
completeness.
+            return VectorSimilarityScorerSupplier.fromAcceptDocs(
+                boost,
+                createVectorScorer(context),
+                DocIdSetIterator.all(leafReader.maxDoc()),

Review Comment:
   Yeah correct. Addressed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to