未验证 提交 d7c47a79 编写于 作者: G groot 提交者: GitHub

fix #2752 (#2789)

* fix #2752
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>

* typo
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>

* typo
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>
上级 a970c7f2
......@@ -17,6 +17,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2690 Remove body parser in show-partitions endpoints
- \#2692 Milvus hangs during multi-thread concurrent search
- \#2739 Fix mishards start failed
- \#2752 Milvus formats vectors data to double-precision and return to http client
- \#2767 fix a bug of getting wrong nprobe limitation in knowhere on GPU version
- \#2776 Fix too many data copies during creating IVF index
......
......@@ -78,6 +78,8 @@ WebErrorMap(ErrorCode code) {
}
}
using FloatJson = nlohmann::basic_json<std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, float>;
/////////////////////////////////// Private methods ///////////////////////////////////////
void
WebRequestHandler::AddStatusToJson(nlohmann::json& json, int64_t code, const std::string& msg) {
......@@ -1690,8 +1692,9 @@ WebRequestHandler::GetVector(const OString& collection_name, const OQueryParams&
ASSIGN_RETURN_STATUS_DTO(status)
}
nlohmann::json json;
AddStatusToJson(json, status.code(), status.message());
FloatJson json;
json["code"] = (int64_t)status.code();
json["message"] = status.message();
if (vectors_json.empty()) {
json["vectors"] = std::vector<int64_t>();
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册