Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Add search_k scope to k ~ MAX_INT64 for ANNOY (#601)
Browse files Browse the repository at this point in the history
Signed-off-by: yudong.cai <[email protected]>

Signed-off-by: yudong.cai <[email protected]>
  • Loading branch information
cydrain authored Dec 14, 2022
1 parent 6dec5e6 commit d0b0c4b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions knowhere/index/vector_index/ConfAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ ANNOYConfAdapter::CheckTrain(Config& cfg, const IndexMode mode) {

bool
ANNOYConfAdapter::CheckSearch(Config& cfg, const IndexType type, const IndexMode mode) {
static int64_t MIN_SEARCH_K = std::numeric_limits<int64_t>::min();
static int64_t MAX_SEARCH_K = std::numeric_limits<int64_t>::max();
CheckIntegerRange(cfg, indexparam::SEARCH_K, MIN_SEARCH_K, MAX_SEARCH_K);
CheckIntegerRange(cfg, indexparam::SEARCH_K, GetMetaTopk(cfg), MAX_SEARCH_K);
return ConfAdapter::CheckSearch(cfg, type, mode);
}

Expand Down

0 comments on commit d0b0c4b

Please sign in to comment.