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

Setting DSL fields is invalid in restful api, fields are not returned (#4312)

Signed-off-by: Nfishpenguin <kun.yu@zilliz.com>
上级 b58a7b9b
......@@ -19,6 +19,7 @@ Please mark all changes in change log and use the issue from GitHub
- \#4242 Fix query hang up at unittest case
- \#4246 Fix 'Illegal instruction' bug when running index tests at GitHub action
- \#4272 Program exit abnormally
- \#4302 Setting DSL fields is invalid in restful api, fields are not returned
## Feature
- \#4163 Update C++ sdk search interface
......
......@@ -776,13 +776,13 @@ WebRequestHandler::Search(const std::string& collection_name, const nlohmann::js
field_type_.insert({field.first, field.second.field_type_});
}
auto query_json = json["query"];
milvus::json extra_params;
if (json.contains("fields")) {
if (json["fields"].is_array()) {
extra_params["fields"] = json["fields"];
if (query_json.contains("fields")) {
if (query_json["fields"].is_array()) {
extra_params["fields"] = query_json["fields"];
}
}
auto query_json = json["query"];
std::vector<std::string> partition_tags;
if (query_json.contains("partition_tags")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册