Uses of Class
org.apache.lucene.util.hnsw.HnswGraph
Packages that use HnswGraph
Package
Description
Lucene 9.0 file format.
Lucene 9.1 file format.
Lucene 9.2 file format.
Lucene 9.4 file format.
Lucene 9.5 file format.
HNSW vector helper classes.
Lucene 9.9 file format.
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
-
Uses of HnswGraph in org.apache.lucene.backward_codecs.lucene90
Subclasses of HnswGraph in org.apache.lucene.backward_codecs.lucene90Modifier and TypeClassDescriptionprivate static final class
Read the nearest-neighbors graph from the index inputfinal class
AnHnswGraph
where all nodes and connections are held in memory.Methods in org.apache.lucene.backward_codecs.lucene90 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraph
Lucene90HnswVectorsReader.getGraphValues
(Lucene90HnswVectorsReader.FieldEntry entry) Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type HnswGraphModifier and TypeMethodDescriptionstatic NeighborQueue
Lucene90OnHeapHnswGraph.search
(float[] query, int topK, int numSeed, RandomAccessVectorValues.Floats vectors, VectorSimilarityFunction similarityFunction, HnswGraph graphValues, Bits acceptOrds, long visitedLimit, SplittableRandom random) Searches for the nearest neighbors of a query vector. -
Uses of HnswGraph in org.apache.lucene.backward_codecs.lucene91
Subclasses of HnswGraph in org.apache.lucene.backward_codecs.lucene91Modifier and TypeClassDescriptionprivate static final class
Read the nearest-neighbors graph from the index inputfinal class
AnHnswGraph
where all nodes and connections are held in memory.Methods in org.apache.lucene.backward_codecs.lucene91 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraph
Lucene91HnswVectorsReader.getGraph
(Lucene91HnswVectorsReader.FieldEntry entry) -
Uses of HnswGraph in org.apache.lucene.backward_codecs.lucene92
Subclasses of HnswGraph in org.apache.lucene.backward_codecs.lucene92Modifier and TypeClassDescriptionprivate static final class
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene92 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraph
Lucene92HnswVectorsReader.getGraph
(Lucene92HnswVectorsReader.FieldEntry entry) -
Uses of HnswGraph in org.apache.lucene.backward_codecs.lucene94
Subclasses of HnswGraph in org.apache.lucene.backward_codecs.lucene94Modifier and TypeClassDescriptionprivate static final class
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene94 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraph
Lucene94HnswVectorsReader.getGraph
(Lucene94HnswVectorsReader.FieldEntry entry) -
Uses of HnswGraph in org.apache.lucene.backward_codecs.lucene95
Subclasses of HnswGraph in org.apache.lucene.backward_codecs.lucene95Modifier and TypeClassDescriptionprivate static final class
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene95 that return HnswGraph -
Uses of HnswGraph in org.apache.lucene.codecs.hnsw
Methods in org.apache.lucene.codecs.hnsw that return HnswGraph -
Uses of HnswGraph in org.apache.lucene.codecs.lucene99
Subclasses of HnswGraph in org.apache.lucene.codecs.lucene99Modifier and TypeClassDescriptionprivate static final class
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.codecs.lucene99 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraph
Lucene99HnswVectorsReader.getGraph
(Lucene99HnswVectorsReader.FieldEntry entry) private HnswGraph
Lucene99HnswVectorsWriter.reconstructAndWriteGraph
(OnHeapHnswGraph graph, int[] newToOldMap, int[] oldToNewMap, int[][] levelNodeOffsets) Reconstructs the graph given the old and new node ids.Methods in org.apache.lucene.codecs.lucene99 with parameters of type HnswGraph -
Uses of HnswGraph in org.apache.lucene.util.hnsw
Subclasses of HnswGraph in org.apache.lucene.util.hnswModifier and TypeClassDescriptionfinal class
AnHnswGraph
where all nodes and connections are held in memory.Fields in org.apache.lucene.util.hnsw declared as HnswGraphMethods in org.apache.lucene.util.hnsw with parameters of type HnswGraphModifier and TypeMethodDescriptionprivate int
HnswGraphSearcher.findBestEntryPoint
(RandomVectorScorer scorer, HnswGraph graph, KnnCollector collector) Function to find the best entry point from which to search the zeroth graph layer.static InitializedHnswGraphBuilder
InitializedHnswGraphBuilder.fromGraph
(RandomVectorScorerSupplier scorerSupplier, int M, int beamWidth, long seed, HnswGraph initializerGraph, int[] newOrdMap, BitSet initializedNodes, int totalNumberOfVectors) Create a new HnswGraphBuilder that is initialized with the provided HnswGraph.private static int
HnswGraphSearcher.getGraphSize
(HnswGraph graph) (package private) int
HnswConcurrentMergeBuilder.MergeSearcher.graphNextNeighbor
(HnswGraph graph) (package private) int
HnswGraphSearcher.graphNextNeighbor
(HnswGraph graph) Get the next neighbor from the graph, you must callHnswGraphSearcher.graphSeek(HnswGraph, int, int)
before calling this method.(package private) int
HnswGraphSearcher.OnHeapHnswGraphSearcher.graphNextNeighbor
(HnswGraph graph) (package private) void
(package private) void
Seek a specific node in the given graph.(package private) void
static OnHeapHnswGraph
InitializedHnswGraphBuilder.initGraph
(int M, HnswGraph initializerGraph, int[] newOrdMap, int totalNumberOfVectors) static void
HnswGraphSearcher.search
(RandomVectorScorer scorer, KnnCollector knnCollector, HnswGraph graph, Bits acceptOrds) Searches HNSW graph for the nearest neighbors of a query vector.private static void
HnswGraphSearcher.search
(RandomVectorScorer scorer, KnnCollector knnCollector, HnswGraph graph, HnswGraphSearcher graphSearcher, Bits acceptOrds) (package private) void
HnswGraphSearcher.searchLevel
(KnnCollector results, RandomVectorScorer scorer, int level, int[] eps, HnswGraph graph, Bits acceptOrds) Add the closest neighbors found to a priority queue (heap).HnswGraphSearcher.searchLevel
(RandomVectorScorer scorer, int topK, int level, int[] eps, HnswGraph graph) Searches for the nearest neighbors of a query vector in a given level.