public class TermSuggestion extends Suggest.Suggestion<TermSuggestion.Entry>
Modifier and Type | Class and Description |
---|---|
static class |
TermSuggestion.Entry
Represents a part from the suggest text with suggested options.
|
static class |
TermSuggestion.Frequency |
static class |
TermSuggestion.Score |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<Suggest.Suggestion.Entry.Option> |
FREQUENCY |
static java.lang.String |
NAME |
static java.util.Comparator<Suggest.Suggestion.Entry.Option> |
SCORE |
static int |
TYPE |
entries, name, size
EMPTY_PARAMS
Constructor and Description |
---|
TermSuggestion() |
TermSuggestion(java.lang.String name,
int size,
SortBy sort) |
Modifier and Type | Method and Description |
---|---|
static TermSuggestion |
fromXContent(XContentParser parser,
java.lang.String name) |
protected java.lang.String |
getType()
Returns a string representing the type of the suggestion.
|
int |
getWriteableType()
Returns a integer representing the type of the suggestion.
|
protected void |
innerReadFrom(StreamInput in) |
void |
innerWriteTo(StreamOutput out) |
protected TermSuggestion.Entry |
newEntry() |
protected java.util.Comparator<Suggest.Suggestion.Entry.Option> |
sortComparator() |
addTerm, fromXContent, getEntries, getName, getSize, iterator, parseEntries, readFrom, reduce, toXContent, trim, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
public static final java.lang.String NAME
public static final java.util.Comparator<Suggest.Suggestion.Entry.Option> SCORE
public static final java.util.Comparator<Suggest.Suggestion.Entry.Option> FREQUENCY
public static final int TYPE
public TermSuggestion()
public TermSuggestion(java.lang.String name, int size, SortBy sort)
public int getWriteableType()
Suggest.Suggestion
getWriteableType
in class Suggest.Suggestion<TermSuggestion.Entry>
protected java.lang.String getType()
Suggest.Suggestion
getType
in class Suggest.Suggestion<TermSuggestion.Entry>
protected java.util.Comparator<Suggest.Suggestion.Entry.Option> sortComparator()
sortComparator
in class Suggest.Suggestion<TermSuggestion.Entry>
protected void innerReadFrom(StreamInput in) throws java.io.IOException
innerReadFrom
in class Suggest.Suggestion<TermSuggestion.Entry>
java.io.IOException
public void innerWriteTo(StreamOutput out) throws java.io.IOException
innerWriteTo
in class Suggest.Suggestion<TermSuggestion.Entry>
java.io.IOException
public static TermSuggestion fromXContent(XContentParser parser, java.lang.String name) throws java.io.IOException
java.io.IOException
protected TermSuggestion.Entry newEntry()
newEntry
in class Suggest.Suggestion<TermSuggestion.Entry>