jtibshirani commented on a change in pull request #656:
URL: https://github.com/apache/lucene/pull/656#discussion_r803395995



##########
File path: 
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphSearcher.java
##########
@@ -147,6 +165,11 @@ NeighborQueue searchLevel(
           continue;
         }
 
+        numVisited++;
+        if (numVisited > visitedLimit) {
+          throw new CollectionTerminatedException();

Review comment:
       This may be an abuse of `CollectionTerminatedException`. Another idea 
would be to try to pass back the information that the search was terminated 
early in `TopDocs.TotalHits` (but this also doesn't seem ideal).




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