fix combine result bug (#1780)

Signed-off-by: groot <yihua.mo@zilliz.com>
pull/1783/head
groot 2020-03-27 23:01:02 +08:00 committed by GitHub
parent ac443e37ac
commit af73dccb1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -381,6 +381,7 @@ SearchCombineRequest::OnExecute() {
int64_t topk = request->TopK();
uint64_t element_cnt = count * topk;
TopKQueryResult& result = request->QueryResult();
result.row_num_ = count;
result.id_list_.resize(element_cnt);
result.distance_list_.resize(element_cnt);
memcpy(result.id_list_.data(), result_ids.data() + offset, element_cnt * sizeof(int64_t));