Package org.apache.lucene.search.suggest
Interface InputIterator
-
- All Superinterfaces:
BytesRefIterator
- All Known Implementing Classes:
BufferedInputIterator,DocumentDictionary.DocumentInputIterator,InputIterator.InputIteratorWrapper,SortedInputIterator,UnsortedInputIterator
public interface InputIterator extends BytesRefIterator
Interface for enumerating term,weight,payload triples for suggester consumption; currently onlyAnalyzingSuggester,FuzzySuggesterandAnalyzingInfixSuggestersupport payloads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classInputIterator.InputIteratorWrapperWraps a BytesRefIterator as a suggester InputIterator, with all weights set to1and carries no payload
-
Field Summary
Fields Modifier and Type Field Description static InputIteratorEMPTYSingleton InputIterator that iterates over 0 BytesRefs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<BytesRef>contexts()A term's contexts context can be used to filter suggestions.booleanhasContexts()Returns true if the iterator has contextsbooleanhasPayloads()Returns true if the iterator has payloadsBytesRefpayload()An arbitrary byte[] to record per suggestion.longweight()A term's weight, higher numbers mean better suggestions.-
Methods inherited from interface org.apache.lucene.util.BytesRefIterator
next
-
-
-
-
Field Detail
-
EMPTY
static final InputIterator EMPTY
Singleton InputIterator that iterates over 0 BytesRefs.
-
-
Method Detail
-
weight
long weight()
A term's weight, higher numbers mean better suggestions.
-
payload
BytesRef payload()
An arbitrary byte[] to record per suggestion. SeeLookup.LookupResult.payloadto retrieve the payload for each suggestion.
-
hasPayloads
boolean hasPayloads()
Returns true if the iterator has payloads
-
contexts
Set<BytesRef> contexts()
A term's contexts context can be used to filter suggestions. May return null, if suggest entries do not have any context
-
hasContexts
boolean hasContexts()
Returns true if the iterator has contexts
-
-