fix topk_2

Former-commit-id: 573d80b6d51407cc80e92989c11e3d74f2531d66
This commit is contained in:
xj.lin 2019-05-14 10:26:46 +08:00
parent 354f68a96f
commit 70dda63820

View File

@ -162,9 +162,9 @@ Status DBImpl<EngineT>::search(const std::string& group_id, size_t k, size_t nq,
for (auto &item : inverted_table){
if (count == k) break;
for (auto &id : item.second){
if (++count == k) break;
output_distence[count] = item.first;
output_ids[count] = id;
if (++count == k) break;
}
}
};