faiss-rs
faiss-rs copied to clipboard
Convert IndexImpl to IdMap<IndexImpl>
Hello.
Example
let index = FlatIndexImpl::new_l2(4).unwrap();
let id_map = IdMap::new(index).unwrap();
write_index(&id_map, "/tmp/id_map_ex.dat").unwrap();
let new_index = read_index("/tmp/id_map_ex.dat").unwrap();
new_index
is IndexImpl
support in faiss https://github.com/facebookresearch/faiss/pull/1917
faiss_IndexIDMap_cast
does not work.
IdMap contains pointer for inner index here https://github.com/Enet4/faiss-rs/blob/master/src/index/id_map.rs#L78
Need add getter for Inner index into Faiss C_API.
add function sub_index https://github.com/facebookresearch/faiss/pull/1982
a new native faiss release https://github.com/facebookresearch/faiss/releases/tag/v1.7.2