public class AutomatonTermsEnum extends FilteredTermsEnum
The algorithm is such:
The algorithm does not attempt to actually skip to the next string that is completely accepted. This is not possible when the language accepted by the FSM is not finite (i.e. * operator).
|Constructor and Description|
Construct an enumerator based upon an automaton, enumerating the specified field, working on a supplied TermsEnum
|Modifier and Type||Method and Description|
Returns true if the term matches the automaton.
On the first call to
attributes, docFreq, impacts, next, ord, postings, seekCeil, seekExact, seekExact, seekExact, setInitialSeekTerm, term, termState, totalTermFreq
public AutomatonTermsEnum(TermsEnum tenum, CompiledAutomaton compiled)
protected FilteredTermsEnum.AcceptStatus accept(BytesRef term)
protected BytesRef nextSeekTerm(BytesRef term) throws IOException
FilteredTermsEnum.AcceptStatus.NO_AND_SEEK, this method will be called to eventually seek the underlying TermsEnum to a new position. On the first call,
null, later calls will provide the term the underlying enum is positioned at. This method returns per default only one time the initial seek term and then
null, so no repositioning is ever done.
Override this method, if you want a more sophisticated TermsEnum,
that repositions the iterator during enumeration.
If this method always returns
null the enum is empty.
Please note: This method should always provide a greater term than the last enumerated term, else the behaviour of this enum violates the contract for TermsEnums.
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.