Faiss: Get all added ids in the IVF index?

Created on 18 Jul 2019  路  5Comments  路  Source: facebookresearch/faiss

Running on:
CPU

Interface:
Python

Hi, I wonder if there is way to get all existing ids in the IVF index? It is kind of prone to error if maintaining a separate list. (I also notice we can add the same id to index more than once.) Thanks.

question

Most helpful comment

Getting all ids is not supported out-of-the-box but can be performed with the following code:
https://gist.github.com/mdouze/904e0b538ef7767c9e83a45ac1b57d1b
And yes there is no mechanism in place to avoid duplicate vector ids. Conceptually, the ids could be used as object classes, for example, that are not unique ids.

All 5 comments

Getting all ids is not supported out-of-the-box but can be performed with the following code:
https://gist.github.com/mdouze/904e0b538ef7767c9e83a45ac1b57d1b
And yes there is no mechanism in place to avoid duplicate vector ids. Conceptually, the ids could be used as object classes, for example, that are not unique ids.

Getting all ids is not supported out-of-the-box but can be performed with the following code:
https://gist.github.com/mdouze/904e0b538ef7767c9e83a45ac1b57d1b
And yes there is no mechanism in place to avoid duplicate vector ids. Conceptually, the ids could be used as object classes, for example, that are not unique ids.

Thanks.

How to get same for index of type OPQ8,IVF16384_HNSW32,PQ8

No activity, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xxllp picture xxllp  路  3Comments

maozezhong picture maozezhong  路  3Comments

minjiaz picture minjiaz  路  3Comments

ilyakhov picture ilyakhov  路  3Comments

linghuang picture linghuang  路  3Comments