Merge branch 'branch-0.5.0' into 'branch-0.5.0'

MS-599 search wrong result when table created with metric_type: IP

See merge request megasearch/milvus!648

Former-commit-id: f104254ac9efde0aa9f1e45df23f2faa0554ffc9
This commit is contained in:
jinhai 2019-09-29 16:39:34 +08:00
commit 0a684872ff
3 changed files with 5 additions and 2 deletions

View File

@ -9,6 +9,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-572 - Milvus crash when get SIGINT
- MS-577 - Unittest Query randomly hung
- MS-587 - Count get wrong result after adding vectors and index built immediately
- MS-599 - search wrong result when table created with metric_type: IP
## Improvement
- MS-552 - Add and change the easylogging library

View File

@ -1,4 +1,4 @@
<code_scheme name="Default" version="173">
<code_scheme name="milvus" version="173">
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0" />
<option name="INDENT_VISIBILITY_KEYWORDS" value="1" />
@ -26,7 +26,6 @@
<option name="BLANK_LINES_AROUND_CLASS" value="0" />
<option name="BLANK_LINES_AROUND_METHOD_IN_INTERFACE" value="0" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="false" />
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="false" />

View File

@ -98,6 +98,9 @@ CollectFileMetrics(int file_type, size_t file_size) {
XSearchTask::XSearchTask(TableFileSchemaPtr file) : Task(TaskType::SearchTask), file_(file) {
if (file_) {
if (file_->metric_type_ != static_cast<int>(MetricType::L2)) {
metric_l2 = false;
}
index_engine_ = EngineFactory::Build(file_->dimension_, file_->location_, (EngineType)file_->engine_type_,
(MetricType)file_->metric_type_, file_->nlist_);
}