refactor(db): using wrapper write_index

Former-commit-id: d72e2bb4ee8122da76a23661df802adc3447d3f7
This commit is contained in:
Xu Peng 2019-04-17 10:46:12 +08:00 committed by xj.lin
parent e60b4f0bd1
commit 817d032a02

View File

@ -1,11 +1,10 @@
/* #include <faiss/IndexFlat.h> */
/* #include <faiss/MetaIndexes.h> */
#include <faiss/AutoTune.h>
#include <faiss/index_io.h>
#include <iostream>
#include <sstream>
#include <thread>
#include <wrapper/Index.h>
#include "MemManager.h"
#include "Meta.h"
@ -45,7 +44,8 @@ Status MemVectors::serialize(std::string& group_id) {
/* faiss::write_index(pIndex_, ss.str().c_str()); */
/* std::cout << pIndex_->ntotal << std::endl; */
/* std::cout << _file_location << std::endl; */
faiss::write_index(pIndex_, _file_location.c_str());
/* faiss::write_index(pIndex_, _file_location.c_str()); */
write_index(pIndex_, _file_location.c_str());
group_id = group_id_;
return Status::OK();
}