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 |
Suggest.Suggestion.SortToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static Comparator<Suggest.Suggestion.Entry.Option> |
FREQUENCY |
static Comparator<Suggest.Suggestion.Entry.Option> |
SCORE |
static int |
TYPE |
entries, name, sizeEMPTY_PARAMS| Constructor and Description |
|---|
TermSuggestion() |
TermSuggestion(String name,
int size,
Suggest.Suggestion.Sort sort) |
| Modifier and Type | Method and Description |
|---|---|
int |
getType() |
protected void |
innerReadFrom(StreamInput in) |
void |
innerWriteTo(StreamOutput out) |
protected TermSuggestion.Entry |
newEntry() |
protected Comparator<Suggest.Suggestion.Entry.Option> |
sortComparator() |
addTerm, getEntries, getName, iterator, readFrom, reduce, toXContent, trim, writeTopublic static final Comparator<Suggest.Suggestion.Entry.Option> SCORE
public static final Comparator<Suggest.Suggestion.Entry.Option> FREQUENCY
public static final int TYPE
public TermSuggestion()
public TermSuggestion(String name, int size, Suggest.Suggestion.Sort sort)
public int getType()
getType in class Suggest.Suggestion<TermSuggestion.Entry>protected Comparator<Suggest.Suggestion.Entry.Option> sortComparator()
sortComparator in class Suggest.Suggestion<TermSuggestion.Entry>protected void innerReadFrom(StreamInput in) throws IOException
innerReadFrom in class Suggest.Suggestion<TermSuggestion.Entry>IOExceptionpublic void innerWriteTo(StreamOutput out) throws IOException
innerWriteTo in class Suggest.Suggestion<TermSuggestion.Entry>IOExceptionprotected TermSuggestion.Entry newEntry()
newEntry in class Suggest.Suggestion<TermSuggestion.Entry>Copyright © 2009–2017. All rights reserved.