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 classRead the nearest-neighbors graph from the index inputfinal classAnHnswGraphwhere all nodes and connections are held in memory.Methods in org.apache.lucene.backward_codecs.lucene90 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraphLucene90HnswVectorsReader.getGraphValues(Lucene90HnswVectorsReader.FieldEntry entry) Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type HnswGraphModifier and TypeMethodDescriptionstatic NeighborQueueLucene90OnHeapHnswGraph.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 classRead the nearest-neighbors graph from the index inputfinal classAnHnswGraphwhere all nodes and connections are held in memory.Methods in org.apache.lucene.backward_codecs.lucene91 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraphLucene91HnswVectorsReader.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 classRead the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene92 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraphLucene92HnswVectorsReader.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 classRead the nearest-neighbors graph from the index inputMethods in org.apache.lucene.backward_codecs.lucene94 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraphLucene94HnswVectorsReader.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 classRead 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 classRead the nearest-neighbors graph from the index inputMethods in org.apache.lucene.codecs.lucene99 that return HnswGraphModifier and TypeMethodDescriptionprivate HnswGraphLucene99HnswVectorsReader.getGraph(Lucene99HnswVectorsReader.FieldEntry entry) private HnswGraphLucene99HnswVectorsWriter.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 classAnHnswGraphwhere 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 intHnswGraphSearcher.findBestEntryPoint(RandomVectorScorer scorer, HnswGraph graph, KnnCollector collector) Function to find the best entry point from which to search the zeroth graph layer.static InitializedHnswGraphBuilderInitializedHnswGraphBuilder.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 intHnswGraphSearcher.getGraphSize(HnswGraph graph) (package private) intHnswConcurrentMergeBuilder.MergeSearcher.graphNextNeighbor(HnswGraph graph) (package private) intHnswGraphSearcher.graphNextNeighbor(HnswGraph graph) Get the next neighbor from the graph, you must callHnswGraphSearcher.graphSeek(HnswGraph, int, int)before calling this method.(package private) intHnswGraphSearcher.OnHeapHnswGraphSearcher.graphNextNeighbor(HnswGraph graph) (package private) void(package private) voidSeek a specific node in the given graph.(package private) voidstatic OnHeapHnswGraphInitializedHnswGraphBuilder.initGraph(int M, HnswGraph initializerGraph, int[] newOrdMap, int totalNumberOfVectors) static voidHnswGraphSearcher.search(RandomVectorScorer scorer, KnnCollector knnCollector, HnswGraph graph, Bits acceptOrds) Searches HNSW graph for the nearest neighbors of a query vector.private static voidHnswGraphSearcher.search(RandomVectorScorer scorer, KnnCollector knnCollector, HnswGraph graph, HnswGraphSearcher graphSearcher, Bits acceptOrds) (package private) voidHnswGraphSearcher.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.