HnswGraphProvider (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.codecs.hnsw, interface: HnswGraphProvider

Package org.apache.lucene.codecs.hnsw

# Interface HnswGraphProvider

All Known Implementing Classes:
  `Lucene99HnswVectorsReader`

public interface HnswGraphProvider
An interface that provides an HNSW graph. This interface is useful when gathering multiple HNSW graphs to bootstrap segment merging. The graph may be off the JVM heap.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HnswGraph`
  `getGraph(String field)`
  Return the stored HnswGraph for the given field.

- ## Method Details

  - ### getGraph

    HnswGraph getGraph(String field) throws IOException
    Return the stored HnswGraph for the given field.
    Parameters:
      `field` - the field containing the graph
    Returns:
      the HnswGraph for the given field if found
    Throws:
      `IOException` - when reading potentially off-heap graph fails