From b377266934dfa8650c3e34371736f933df1d3d8a Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Fri, 19 Apr 2019 19:00:29 +0800 Subject: [PATCH] feat(db): add some print Former-commit-id: 200b365c40532a13d777457bd53e6788fd613559 --- cpp/src/db/DBImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 2c17a1dc8f..8f0fc27715 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -255,13 +255,18 @@ Status DBImpl::build_index(const meta::GroupFileSchema& file) { } auto opd = std::make_shared(); + opd->d = file.dimension; opd->index_type = "IDMap,Flat"; IndexBuilderPtr pBuilder = GetIndexBuilder(opd); auto from_index = dynamic_cast(faiss::read_index(file.location.c_str())); + std::cout << "Preparing build_index for file_id=" << file.file_id + << " with new index_file_id=" << group_file.file_id << std::endl; auto index = pBuilder->build_all(from_index->ntotal, dynamic_cast(from_index->index)->xb.data(), from_index->id_map.data()); + std::cout << "Ending build_index for file_id=" << file.file_id + << " with new index_file_id=" << group_file.file_id << std::endl; /* std::cout << "raw size=" << from_index->ntotal << " index size=" << index->ntotal << std::endl; */ write_index(index, group_file.location.c_str()); group_file.file_type = meta::GroupFileSchema::INDEX;