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 helper class for an hnsw graph that serves as a comparator of the currently set bound value with a new value.A helper class for an hnsw graph that serves as a comparator of the currently set maximum value with a new value.A helper class for an hnsw graph that serves as a comparator of the currently set minimum value with a new value.Hierarchical Navigable Small World graph.Iterator over the graph nodes on a certain level, Iterator also provides the size – the total number of nodes to be iterated over.Builder for HNSW graph.Searches an HNSW graph to find nearest neighbors to a query vector.NeighborArray encodes the neighbors of a node and their mutual scores in the HNSW graph as a pair of growable arrays.NeighborQueue uses a
LongHeap
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.