Module org.apache.lucene.core
Package org.apache.lucene.util.hnsw
Class HnswConcurrentMergeBuilder.MergeSearcher
- java.lang.Object
-
- org.apache.lucene.util.hnsw.HnswGraphSearcher
-
- org.apache.lucene.util.hnsw.HnswConcurrentMergeBuilder.MergeSearcher
-
- Enclosing class:
- HnswConcurrentMergeBuilder
private static class HnswConcurrentMergeBuilder.MergeSearcher extends HnswGraphSearcher
This searcher will obtain the lock and make a copy of neighborArray when seeking the graph such that concurrent modification of the graph will not impact the search
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
nodeBuffer
private int
size
private int
upto
-
Constructor Summary
Constructors Modifier Constructor Description private
MergeSearcher(NeighborQueue candidates, BitSet visited)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
graphNextNeighbor(HnswGraph graph)
Get the next neighbor from the graph, you must callHnswGraphSearcher.graphSeek(HnswGraph, int, int)
before calling this method.(package private) void
graphSeek(HnswGraph graph, int level, int targetNode)
Seek a specific node in the given graph.-
Methods inherited from class org.apache.lucene.util.hnsw.HnswGraphSearcher
search, search, searchLevel, searchLevel
-
-
-
-
Constructor Detail
-
MergeSearcher
private MergeSearcher(NeighborQueue candidates, BitSet visited)
-
-
Method Detail
-
graphSeek
void graphSeek(HnswGraph graph, int level, int targetNode)
Description copied from class:HnswGraphSearcher
Seek a specific node in the given graph. The default implementation will just callHnswGraph.seek(int, int)
- Overrides:
graphSeek
in classHnswGraphSearcher
-
graphNextNeighbor
int graphNextNeighbor(HnswGraph graph)
Description copied from class:HnswGraphSearcher
Get the next neighbor from the graph, you must callHnswGraphSearcher.graphSeek(HnswGraph, int, int)
before calling this method. The default implementation will just callHnswGraph.nextNeighbor()
- Overrides:
graphNextNeighbor
in classHnswGraphSearcher
- Returns:
- see
HnswGraph.nextNeighbor()
-
-