提交 90692fe3 编写于 作者: J jinhai

Merge branch 'branch-0.3.0' into 'branch-0.3.1'

MS - 151 Fix merge bug

See merge request megasearch/milvus!157

Former-commit-id: 8225530a06476b12858ef1cce62c5130e6296980
......@@ -612,7 +612,8 @@ Status DBMetaImpl::GetTableFiles(const std::string& table_id,
TableFilesSchema& table_files) {
try {
table_files.clear();
auto files = ConnectorPtr->select(columns(&TableFileSchema::file_id_,
auto files = ConnectorPtr->select(columns(&TableFileSchema::id_,
&TableFileSchema::file_id_,
&TableFileSchema::file_type_,
&TableFileSchema::size_,
&TableFileSchema::date_,
......@@ -631,11 +632,12 @@ Status DBMetaImpl::GetTableFiles(const std::string& table_id,
for (auto &file : files) {
TableFileSchema file_schema;
file_schema.table_id_ = table_id;
file_schema.file_id_ = std::get<0>(file);
file_schema.file_type_ = std::get<1>(file);
file_schema.size_ = std::get<2>(file);
file_schema.date_ = std::get<3>(file);
file_schema.engine_type_ = std::get<4>(file);
file_schema.id_ = std::get<0>(file);
file_schema.file_id_ = std::get<1>(file);
file_schema.file_type_ = std::get<2>(file);
file_schema.size_ = std::get<3>(file);
file_schema.date_ = std::get<4>(file);
file_schema.engine_type_ = std::get<5>(file);
file_schema.dimension_ = table_schema.dimension_;
GetTableFilePath(file_schema);
......
......@@ -151,7 +151,7 @@ std::shared_ptr<IScheduleTask> SearchTask::Execute() {
std::vector<float> output_distence;
for(auto& context : search_contexts_) {
//step 1: allocate memory
auto inner_k = index_engine_->Count() < context->topk() ? index_engine_->Count() : context->topk();
auto inner_k = context->topk();
output_ids.resize(inner_k*context->nq());
output_distence.resize(inner_k*context->nq());
......@@ -164,7 +164,8 @@ std::shared_ptr<IScheduleTask> SearchTask::Execute() {
//step 3: cluster result
SearchContext::ResultSet result_set;
ClusterResult(output_ids, output_distence, context->nq(), inner_k, result_set);
auto spec_k = index_engine_->Count() < context->topk() ? index_engine_->Count() : context->topk();
ClusterResult(output_ids, output_distence, context->nq(), spec_k, result_set);
rc.Record("cluster result");
//step 4: pick up topk result
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册