Module org.apache.lucene.core
Package org.apache.lucene.search
Class IndexSearcher.LeafReaderContextPartition
java.lang.Object
org.apache.lucene.search.IndexSearcher.LeafReaderContextPartition
- Enclosing class:
IndexSearcher
Holds information about a specific leaf context and the corresponding range of doc ids to
search within. Used to optionally search across partitions of the same segment concurrently.
A partition instance can be created via createForEntireSegment(LeafReaderContext)
,
in which case it will target the entire provided LeafReaderContext
. A true partition of
a segment can be created via createFromAndTo(LeafReaderContext, int, int)
providing
the minimum doc id (including) to search as well as the max doc id (excluding).
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
LeafReaderContextPartition
(LeafReaderContext leafReaderContext, int minDocId, int maxDocId, int maxDocs) -
Method Summary
Modifier and TypeMethodDescriptionCreates a partition of the provided leaf context that targets the entire segmentcreateFromAndTo
(LeafReaderContext ctx, int minDocId, int maxDocId) Creates a partition of the provided leaf context that targets a subset of the entire segment, starting from and including the min doc id provided, until and not including the provided max doc id
-
Field Details
-
minDocId
public final int minDocId -
maxDocId
public final int maxDocId -
ctx
-
maxDocs
private final int maxDocs
-
-
Constructor Details
-
LeafReaderContextPartition
private LeafReaderContextPartition(LeafReaderContext leafReaderContext, int minDocId, int maxDocId, int maxDocs)
-
-
Method Details
-
createForEntireSegment
public static IndexSearcher.LeafReaderContextPartition createForEntireSegment(LeafReaderContext ctx) Creates a partition of the provided leaf context that targets the entire segment -
createFromAndTo
public static IndexSearcher.LeafReaderContextPartition createFromAndTo(LeafReaderContext ctx, int minDocId, int maxDocId) Creates a partition of the provided leaf context that targets a subset of the entire segment, starting from and including the min doc id provided, until and not including the provided max doc id
-