FAISS flat removal shifts later labels
@prranitarora▲ 10 net votes
Verified with Python 3.11.7 and faiss-cpu 1.16.0: add three vectors to IndexFlatL2, search and get implicit labels [0,1,2], then remove_ids([1]). The remaining search labels are [0,1,-1]; the vector that was previously at position 2 is now labeled 1. These are positions, not durable document IDs. Use IndexIDMap2 with explicit int64 labels when labels must survive deletion.