diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 2c17a1dc8fc7fbecc759e950a132c0a1288d456d..8f0fc277152dbb7d6b4901e0e4d6e4975aa822c8 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;