-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
Description
Lucene added a Faiss-based vector search format in #14178, opening this issue to track possible enhancements:
- Allow Faiss to use SIMD instructions (more context here)
- Byte vector support (more context here)
- Implement batched indexing (more context here)
- Mmap-ed IO with disk-based indexes
- Today, the Faiss codec does not make any assumptions about the type of the Lucene index, and consequently uses abstract methods to read / write bytes from Faiss indexes
- Faiss recently added mmap support for some indexes, making it possible to read indexes without loading it entirely into RAM -- and we should make use of this functionality wherever possible / desired
- GPU support
- Faiss has support for GPU-based indexes using CUDA or ROCm -- but we do not use it from Lucene today. This may be a shorter path to Support Vector Search on GPU with cuVS #14243
- One reason is that GPU-based searches are beneficial when running queries in parallel, whereas the Faiss codec today runs queries one-at-a-time -- i.e. we may need a "batching" layer in the codec
- Expose a safe schema for Faiss indexes
- Today, the Faiss codec can be configured using an index factory string
- While this provides flexibility to the user, it is also error-prone (syntax errors, using incompatible features, etc). It may be more prudent to expose a safe schema from Lucene and build Faiss indexes programmatically instead of relying on the index factory
- This has subtle benefits, because Lucene now "knows" the type of Faiss index used -- for example decisions like not requiring a separate copy of raw vectors if the Faiss index is "lossless", or query-level configuration (setting parameters like
efSearch,nprobe, etc per-query) - One caveat is having to map many of Faiss' features in Lucene / Java as an ongoing effort
- Support for parent-join queries or timeouts
- Re-using information from previous indexes at merge-time
- Today, we simply create a new Faiss index from scratch during merge -- but it may be possible to re-use previous indexes to speed up merges
Please feel free to add enhancements I may have missed, or link issues / PRs