public class AssertingLeafReader extends FilterLeafReader
FilterLeafReader
that can be used to apply
additional checks for tests.Modifier and Type | Class and Description |
---|---|
static class |
AssertingLeafReader.AssertingBinaryDocValues
Wraps a BinaryDocValues but with additional asserts
|
static class |
AssertingLeafReader.AssertingBits
Wraps a Bits but with additional asserts
|
static class |
AssertingLeafReader.AssertingFields
Wraps a Fields but with additional asserts
|
static class |
AssertingLeafReader.AssertingNumericDocValues
Wraps a NumericDocValues but with additional asserts
|
static class |
AssertingLeafReader.AssertingPostingsEnum
Wraps a docsenum with additional checks
|
static class |
AssertingLeafReader.AssertingRandomAccessOrds
Wraps a RandomAccessOrds but with additional asserts
|
static class |
AssertingLeafReader.AssertingSortedDocValues
Wraps a SortedDocValues but with additional asserts
|
static class |
AssertingLeafReader.AssertingSortedNumericDocValues
Wraps a SortedSetDocValues but with additional asserts
|
static class |
AssertingLeafReader.AssertingSortedSetDocValues
Wraps a SortedSetDocValues but with additional asserts
|
static class |
AssertingLeafReader.AssertingTerms
Wraps a Terms but with additional asserts
|
FilterLeafReader.FilterFields, FilterLeafReader.FilterPostingsEnum, FilterLeafReader.FilterTerms, FilterLeafReader.FilterTermsEnum
LeafReader.CoreClosedListener
IndexReader.ReaderClosedListener
in
Constructor and Description |
---|
AssertingLeafReader(LeafReader in) |
Modifier and Type | Method and Description |
---|---|
Fields |
fields()
Returns
Fields for this reader. |
BinaryDocValues |
getBinaryDocValues(String field)
Returns
BinaryDocValues for this field, or
null if no BinaryDocValues were indexed for
this field. |
Object |
getCombinedCoreAndDeletesKey()
Expert: Returns a key for this IndexReader that also includes deletions,
so CachingWrapperFilter can find it again.
|
Object |
getCoreCacheKey()
Expert: Returns a key for this IndexReader, so CachingWrapperFilter can find
it again.
|
Bits |
getDocsWithField(String field)
Returns a
Bits at the size of reader.maxDoc() ,
with turned on bits for each docid that does have a value for this field,
or null if no DocValues were indexed for this field. |
Bits |
getLiveDocs()
Returns the
Bits representing live (not
deleted) docs. |
NumericDocValues |
getNormValues(String field)
Returns
NumericDocValues representing norms
for this field, or null if no NumericDocValues
were indexed. |
NumericDocValues |
getNumericDocValues(String field)
Returns
NumericDocValues for this field, or
null if no NumericDocValues were indexed for
this field. |
SortedDocValues |
getSortedDocValues(String field)
Returns
SortedDocValues for this field, or
null if no SortedDocValues were indexed for
this field. |
SortedNumericDocValues |
getSortedNumericDocValues(String field)
Returns
SortedNumericDocValues for this field, or
null if no SortedNumericDocValues were indexed for
this field. |
SortedSetDocValues |
getSortedSetDocValues(String field)
Returns
SortedSetDocValues for this field, or
null if no SortedSetDocValues were indexed for
this field. |
Fields |
getTermVectors(int docID)
Retrieve term vectors for this document, or null if
term vectors were not indexed.
|
addCoreClosedListener, checkIntegrity, doClose, document, getDelegate, getFieldInfos, maxDoc, numDocs, removeCoreClosedListener, toString, unwrap
addCoreClosedListenerAsReaderClosedListener, docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, removeCoreClosedListenerAsReaderClosedListener, termDocsEnum, termPositionsEnum, terms, totalTermFreq
addReaderClosedListener, close, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, removeReaderClosedListener, tryIncRef
public AssertingLeafReader(LeafReader in)
public Fields fields() throws IOException
LeafReader
Fields
for this reader.
This method will not return null.fields
in class FilterLeafReader
IOException
public Fields getTermVectors(int docID) throws IOException
IndexReader
getTermVectors
in class FilterLeafReader
IOException
public NumericDocValues getNumericDocValues(String field) throws IOException
LeafReader
NumericDocValues
for this field, or
null if no NumericDocValues
were indexed for
this field. The returned instance should only be
used by a single thread.getNumericDocValues
in class FilterLeafReader
IOException
public BinaryDocValues getBinaryDocValues(String field) throws IOException
LeafReader
BinaryDocValues
for this field, or
null if no BinaryDocValues
were indexed for
this field. The returned instance should only be
used by a single thread.getBinaryDocValues
in class FilterLeafReader
IOException
public SortedDocValues getSortedDocValues(String field) throws IOException
LeafReader
SortedDocValues
for this field, or
null if no SortedDocValues
were indexed for
this field. The returned instance should only be
used by a single thread.getSortedDocValues
in class FilterLeafReader
IOException
public SortedNumericDocValues getSortedNumericDocValues(String field) throws IOException
LeafReader
SortedNumericDocValues
for this field, or
null if no SortedNumericDocValues
were indexed for
this field. The returned instance should only be
used by a single thread.getSortedNumericDocValues
in class FilterLeafReader
IOException
public SortedSetDocValues getSortedSetDocValues(String field) throws IOException
LeafReader
SortedSetDocValues
for this field, or
null if no SortedSetDocValues
were indexed for
this field. The returned instance should only be
used by a single thread.getSortedSetDocValues
in class FilterLeafReader
IOException
public NumericDocValues getNormValues(String field) throws IOException
LeafReader
NumericDocValues
representing norms
for this field, or null if no NumericDocValues
were indexed. The returned instance should only be
used by a single thread.getNormValues
in class FilterLeafReader
IOException
public Bits getLiveDocs()
LeafReader
Bits
representing live (not
deleted) docs. A set bit indicates the doc ID has not
been deleted. If this method returns null it means
there are no deleted documents (all documents are
live).
The returned instance has been safely published for
use by multiple threads without additional
synchronization.getLiveDocs
in class FilterLeafReader
public Bits getDocsWithField(String field) throws IOException
LeafReader
Bits
at the size of reader.maxDoc()
,
with turned on bits for each docid that does have a value for this field,
or null if no DocValues were indexed for this field. The
returned instance should only be used by a single threadgetDocsWithField
in class FilterLeafReader
IOException
public Object getCoreCacheKey()
IndexReader
getCoreCacheKey
in class IndexReader
public Object getCombinedCoreAndDeletesKey()
IndexReader
getCombinedCoreAndDeletesKey
in class IndexReader
Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.