Uses of Class
org.apache.lucene.util.hnsw.HnswGraph
-
Packages that use HnswGraph Package Description org.apache.lucene.backward_codecs.lucene90 Lucene 9.0 file format.org.apache.lucene.backward_codecs.lucene91 Lucene 9.1 file format.org.apache.lucene.backward_codecs.lucene92 Lucene 9.2 file format.org.apache.lucene.backward_codecs.lucene94 Lucene 9.4 file format.org.apache.lucene.backward_codecs.lucene95 Lucene 9.5 file format.org.apache.lucene.codecs Codecs API: API for customization of the encoding and structure of the index.org.apache.lucene.codecs.lucene99 Lucene 9.9 file format.org.apache.lucene.util.hnsw 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.lucene90 Modifier and Type Class Description private static class
Lucene90HnswVectorsReader.OffHeapHnswGraph
Read the nearest-neighbors graph from the index inputclass
Lucene90OnHeapHnswGraph
AnHnswGraph
where all nodes and connections are held in memory.Methods in org.apache.lucene.backward_codecs.lucene90 that return HnswGraph Modifier and Type Method Description private HnswGraph
Lucene90HnswVectorsReader. getGraphValues(Lucene90HnswVectorsReader.FieldEntry entry)
Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type HnswGraph Modifier and Type Method Description static NeighborQueue
Lucene90OnHeapHnswGraph. search(float[] query, int topK, int numSeed, RandomAccessVectorValues<float[]> vectors, VectorSimilarityFunction similarityFunction, HnswGraph graphValues, Bits acceptOrds, long visitedLimit, java.util.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.lucene91 Modifier and Type Class Description private static class
Lucene91HnswVectorsReader.OffHeapHnswGraph
Read the nearest-neighbors graph from the index inputclass
Lucene91OnHeapHnswGraph
AnHnswGraph
where all nodes and connections are held in memory.Methods in org.apache.lucene.backward_codecs.lucene91 that return HnswGraph Modifier and Type Method Description private 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.lucene92 Modifier and Type Class Description private static class
Lucene92HnswVectorsReader.OffHeapHnswGraph
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene92 that return HnswGraph Modifier and Type Method Description private 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.lucene94 Modifier and Type Class Description private static class
Lucene94HnswVectorsReader.OffHeapHnswGraph
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene94 that return HnswGraph Modifier and Type Method Description private 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.lucene95 Modifier and Type Class Description private static class
Lucene95HnswVectorsReader.OffHeapHnswGraph
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene95 that return HnswGraph Modifier and Type Method Description HnswGraph
Lucene95HnswVectorsReader. getGraph(java.lang.String field)
Get knn graph values; used for testingprivate HnswGraph
Lucene95HnswVectorsReader. getGraph(Lucene95HnswVectorsReader.FieldEntry entry)
-
Uses of HnswGraph in org.apache.lucene.codecs
Methods in org.apache.lucene.codecs that return HnswGraph Modifier and Type Method Description HnswGraph
HnswGraphProvider. getGraph(java.lang.String field)
Return the stored HnswGraph for the given field. -
Uses of HnswGraph in org.apache.lucene.codecs.lucene99
Subclasses of HnswGraph in org.apache.lucene.codecs.lucene99 Modifier and Type Class Description private static class
Lucene99HnswVectorsReader.OffHeapHnswGraph
Read the nearest-neighbors graph from the index inputMethods in org.apache.lucene.codecs.lucene99 that return HnswGraph Modifier and Type Method Description HnswGraph
Lucene99HnswVectorsReader. getGraph(java.lang.String field)
private 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 Modifier and Type Method Description private void
Lucene99HnswVectorsWriter. writeMeta(FieldInfo field, long vectorIndexOffset, long vectorIndexLength, int count, HnswGraph graph, int[][] graphLevelNodeOffsets)
-
Uses of HnswGraph in org.apache.lucene.util.hnsw
Subclasses of HnswGraph in org.apache.lucene.util.hnsw Modifier and Type Class Description class
OnHeapHnswGraph
AnHnswGraph
where all nodes and connections are held in memory.Fields in org.apache.lucene.util.hnsw declared as HnswGraph Modifier and Type Field Description static HnswGraph
HnswGraph. EMPTY
Empty graph valueMethods in org.apache.lucene.util.hnsw with parameters of type HnswGraph Modifier and Type Method Description private int[]
HnswGraphSearcher. findBestEntryPoint(RandomVectorScorer scorer, HnswGraph graph, long visitLimit)
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
HnswConcurrentMergeBuilder.MergeSearcher. graphSeek(HnswGraph graph, int level, int targetNode)
(package private) void
HnswGraphSearcher. graphSeek(HnswGraph graph, int level, int targetNode)
Seek a specific node in the given graph.(package private) void
HnswGraphSearcher.OnHeapHnswGraphSearcher. graphSeek(HnswGraph graph, int level, int targetNode)
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).HnswGraphBuilder.GraphBuilderKnnCollector
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.
-