Skip to content

Commit

Permalink
Fix DiskANN LRU Set Invalid Medoid (#98)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Weizhi Xu <[email protected]>
(cherry picked from commit 76723f9)
  • Loading branch information
PwzXxm authored Sep 20, 2023
1 parent c02f584 commit b455816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thirdparty/DiskANN/src/pq_flash_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ namespace diskann {
}
}
}
if (k_search > 0) {
if (k_search > 0 && indices[0] != -1) {
lru_cache.put(vec_hash, indices[0]);
}

Expand Down

0 comments on commit b455816

Please sign in to comment.