We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac43973 + 8c6960b commit 67a7a1bCopy full SHA for 67a7a1b
hnswlib/hnswalg.h
@@ -182,7 +182,7 @@ namespace hnswlib {
182
183
while (!candidateSet.empty()) {
184
std::pair<dist_t, tableint> curr_el_pair = candidateSet.top();
185
- if ((-curr_el_pair.first) > lowerBound) {
+ if ((-curr_el_pair.first) > lowerBound && top_candidates.size() == ef_construction_) {
186
break;
187
}
188
candidateSet.pop();
@@ -271,7 +271,7 @@ namespace hnswlib {
271
272
std::pair<dist_t, tableint> current_node_pair = candidate_set.top();
273
274
- if ((-current_node_pair.first) > lowerBound) {
+ if ((-current_node_pair.first) > lowerBound && (top_candidates.size() == ef || has_deletions == false)) {
275
276
277
candidate_set.pop();
0 commit comments