From 1fa42f9d61614f77d6eb42793d0e3fb803a9542e Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Wed, 24 Apr 2019 15:29:45 +0800 Subject: [PATCH] feat(db): add data api for wrapper Former-commit-id: baabe91cc364d832e17016c554d66e29e400dfd4 --- cpp/src/wrapper/Index.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/src/wrapper/Index.h b/cpp/src/wrapper/Index.h index 8695b9eb..943df37f 100644 --- a/cpp/src/wrapper/Index.h +++ b/cpp/src/wrapper/Index.h @@ -62,6 +62,9 @@ public: // virtual bool remove_ids_range(const faiss::IDSelector &sel, long &nremove); // virtual bool index_display(); +// + virtual std::shared_ptr data() { return index_; } + virtual const std::shared_ptr& data() const { return index_; } private: friend void write_index(const Index_ptr &index, const std::string &file_name); -- GitLab