Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunjiangZhu committed Oct 28, 2019
1 parent a163287 commit 0bcd267
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion similarity_search/src/method/hnsw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ namespace similarity {
}
}

SortArrBI<dist_t, HnswNode *> sortedArr(ef_); // max<size_t>(ef_, query->GetK())
SortArrBI<dist_t, HnswNode *> sortedArr(max<size_t>(ef_, 1000); // max<size_t>(ef_, query->GetK())
sortedArr.push_unsorted_grow(curdist, curNode);

int_fast32_t currElem = 0;
Expand Down
2 changes: 1 addition & 1 deletion similarity_search/src/method/small_world_rand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void SmallWorldRand<dist_t>::addCriticalSection(MSWNode *newElement){
template <typename dist_t>
void SmallWorldRand<dist_t>::Search(RangeQuery<dist_t>* query, IdType) const {
// throw runtime_error("Range search is not supported!");
if (searchAlgoType_ == kV1Merge) SearchV1Merge(query);
if (searchAlgoType_ == kV1Merge) { std::cerr << "call SearchV1Merge" << endl; SearchV1Merge(query);}
// else SearchOld(query);
}

Expand Down

0 comments on commit 0bcd267

Please sign in to comment.