java.lang.Object
org.apache.lucene.index.IndexReaderContext
org.apache.lucene.index.CompositeReaderContext
IndexReaderContext
for CompositeReader
instance.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<IndexReaderContext>
private final List<LeafReaderContext>
private final CompositeReader
Fields inherited from class org.apache.lucene.index.IndexReaderContext
docBaseInParent, identity, isTopLevel, ordInParent, parent
-
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
CompositeReaderContext
(CompositeReaderContext parent, CompositeReader reader, int ordInParent, int docbaseInParent, List<IndexReaderContext> children) Creates aCompositeReaderContext
for intermediate readers that aren't not top-level readers in the current contextprivate
CompositeReaderContext
(CompositeReaderContext parent, CompositeReader reader, int ordInParent, int docbaseInParent, List<IndexReaderContext> children, List<LeafReaderContext> leaves) (package private)
CompositeReaderContext
(CompositeReader reader, List<IndexReaderContext> children, List<LeafReaderContext> leaves) Creates aCompositeReaderContext
for top-level readers with parent set tonull
-
Method Summary
Modifier and TypeMethodDescriptionchildren()
Returns the context's children iff this context is a composite context otherwisenull
.(package private) static CompositeReaderContext
create
(CompositeReader reader) leaves()
Returns the context's leaves if this context is a top-level context.reader()
Returns theIndexReader
, this context represents.Methods inherited from class org.apache.lucene.index.IndexReaderContext
id
-
Field Details
-
children
-
leaves
-
reader
-
-
Constructor Details
-
CompositeReaderContext
CompositeReaderContext(CompositeReaderContext parent, CompositeReader reader, int ordInParent, int docbaseInParent, List<IndexReaderContext> children) Creates aCompositeReaderContext
for intermediate readers that aren't not top-level readers in the current context -
CompositeReaderContext
CompositeReaderContext(CompositeReader reader, List<IndexReaderContext> children, List<LeafReaderContext> leaves) Creates aCompositeReaderContext
for top-level readers with parent set tonull
-
CompositeReaderContext
private CompositeReaderContext(CompositeReaderContext parent, CompositeReader reader, int ordInParent, int docbaseInParent, List<IndexReaderContext> children, List<LeafReaderContext> leaves)
-
-
Method Details
-
create
-
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, and it will never return a null value.Note: this is convenience method since leaves can always be obtained by walking the context tree using
IndexReaderContext.children()
.- Specified by:
leaves
in classIndexReaderContext
- Throws:
UnsupportedOperationException
- if this is not a top-level context.- 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
-