change for comment

This commit is contained in:
Yukikaze-CZR 2019-12-02 17:02:03 +08:00
parent b5916b41bf
commit 36d84f374b
2 changed files with 10 additions and 11 deletions

View File

@ -16,7 +16,6 @@
// under the License.
#include "wrapper/gpu/GPUVecImpl.h"
#include <src/wrapper/WrapperException.h>
#include "knowhere/common/Exception.h"
#include "knowhere/index/vector_index/IndexGPUIDMAP.h"
#include "knowhere/index/vector_index/IndexGPUIVF.h"
@ -26,6 +25,7 @@
#include "src/wrapper/DataTransfer.h"
#include "utils/Log.h"
#include "wrapper/VecImpl.h"
#include "wrapper/WrapperException.h"
/*
* no parameter check in this layer.
@ -60,7 +60,6 @@ IVFMixIndex::BuildAll(const int64_t& nb, const float* xb, const int64_t* ids, co
} catch (knowhere::KnowhereException& e) {
WRAPPER_LOG_ERROR << e.what();
throw WrapperException(e.what());
return Status(KNOWHERE_UNEXPECTED_ERROR, e.what());
} catch (std::exception& e) {
WRAPPER_LOG_ERROR << e.what();
return Status(KNOWHERE_ERROR, e.what());

View File

@ -295,6 +295,15 @@ TEST_F(DBTest, SEARCH_TEST) {
ASSERT_TRUE(stat.ok());
}
{ // search by specify index file
milvus::engine::meta::DatesT dates;
std::vector<std::string> file_ids = {"1", "2", "3", "4", "5", "6"};
milvus::engine::ResultIds result_ids;
milvus::engine::ResultDistances result_distances;
stat = db_->QueryByFileID(TABLE_NAME, file_ids, k, nq, 10, xq.data(), dates, result_ids, result_distances);
ASSERT_TRUE(stat.ok());
}
index.engine_type_ = (int)milvus::engine::EngineType::FAISS_IVFFLAT;
db_->CreateIndex(TABLE_NAME, index); // wait until build index finish
@ -349,15 +358,6 @@ TEST_F(DBTest, SEARCH_TEST) {
ASSERT_TRUE(stat.ok());
}
{ // search by specify index file
milvus::engine::meta::DatesT dates;
std::vector<std::string> file_ids = {"1", "2", "3", "4", "5", "6"};
milvus::engine::ResultIds result_ids;
milvus::engine::ResultDistances result_distances;
stat = db_->QueryByFileID(TABLE_NAME, file_ids, k, nq, 10, xq.data(), dates, result_ids, result_distances);
ASSERT_TRUE(stat.ok());
}
#ifdef CUSTOMIZATION
// test FAISS_IVFSQ8H optimizer
index.engine_type_ = (int)milvus::engine::EngineType::FAISS_IVFSQ8H;