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.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
  • Constructor Details

    • UpdateGraphsUtils

      public UpdateGraphsUtils()
  • Method Details

    • computeJoinSet

      public static IntHashSet 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