# Uses of Class
org.apache.lucene.index.TermsEnum

Packages that use TermsEnum
Package
Description
org.apache.lucene.codecs
Codecs API: API for customization of the encoding and structure of the index.
org.apache.lucene.codecs.lucene90.blocktree
BlockTree terms dictionary.
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.search
Code to search indices.
org.apache.lucene.util.automaton
Finite-state automaton for regular expressions.

## Uses of TermsEnum in org.apache.lucene.codecs

Methods in org.apache.lucene.codecs with parameters of type TermsEnum
Modifier and Type
Method
Description
`abstract BlockTermState`
PostingsWriterBase.`writeTerm(BytesRef term, TermsEnum termsEnum, FixedBitSet docsSeen, NormsProducer norms)`
Write all postings for one term; use the provided `TermsEnum` to pull a `PostingsEnum`.
`final BlockTermState`
PushPostingsWriterBase.`writeTerm(BytesRef term, TermsEnum termsEnum, FixedBitSet docsSeen, NormsProducer norms)`

## Uses of TermsEnum in org.apache.lucene.codecs.lucene90.blocktree

Methods in org.apache.lucene.codecs.lucene90.blocktree that return TermsEnum
Modifier and Type
Method
Description
`TermsEnum`
FieldReader.`intersect(CompiledAutomaton compiled, BytesRef startTerm)`
`TermsEnum`
FieldReader.`iterator()`

## Uses of TermsEnum in org.apache.lucene.index

Subclasses of TermsEnum in org.apache.lucene.index
Modifier and Type
Class
Description
`class`
`AutomatonTermsEnum`
A FilteredTermsEnum that enumerates terms based upon what is accepted by a DFA.
`class`
`BaseTermsEnum`
A base TermsEnum that adds default implementations for `BaseTermsEnum.attributes()` `BaseTermsEnum.termState()` `BaseTermsEnum.seekExact(BytesRef)` `BaseTermsEnum.seekExact(BytesRef, TermState)` In some cases, the default implementation may be slow and consume huge memory, so subclass SHOULD have its own implementation if possible.
`static class`
`ExitableDirectoryReader.ExitableTermsEnum`
Wrapper class for TermsEnum that is used by ExitableTerms for implementing an exitable enumeration of terms.
`class`
`FilteredTermsEnum`
Abstract class for enumerating a subset of all terms.
`static class`
`FilterLeafReader.FilterTermsEnum`
Base class for filtering `TermsEnum` implementations.
`final class`
`MultiTermsEnum`
Exposes `TermsEnum` API, merged from `TermsEnum` API of sub-segments.
`final class`
`SingleTermsEnum`
Subclass of FilteredTermsEnum for enumerating a single term.
Fields in org.apache.lucene.index declared as TermsEnum
Modifier and Type
Field
Description
`static final TermsEnum`
TermsEnum.`EMPTY`
An empty TermsEnum for quickly returning an empty instance e.g.
`protected final TermsEnum`
FilterLeafReader.FilterTermsEnum.`in`
The underlying TermsEnum instance.
`protected final TermsEnum`
FilteredTermsEnum.`tenum`
The delegate `TermsEnum`.
Methods in org.apache.lucene.index that return TermsEnum
Modifier and Type
Method
Description
`TermsEnum`
ExitableDirectoryReader.ExitableTerms.`intersect(CompiledAutomaton compiled, BytesRef startTerm)`
`TermsEnum`
FilterSortedDocValues.`intersect(CompiledAutomaton automaton)`
`TermsEnum`
FilterSortedSetDocValues.`intersect(CompiledAutomaton automaton)`
`TermsEnum`
MultiTerms.`intersect(CompiledAutomaton compiled, BytesRef startTerm)`
`TermsEnum`
SortedDocValues.`intersect(CompiledAutomaton automaton)`
Returns a `TermsEnum` over the values, filtered by a `CompiledAutomaton` The enum supports `ord()`.
`TermsEnum`
SortedSetDocValues.`intersect(CompiledAutomaton automaton)`
Returns a `TermsEnum` over the values, filtered by a `CompiledAutomaton` The enum supports `ord()`.
`TermsEnum`
Terms.`intersect(CompiledAutomaton compiled, BytesRef startTerm)`
Returns a TermsEnum that iterates over all terms and documents that are accepted by the provided `CompiledAutomaton`.
`TermsEnum`
ExitableDirectoryReader.ExitableTerms.`iterator()`
`TermsEnum`
FilterLeafReader.FilterTerms.`iterator()`
`TermsEnum`
MultiTerms.`iterator()`
`abstract TermsEnum`
Terms.`iterator()`
Returns an iterator that will step through all terms.
`TermsEnum`
MultiTermsEnum.`reset(org.apache.lucene.index.TermsEnumIndex[] termsEnumsIndex)`
The terms array must be newly created TermsEnum, ie `BytesRefIterator.next()` has not yet been called.
`TermsEnum`
FilterSortedDocValues.`termsEnum()`
`TermsEnum`
FilterSortedSetDocValues.`termsEnum()`
`TermsEnum`
SortedDocValues.`termsEnum()`
Returns a `TermsEnum` over the values.
`TermsEnum`
SortedSetDocValues.`termsEnum()`
Returns a `TermsEnum` over the values.
Methods in org.apache.lucene.index with parameters of type TermsEnum
Modifier and Type
Method
Description
`static OrdinalMap`
OrdinalMap.`build(IndexReader.CacheKey owner, TermsEnum[] subs, long[] weights, float acceptableOverheadRatio)`
Creates an ordinal map that allows mapping ords to/from a merged space from `subs`.
Constructors in org.apache.lucene.index with parameters of type TermsEnum
Modifier
Constructor
Description
``
`AutomatonTermsEnum(TermsEnum tenum, CompiledAutomaton compiled)`
Construct an enumerator based upon an automaton, enumerating the specified field, working on a supplied TermsEnum
``
`ExitableTermsEnum(TermsEnum termsEnum, QueryTimeout queryTimeout)`
Constructor *
`protected`
`FilteredTermsEnum(TermsEnum tenum)`
Creates a filtered `TermsEnum` on a terms enum.
`protected`
`FilteredTermsEnum(TermsEnum tenum, boolean startWithSeek)`
Creates a filtered `TermsEnum` on a terms enum.
`protected`
`FilterTermsEnum(TermsEnum in)`
Creates a new FilterTermsEnum
``
`SingleTermsEnum(TermsEnum tenum, BytesRef termText)`
Creates a new `SingleTermsEnum`.

## Uses of TermsEnum in org.apache.lucene.search

Subclasses of TermsEnum in org.apache.lucene.search
Modifier and Type
Class
Description
`final class`
`FuzzyTermsEnum`
Subclass of TermsEnum for enumerating all terms that are similar to the specified filter term.
Methods in org.apache.lucene.search that return TermsEnum
Modifier and Type
Method
Description
`protected TermsEnum`
AutomatonQuery.`getTermsEnum(Terms terms, AttributeSource atts)`
`protected TermsEnum`
FuzzyQuery.`getTermsEnum(Terms terms, AttributeSource atts)`
`final TermsEnum`
MultiTermQuery.`getTermsEnum(Terms terms)`
Constructs an enumeration that expands the pattern term.
`protected abstract TermsEnum`
MultiTermQuery.`getTermsEnum(Terms terms, AttributeSource atts)`
Construct the enumeration to be used, expanding the pattern term.
`protected TermsEnum`
MultiTermQuery.RewriteMethod.`getTermsEnum(MultiTermQuery query, Terms terms, AttributeSource atts)`
Returns the `MultiTermQuery`s `TermsEnum`
`protected TermsEnum`
TermInSetQuery.`getTermsEnum(Terms terms, AttributeSource atts)`
Methods in org.apache.lucene.search with parameters of type TermsEnum
Modifier and Type
Method
Description
`static float`
PhraseQuery.`termPositionsCost(TermsEnum termsEnum)`
Returns an expected cost in simple operations of processing the occurrences of a term in a document that contains the term.

## Uses of TermsEnum in org.apache.lucene.util.automaton

Methods in org.apache.lucene.util.automaton that return TermsEnum
Modifier and Type
Method
Description
`TermsEnum`
CompiledAutomaton.`getTermsEnum(Terms terms)`
Return a `TermsEnum` intersecting the provided `Terms` with the terms accepted by this automaton.