public static class AssertingLeafReader.AssertingTerms extends FilterLeafReader.FilterTerms
inEMPTY_ARRAY| Constructor and Description |
|---|
AssertingTerms(Terms in) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDocCount()
Returns the number of documents that have at least one
term for this field.
|
BytesRef |
getMax()
Returns the largest term (in lexicographic order) in the field.
|
BytesRef |
getMin()
Returns the smallest term (in lexicographic order) in the field.
|
long |
getSumDocFreq()
Returns the sum of
TermsEnum.docFreq() for
all terms in this field. |
long |
getSumTotalTermFreq()
Returns the sum of
TermsEnum.totalTermFreq() for
all terms in this field. |
TermsEnum |
intersect(CompiledAutomaton automaton,
BytesRef bytes)
Returns a TermsEnum that iterates over all terms and
documents that are accepted by the provided
CompiledAutomaton. |
TermsEnum |
iterator()
Returns an iterator that will step through all
terms.
|
String |
toString() |
getStats, hasFreqs, hasOffsets, hasPayloads, hasPositions, sizepublic AssertingTerms(Terms in)
public TermsEnum intersect(CompiledAutomaton automaton, BytesRef bytes) throws IOException
TermsCompiledAutomaton. If the startTerm is
provided then the returned enum will only return terms
> startTerm, but you still must call
next() first to get to the first term. Note that the
provided startTerm must be accepted by
the automaton.
This is an expert low-level API and will only work
for NORMAL compiled automata. To handle any
compiled automata you should instead use
CompiledAutomaton.getTermsEnum(org.apache.lucene.index.Terms) instead.
NOTE: the returned TermsEnum cannot seek
.intersect in class TermsIOExceptionpublic BytesRef getMin() throws IOException
TermsgetMin in class TermsIOExceptionpublic BytesRef getMax() throws IOException
TermsgetMax in class TermsIOExceptionpublic int getDocCount()
throws IOException
TermsgetDocCount in class FilterLeafReader.FilterTermsIOExceptionpublic long getSumDocFreq()
throws IOException
TermsTermsEnum.docFreq() for
all terms in this field. Note that, just like other term
measures, this measure does not take deleted documents
into account.getSumDocFreq in class FilterLeafReader.FilterTermsIOExceptionpublic long getSumTotalTermFreq()
throws IOException
TermsTermsEnum.totalTermFreq() for
all terms in this field. Note that, just like other term
measures, this measure does not take deleted documents
into account.getSumTotalTermFreq in class FilterLeafReader.FilterTermsIOExceptionpublic TermsEnum iterator() throws IOException
Termsiterator in class FilterLeafReader.FilterTermsIOExceptionCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.