facebookresearch/faiss

Add support for IndexBinaryIDMap2 to index_binary_factory

asadoughi opened this issue · 0 comments

Summary

Reproduction instructions

code_size = 16
bindex = faiss.IndexBinaryIDMap2(faiss.IndexBinaryFlat(code_size))
n = 10
d = code_size // 8
ids = np.arange(n)
x = np.zeros((n, d), dtype=np.uint8)
bindex.add_with_ids(x, ids)

should be possible with

bindex = faiss.index_binary_factory("IDMap2,BFlat")

but index_binary_factory does not currently parse for IDMap2 like index_factory does: https://github.com/facebookresearch/faiss/blob/main/faiss/index_factory.cpp#L908