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


##########
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) {

Review Comment:
   I actually didn't have this check initially but 
`BaseVectorSimilarityQueryTestCase.testTimeout` failed.  While looking further, 
it seems like the exact search path returns a lazy iterator, and the test's 
CountingQuery helper iterates it directly without going through 
IndexSearcher.search(). So TimeLimitingBulkScorer never kicks in and the 
timeout is ignored. The graph search path doesn't have this problem because it 
computes results eagerly inside scorerSupplier() where the timeout is already 
checked per-node.
   
   There might be a way but I didn't deep dive after that, IMO its okay to okay 
to proceed for now or maybe revisit this later?



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