From 85707aa3e9848a10f69209d7e7f2de00c5136541 Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Sun, 5 May 2019 09:38:37 +0800 Subject: [PATCH] refactor(db): impl template for engine type part 2 Former-commit-id: 8be264a9ecc7704f63a978fb862b95140a19e1c0 --- cpp/src/db/DBImpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 9344832db1..bbf9a619ed 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -121,7 +121,7 @@ Status DBImpl::search(const std::string& group_id, size_t k, size_t nq, auto search_in_index = [&](meta::GroupFilesSchema& file_vec) -> void { for (auto &file : file_vec) { - FaissExecutionEngine index(file.dimension, file.location); + EngineT index(file.dimension, file.location); index.Load(); auto file_size = index.PhysicalSize()/(1024*1024); search_set_size += file_size; @@ -227,7 +227,7 @@ Status DBImpl::merge_files(const std::string& group_id, const meta::Dat return status; } - FaissExecutionEngine index(group_file.dimension, group_file.location); + EngineT index(group_file.dimension, group_file.location); meta::GroupFilesSchema updated; long index_size = 0; @@ -302,7 +302,7 @@ Status DBImpl::build_index(const meta::GroupFileSchema& file) { return status; } - FaissExecutionEngine to_index(file.dimension, file.location); + EngineT to_index(file.dimension, file.location); to_index.Load(); auto index = to_index.BuildIndex(group_file.location);