zilliztech / knowhere

Knowhere is an open-source vector search engine, integrating FAISS, HNSW, etc.
Apache License 2.0
186 stars 78 forks source link

Replace HNSW with FAISS_HNSW_FLAT #921

Closed foxspy closed 1 day ago

foxspy commented 1 week ago

Faiss has added flat support for HNSW and supports SQ/PQ/PRQ, which currently results in two HNSW options within knowhere, both offering identical parameters and capabilities but with different naming (FAISS_HNSW_FLAT vs. HNSW). This dual support increases future maintenance costs (since both sets of HNSW need to be maintained) and adds user complexity (users must rebuild and replace indexes).

If the goal is to use FAISS_HNSW to replace HNSW, a compatibility solution should be provided—allowing FAISS_HNSW to load pre-existing HNSW indexes and support search/range_search/iterator capabilities. This would centralize all HNSW-related logic into FAISS_HNSW, automatically transitioning users to FAISS_HNSW after upgrading.

Two potential approaches to address this:

foxspy commented 1 week ago

@alexanderguzhva faiss_hnsw is part of the 2.5.0 release planned for early next week, it would be ideal to address this soon.

alexanderguzhva commented 1 week ago

@foxspy already testing