Class FilterableTermsEnum
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.TermsEnum
A 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!).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
org.apache.lucene.index.TermsEnum.SeekStatus
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.lucene.util.BytesRef
protected int
protected long
protected int
protected static int
Fields inherited from class org.apache.lucene.index.TermsEnum
EMPTY
-
Constructor Summary
ConstructorDescriptionFilterableTermsEnum(org.apache.lucene.index.IndexReader reader, field, int docsEnumFlag, org.apache.lucene.search.Query filter)
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.util.AttributeSource
int
docFreq()
org.apache.lucene.index.ImpactsEnum
impacts(int flags)
org.apache.lucene.util.BytesRef
next()
long
ord()
org.apache.lucene.index.PostingsEnum
postings(org.apache.lucene.index.PostingsEnum reuse, int flags)
org.apache.lucene.index.TermsEnum.SeekStatus
seekCeil(org.apache.lucene.util.BytesRef text)
void
seekExact(long ord)
boolean
seekExact(org.apache.lucene.util.BytesRef text)
void
seekExact(org.apache.lucene.util.BytesRef term, org.apache.lucene.index.TermState state)
org.apache.lucene.util.BytesRef
term()
org.apache.lucene.index.TermState
long
Methods inherited from class org.apache.lucene.index.TermsEnum
postings
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Field Details
-
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 Details
-
FilterableTermsEnum
public FilterableTermsEnum(org.apache.lucene.index.IndexReader reader, field, int docsEnumFlag, @Nullable org.apache.lucene.search.Query filter) throws- Throws:
-
-
Method Details
-
term
public org.apache.lucene.util.BytesRef term() throws- Specified by:
term
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
attributes
public org.apache.lucene.util.AttributeSource attributes()- Specified by:
attributes
in classorg.apache.lucene.index.TermsEnum
-
seekExact
public boolean seekExact(org.apache.lucene.util.BytesRef text) throws- Specified by:
seekExact
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
docFreq
public int docFreq() throws- Specified by:
docFreq
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
totalTermFreq
public long totalTermFreq() throws- Specified by:
totalTermFreq
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
seekExact
public void seekExact(long ord) throws- Specified by:
seekExact
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
seekExact
public void seekExact(org.apache.lucene.util.BytesRef term, org.apache.lucene.index.TermState state) throws- Specified by:
seekExact
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
termState
public org.apache.lucene.index.TermState termState() throws- Specified by:
termState
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
seekCeil
public org.apache.lucene.index.TermsEnum.SeekStatus seekCeil(org.apache.lucene.util.BytesRef text) throws- Specified by:
seekCeil
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
ord
public long ord() throws- Specified by:
ord
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
postings
public org.apache.lucene.index.PostingsEnum postings(org.apache.lucene.index.PostingsEnum reuse, int flags) throws- Specified by:
postings
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
impacts
public org.apache.lucene.index.ImpactsEnum impacts(int flags) throws- Specified by:
impacts
in classorg.apache.lucene.index.TermsEnum
- Throws:
-
next
public org.apache.lucene.util.BytesRef next() throws- Throws:
-