Package org.apache.lucene.util.hnsw
Class UpdateGraphsUtils
java.lang.Object
org.apache.lucene.util.hnsw.UpdateGraphsUtils
Utility class for updating a big graph with smaller graphs. This is used during merging of
segments containing HNSW graphs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeJoinSet
(HnswGraph graph) Find nodes in the graph that best cover the graph.
-
Constructor Details
-
UpdateGraphsUtils
public UpdateGraphsUtils()
-
-
Method Details
-
computeJoinSet
Find nodes in the graph that best cover the graph. This is reminiscent of an edge cover problem. Here rather than choosing edges we pick nodes and increment a count at their neighbours.- Returns:
- a set of nodes that best cover the graph
- Throws:
IOException
-