Package org.apache.lucene.index
Class LeafReaderContext
java.lang.Object
org.apache.lucene.index.IndexReaderContext
org.apache.lucene.index.LeafReaderContext
IndexReaderContext
for LeafReader
instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
The reader's absolute doc baseprivate final List<LeafReaderContext>
final int
The reader's ord in the top-level's leaves arrayprivate final LeafReader
Fields inherited from class org.apache.lucene.index.IndexReaderContext
docBaseInParent, identity, isTopLevel, ordInParent, parent
-
Constructor Summary
ConstructorsConstructorDescriptionLeafReaderContext
(CompositeReaderContext parent, LeafReader reader, int ord, int docBase, int leafOrd, int leafDocBase) Creates a newLeafReaderContext
LeafReaderContext
(LeafReader leafReader) -
Method Summary
Modifier and TypeMethodDescriptionchildren()
Returns the context's children iff this context is a composite context otherwisenull
.leaves()
Returns the context's leaves if this context is a top-level context.reader()
Returns theIndexReader
, this context represents.toString()
Methods inherited from class org.apache.lucene.index.IndexReaderContext
id
-
Field Details
-
ord
public final int ordThe reader's ord in the top-level's leaves array -
docBase
public final int docBaseThe reader's absolute doc base -
reader
-
leaves
-
-
Constructor Details
-
LeafReaderContext
LeafReaderContext(CompositeReaderContext parent, LeafReader reader, int ord, int docBase, int leafOrd, int leafDocBase) Creates a newLeafReaderContext
-
LeafReaderContext
LeafReaderContext(LeafReader leafReader)
-
-
Method Details
-
leaves
Description copied from class:IndexReaderContext
Returns the context's leaves if this context is a top-level context. For convenience, if this is anLeafReaderContext
this returns itself as the only leaf.Note: this is convenience method since leaves can always be obtained by walking the context tree using
IndexReaderContext.children()
.- Specified by:
leaves
in classIndexReaderContext
- See Also:
-
children
Description copied from class:IndexReaderContext
Returns the context's children iff this context is a composite context otherwisenull
.- Specified by:
children
in classIndexReaderContext
-
reader
Description copied from class:IndexReaderContext
Returns theIndexReader
, this context represents.- Specified by:
reader
in classIndexReaderContext
-
toString
-