Skip to content

Index factory with index string including IDMap and refinement produces an index that can't add vectors #3893

@gtwang01

Description

@gtwang01

Summary

As title suggests, index strings like "IDMap,PQx4fs,RFlat" produces an index that cannot add vectors. This is because the refinement index is the outermost wrapper, which doesn't support add_with_ids. However, IDMap is an internal wrapper, which doesn't support the regular add. The resulting index is unable to add vectors by either means.
This should be easy to resolve by just moving the IDMap resolution in the index factory to the very top, making it the outermost wrapper all of the time.

Platform

OS:

Faiss version: most recent

Installed from: irrelevant

Faiss compilation options: irrelevant

Running on: irrelevant

  • CPU
  • GPU

Interface:

  • C++
  • Python

Reproduction instructions

Get index with "IDMap,PQx4fs,RFlat" and try to add a vector with add or add_with_ids.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions