Class UpdateGraphsUtils

java.lang.Object
org.apache.lucene.util.hnsw.UpdateGraphsUtils

public class UpdateGraphsUtils extends Object
Utility class for updating a big graph with smaller graphs. This is used during merging of segments containing HNSW graphs.
  • Constructor Details

    • UpdateGraphsUtils

      public UpdateGraphsUtils()
  • Method Details

    • computeJoinSet

      public static Set<Integer> computeJoinSet(HnswGraph graph) throws IOException
      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