benwtrent commented on code in PR #13058:
URL: https://github.com/apache/lucene/pull/13058#discussion_r1480229819
##########
lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java:
##########
@@ -135,7 +135,7 @@ private TopDocs getLeafResults(
}
// Perform the approximate kNN search
- TopDocs results = approximateSearch(ctx, acceptDocs, cost,
knnCollectorManager);
+ TopDocs results = approximateSearch(ctx, acceptDocs, cost + 1,
knnCollectorManager);
Review Comment:
```suggestion
// We pass cost + 1 here to account for the edge case when we explore
exactly cost vectors
TopDocs results = approximateSearch(ctx, acceptDocs, cost + 1,
knnCollectorManager);
```
--
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]