diff --git a/faiss/IndexRefine.cpp b/faiss/IndexRefine.cpp index 8bc429a5e9..1037d6e1e7 100644 --- a/faiss/IndexRefine.cpp +++ b/faiss/IndexRefine.cpp @@ -52,6 +52,13 @@ void IndexRefine::add(idx_t n, const float* x) { ntotal = refine_index->ntotal; } +size_t IndexRefine::remove_ids(const IDSelector& sel) { + FAISS_THROW_IF_NOT(is_trained); + base_index->remove_ids(sel); + size_t nremove = refine_index->remove_ids(sel); + return nremove; +} + void IndexRefine::reset() { base_index->reset(); refine_index->reset(); diff --git a/faiss/IndexRefine.h b/faiss/IndexRefine.h index 9ad4e4be29..ce6b34f284 100644 --- a/faiss/IndexRefine.h +++ b/faiss/IndexRefine.h @@ -44,6 +44,8 @@ struct IndexRefine : Index { void add(idx_t n, const float* x) override; + size_t remove_ids(const IDSelector& sel) override; + void reset() override; void search(