mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
Summary: ## Description Fix the bug mentioned in https://github.com/facebookresearch/faiss/issues/1010. When `nprobe` is greater than `nlist` in `IndexIVF`, the program will crash because the index will ask the quantizer to return more centroids than it owns. ## Changes: 1. Set `nprobe` as `nlist` if it is greater than `nlist` during searching. 2. Add one test to detect this bug. 3. Fix typo in `IndexPQ.cpp`. Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1673 Reviewed By: wickedfoo Differential Revision: D26454420 Pulled By: mdouze fbshipit-source-id: d1d0949e30802602e975a94ba873f9db29abd5ab