未验证 提交 4cd5d8dd 编写于 作者: B BossZou 提交者: GitHub

Add Superstructure/Substructure in http module (#1785)

* add sub/super-structure in http module
Signed-off-by: NYhz <yinghao.zou@zilliz.com>

* update http test case
Signed-off-by: NYhz <yinghao.zou@zilliz.com>

* add Superstructure/Substructure in http module (fix #1784)
Signed-off-by: NYhz <yinghao.zou@zilliz.com>
上级 ebc6c69b
......@@ -54,6 +54,7 @@ Please mark all change in change log and use the issue from GitHub
- \#1698 Upgrade mishards to v0.7.0
- \#1719 Improve Milvus log
- \#1754 Optimize behavior to get file ids from metadata in mishards
- \#1784 Add Substructure and Superstructure in http module
## Task
......
......@@ -46,6 +46,8 @@ static const char* NAME_METRIC_TYPE_IP = "IP";
static const char* NAME_METRIC_TYPE_HAMMING = "HAMMING";
static const char* NAME_METRIC_TYPE_JACCARD = "JACCARD";
static const char* NAME_METRIC_TYPE_TANIMOTO = "TANIMOTO";
static const char* NAME_METRIC_TYPE_SUBSTRUCTURE = "SUBSTRUCTURE";
static const char* NAME_METRIC_TYPE_SUPERSTRUCTURE = "SUPERSTRUCTURE";
////////////////////////////////////////////////////
......
......@@ -99,6 +99,8 @@ static const std::unordered_map<engine::MetricType, std::string> MetricMap = {
{engine::MetricType::HAMMING, NAME_METRIC_TYPE_HAMMING},
{engine::MetricType::JACCARD, NAME_METRIC_TYPE_JACCARD},
{engine::MetricType::TANIMOTO, NAME_METRIC_TYPE_TANIMOTO},
{engine::MetricType::SUBSTRUCTURE, NAME_METRIC_TYPE_SUBSTRUCTURE},
{engine::MetricType::SUPERSTRUCTURE, NAME_METRIC_TYPE_SUPERSTRUCTURE},
};
static const std::unordered_map<std::string, engine::MetricType> MetricNameMap = {
......@@ -107,6 +109,8 @@ static const std::unordered_map<std::string, engine::MetricType> MetricNameMap =
{NAME_METRIC_TYPE_HAMMING, engine::MetricType::HAMMING},
{NAME_METRIC_TYPE_JACCARD, engine::MetricType::JACCARD},
{NAME_METRIC_TYPE_TANIMOTO, engine::MetricType::TANIMOTO},
{NAME_METRIC_TYPE_SUBSTRUCTURE, engine::MetricType::SUBSTRUCTURE},
{NAME_METRIC_TYPE_SUPERSTRUCTURE, engine::MetricType::SUPERSTRUCTURE},
};
} // namespace web
......
......@@ -168,7 +168,8 @@ WebRequestHandler::IsBinaryTable(const std::string& collection_name, bool& bin)
if (status.ok()) {
auto metric = engine::MetricType(schema.metric_type_);
bin = engine::MetricType::HAMMING == metric || engine::MetricType::JACCARD == metric ||
engine::MetricType::TANIMOTO == metric;
engine::MetricType::TANIMOTO == metric || engine::MetricType::SUPERSTRUCTURE == metric ||
engine::MetricType::SUBSTRUCTURE == metric;
}
return status;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册