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.
-
ClassDescriptionA blocking bounded min heap that stores floats.A supplier that creates
UpdateableRandomVectorScorer
from an ordinal.This merger merges graph in a concurrent manner, by usingHnswConcurrentMergeBuilder
Searches an HNSW graph to find nearest neighbors to a query vector.A bounded min heap that stores floats.Interface for builder building theOnHeapHnswGraph
A graph builder that manages multiple workers, it only supports adding the whole graph all at once.Hierarchical Navigable Small World graph.NodesIterator that accepts nodes as an integer array.Nodes iterator based on set representation of nodes.Iterator over the graph nodes on a certain level.Builder for HNSW graph.A restricted, specialized knnCollector that can be used when building a graph.Abstraction of merging multiple graphs into one on-heap graphSearches an HNSW graph to find nearest neighbors to a query vector.Utilities for use in tests involving HNSW graphsThis merges multiple graphs in a single thread in incremental fashion.Represents a vector reader that contains graph info.This creates a graph builder that is initialized with the provided HnswGraph.Native int to int functionA graph builder that is used during segments' merging.NeighborArray encodes the neighbors of a node and their mutual scores in the HNSW graph as a pair of growable arrays.NeighborQueue uses aLongHeap
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.AnHnswGraph
where all nodes and connections are held in memory.Wraps a provided KnnCollector object, translating the provided vectorId ordinal to a documentIdARandomVectorScorer
for scoring random nodes in batches against an abstract query.Creates a default scorer for random access vectors.A supplier that createsRandomVectorScorer
from an ordinal.Just like aRandomVectorScorer
but allows the scoring ordinal to be changed.Creates a default scorer for random access vectors.Utility class for updating a big graph with smaller graphs.