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).
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields -
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
-
-
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
-