mayya-sharipova commented on code in PR #14366:
URL: https://github.com/apache/lucene/pull/14366#discussion_r2005708592
##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphSearcher.java:
##########
@@ -266,11 +266,21 @@ void searchLevel(
// A bound that holds the minimum similarity to the query vector that a
candidate vector must
// have to be considered.
float minAcceptedSimilarity =
Math.nextUp(results.minCompetitiveSimilarity());
+ // We should allow exploring equivalent minAcceptedSimilarity values at
least once
+ boolean shouldExploreMinSim = true;
while (candidates.size() > 0 && results.earlyTerminated() == false) {
// get the best candidate (closest or best scoring)
float topCandidateSimilarity = candidates.topScore();
if (topCandidateSimilarity < minAcceptedSimilarity) {
- break;
+ // if the similarity is equivalent to the minAcceptedSimilarity, we
should explore one
Review Comment:
nit: format the comment a little better (auto format seems to break it
strangely)
--
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]