Package org.apache.lucene.search.suggest
Interface InputIterator
-
- All Superinterfaces:
BytesRefIterator
- All Known Implementing Classes:
BufferedInputIterator
,InputIterator.InputIteratorWrapper
,SortedInputIterator
,UnsortedInputIterator
public interface InputIterator extends BytesRefIterator
Interface for enumerating term,weight,payload triples for suggester consumption; currently onlyAnalyzingSuggester
,FuzzySuggester
andAnalyzingInfixSuggester
support payloads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InputIterator.InputIteratorWrapper
Wraps a BytesRefIterator as a suggester InputIterator, with all weights set to1
and carries no payload
-
Field Summary
Fields Modifier and Type Field Description static InputIterator
EMPTY
Singleton InputIterator that iterates over 0 BytesRefs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasPayloads()
Returns true if the iterator has payloadsBytesRef
payload()
An arbitrary byte[] to record per suggestion.long
weight()
A term's weight, higher numbers mean better suggestions.-
Methods inherited from interface org.apache.lucene.util.BytesRefIterator
getComparator, 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.payload
to retrieve the payload for each suggestion.
-
hasPayloads
boolean hasPayloads()
Returns true if the iterator has payloads
-
-