未验证 提交 1c54baee 编写于 作者: Y yukun 提交者: GitHub

Fix bug (#3099)

* Fix Block Format Read bug
Signed-off-by: Nfishpenguin <kun.yu@zilliz.com>

* Fix Search crash bug
Signed-off-by: Nfishpenguin <kun.yu@zilliz.com>
上级 dbff431d
......@@ -619,12 +619,16 @@ DBImpl::Query(const server::ContextPtr& context, const query::QueryPtr& query_pt
return job->status();
}
result = job->query_result();
if (job->query_result()) {
result = job->query_result();
}
// step 4: get entities by result ids
std::vector<bool> valid_row;
STATUS_CHECK(GetEntityByID(query_ptr->collection_id, result->result_ids_, query_ptr->field_names, valid_row,
result->data_chunk_));
if (!query_ptr->field_names.empty()) {
STATUS_CHECK(GetEntityByID(query_ptr->collection_id, result->result_ids_, query_ptr->field_names, valid_row,
result->data_chunk_));
}
// step 5: filter entities by field names
// std::vector<engine::AttrsData> filter_attrs;
......
......@@ -165,7 +165,7 @@ Status
ValidateIndexType(const std::string& index_type) {
// Index name shouldn't be empty.
if (index_type.empty()) {
std::string msg = "Index name should not be empty.";
std::string msg = "Index type should not be empty.";
LOG_SERVER_ERROR_ << msg;
return Status(SERVER_INVALID_FIELD_NAME, msg);
}
......@@ -187,7 +187,7 @@ ValidateIndexType(const std::string& index_type) {
};
if (s_valid_index_names.find(index_type) == s_valid_index_names.end()) {
std::string msg = "Invalid index name: " + index_type;
std::string msg = "Invalid index type: " + index_type;
LOG_SERVER_ERROR_ << msg;
return Status(SERVER_INVALID_INDEX_TYPE, msg);
}
......
......@@ -53,8 +53,6 @@ CreateIndexReq::OnExecute() {
STATUS_CHECK(ValidateFieldName(field_name_));
STATUS_CHECK(ValidateIndexType(index_name_));
// only process root collection, ignore partition collection
engine::snapshot::CollectionPtr collection;
engine::snapshot::FieldElementMappings fields_schema;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册