org.apache.lucene.util.hnsw (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.util.hnsw

# Package org.apache.lucene.util.hnsw

package org.apache.lucene.util.hnsw
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer. Provides efficient approximate nearest neighbor search for high dimensional vectors.

- Related Packages
  Package
  Description
  org.apache.lucene.util
  Some utility classes.
- Class
  Description
  BlockingFloatHeap
  A blocking bounded min heap that stores floats.
  CloseableRandomVectorScorerSupplier
  A supplier that creates `UpdateableRandomVectorScorer` from an ordinal.
  ConcurrentHnswMerger
  This merger merges graph in a concurrent manner, by using `HnswConcurrentMergeBuilder`
  FilteredHnswGraphSearcher
  Searches an HNSW graph to find nearest neighbors to a query vector.
  FloatHeap
  A bounded min heap that stores floats.
  HasKnnVectorValues
  Implementors can return the KnnVectorValues from which their scorers read.
  HnswBuilder
  Interface for builder building the `OnHeapHnswGraph`
  HnswConcurrentMergeBuilder
  A graph builder that manages multiple workers, it only supports adding the whole graph all at once.
  HnswGraph
  Hierarchical Navigable Small World graph.
  HnswGraph.ArrayNodesIterator
  NodesIterator that accepts nodes as an integer array.
  HnswGraph.CollectionNodesIterator
  Nodes iterator based on set representation of nodes.
  HnswGraph.DenseNodesIterator
  NodesIterator that enumerates [0, size)
  HnswGraph.NodesIterator
  Iterator over the graph nodes on a certain level.
  HnswGraphBuilder
  Builder for HNSW graph.
  HnswGraphBuilder.GraphBuilderKnnCollector
  A restricted, specialized knnCollector that can be used when building a graph.
  HnswGraphMerger
  Abstraction of merging multiple graphs into one on-heap graph
  HnswGraphSearcher
  Searches an HNSW graph to find nearest neighbors to a query vector.
  HnswUtil
  Utilities for use in tests involving HNSW graphs
  IncrementalHnswGraphMerger
  This merges multiple graphs in a single thread in incremental fashion.
  IncrementalHnswGraphMerger.GraphReader
  Represents a vector reader that contains graph info.
  InitializedHnswGraphBuilder
  This creates a graph builder that is initialized with the provided HnswGraph.
  IntToIntFunction
  Native int to int function
  MergingHnswGraphBuilder
  A graph builder that is used during segments' merging.
  NeighborArray
  NeighborArray encodes the neighbors of a node and their mutual scores in the HNSW graph as a pair of growable arrays.
  NeighborQueue
  NeighborQueue uses a `TernaryLongHeap` to store lists of arcs in an HNSW graph, represented as a neighbor node id with an associated score packed together as a sortable long, which is sorted primarily by score.
  OnHeapHnswGraph
  An `HnswGraph` where all nodes and connections are held in memory.
  OrdinalTranslatedKnnCollector
  Wraps a provided KnnCollector object, translating the provided vectorId ordinal to a documentId
  RandomVectorScorer
  A `RandomVectorScorer` for scoring random nodes in batches against an abstract query.
  RandomVectorScorer.AbstractRandomVectorScorer
  Creates a default scorer for random access vectors.
  RandomVectorScorerSupplier
  A supplier that creates `RandomVectorScorer` from an ordinal.
  UpdateableRandomVectorScorer
  Just like a `RandomVectorScorer` but allows the scoring ordinal to be changed.
  UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer
  Creates a default scorer for random access vectors.
  UpdateGraphsUtils
  Utility class for updating a big graph with smaller graphs.