Class FilterableTermsEnum
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.elasticsearch.common.lucene.index.FilterableTermsEnum
-
- All Implemented Interfaces:
org.apache.lucene.util.BytesRefIterator
- Direct Known Subclasses:
FreqTermsEnum
public class FilterableTermsEnum extends org.apache.lucene.index.TermsEnumA frequency TermsEnum that returns frequencies derived from a collection of cached leaf termEnums. It also allows to provide a filter to explicitly compute frequencies only for docs that match the filter (heavier!).
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.lucene.util.BytesRefcurrentprotected intcurrentDocFreqprotected longcurrentTotalTermFreqprotected intdocsEnumFlagprotected static intNOT_FOUND
-
Constructor Summary
Constructors Constructor Description FilterableTermsEnum(org.apache.lucene.index.IndexReader reader, java.lang.String field, int docsEnumFlag, org.apache.lucene.search.Query filter)
-
Method Summary
Modifier and Type Method Description intdocFreq()org.apache.lucene.util.BytesRefnext()longord()org.apache.lucene.index.PostingsEnumpostings(org.apache.lucene.index.PostingsEnum reuse, int flags)org.apache.lucene.index.TermsEnum.SeekStatusseekCeil(org.apache.lucene.util.BytesRef text)voidseekExact(long ord)booleanseekExact(org.apache.lucene.util.BytesRef text)org.apache.lucene.util.BytesRefterm()longtotalTermFreq()
-
-
-
Field Detail
-
NOT_FOUND
protected static final int NOT_FOUND
- See Also:
- Constant Field Values
-
currentDocFreq
protected int currentDocFreq
-
currentTotalTermFreq
protected long currentTotalTermFreq
-
current
protected org.apache.lucene.util.BytesRef current
-
docsEnumFlag
protected final int docsEnumFlag
-
-
Constructor Detail
-
FilterableTermsEnum
public FilterableTermsEnum(org.apache.lucene.index.IndexReader reader, java.lang.String field, int docsEnumFlag, @Nullable org.apache.lucene.search.Query filter) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
term
public org.apache.lucene.util.BytesRef term() throws java.io.IOException- Specified by:
termin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
seekExact
public boolean seekExact(org.apache.lucene.util.BytesRef text) throws java.io.IOException- Overrides:
seekExactin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
docFreq
public int docFreq() throws java.io.IOException- Specified by:
docFreqin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
totalTermFreq
public long totalTermFreq() throws java.io.IOException- Specified by:
totalTermFreqin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
seekExact
public void seekExact(long ord) throws java.io.IOException- Specified by:
seekExactin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
seekCeil
public org.apache.lucene.index.TermsEnum.SeekStatus seekCeil(org.apache.lucene.util.BytesRef text) throws java.io.IOException- Specified by:
seekCeilin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
ord
public long ord() throws java.io.IOException- Specified by:
ordin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
postings
public org.apache.lucene.index.PostingsEnum postings(org.apache.lucene.index.PostingsEnum reuse, int flags) throws java.io.IOException- Specified by:
postingsin classorg.apache.lucene.index.TermsEnum- Throws:
java.io.IOException
-
next
public org.apache.lucene.util.BytesRef next() throws java.io.IOException- Throws:
java.io.IOException
-
-