Class FreqTermsEnum
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.elasticsearch.common.lucene.index.FilterableTermsEnum
-
- org.elasticsearch.common.lucene.index.FreqTermsEnum
-
- All Implemented Interfaces:
Closeable,AutoCloseable,BytesRefIterator,Releasable
public class FreqTermsEnum extends FilterableTermsEnum implements Releasable
A frequency terms enum that maintains a cache of docFreq, totalTermFreq, or both for repeated term lookup.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.lucene.index.FilterableTermsEnum
current, currentDocFreq, currentTotalTermFreq, docsEnumFlag, NOT_FOUND
-
-
Constructor Summary
Constructors Constructor Description FreqTermsEnum(IndexReader reader, String field, boolean needDocFreq, boolean needTotalTermFreq, Query filter, BigArrays bigArrays)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanseekExact(BytesRef text)Attempts to seek to the exact term, returning true if the term is found.-
Methods inherited from class org.elasticsearch.common.lucene.index.FilterableTermsEnum
attributes, docFreq, impacts, next, ord, postings, seekCeil, seekExact, seekExact, term, termState, totalTermFreq
-
-
-
-
Constructor Detail
-
FreqTermsEnum
public FreqTermsEnum(IndexReader reader, String field, boolean needDocFreq, boolean needTotalTermFreq, @Nullable Query filter, BigArrays bigArrays) throws IOException
- Throws:
IOException
-
-
Method Detail
-
seekExact
public boolean seekExact(BytesRef text) throws IOException
Description copied from class:TermsEnumAttempts to seek to the exact term, returning true if the term is found. If this returns false, the enum is unpositioned. For some codecs, seekExact may be substantially faster thanTermsEnum.seekCeil(org.apache.lucene.util.BytesRef).- Overrides:
seekExactin classFilterableTermsEnum- Returns:
- true if the term is found; return false if the enum is unpositioned.
- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
-