-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
Description
When merging HNSW indexed segments, we attempt to improve the incremental nature of HNSW's indexing algorithm by re-using already calculated statistics.
This includes:
- Utilizing the biggest graph (after repairing deletes)
- Optimizing the entry points for smaller graph merging (MergingHnswGraphBuilder)
However, we still ultimately do incremental building of the graph. I think another good optimization would be to reuse the previously calculated graphs to further augment our bulk building of HNSW graphs.
The idea is as follows. When gathering the potential connections for a given node, instead of only searching the NEW graph (or the largest one), every graph is searched directly.
This is means:
- Nodes no longer need to worry about backlinks as ALL nodes were considered on indexing
- It makes parallel building even faster as backlinks aren't required and all existing graphs can be searched in parallel
This idea should be applicable even to the MergingHnswGraphBuilder.