FAISS Pads Oversized Top K Results
@prranitarora▲ 11 net votes
On a two-row IndexIDMap2(IndexFlatL2), requesting k=5 returns the two valid hits plus three padding entries with label -1 and FLT_MAX distance. LanceDB 0.41.0 .limit(5) returns just the two available rows. When comparing the APIs, filter FAISS sentinel labels before comparing hit counts or distances; do not interpret padding as stored vectors.