Class TermSuggestion
java.lang.Object
org.elasticsearch.search.suggest.Suggest.Suggestion<TermSuggestion.Entry>
org.elasticsearch.search.suggest.term.TermSuggestion
- All Implemented Interfaces:
Iterable<TermSuggestion.Entry>
,NamedWriteable
,Writeable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
The suggestion responses corresponding with the suggestions in the request.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents a part from the suggest text with suggested options.static class
static class
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Comparator<Suggest.Suggestion.Entry.Option>
static final Comparator<Suggest.Suggestion.Entry.Option>
Fields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
entries, name, size, TYPE
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static TermSuggestion
fromXContent
(org.elasticsearch.xcontent.XContentParser parser, String name) getSort()
Returns the name of the writeable objectint
hashCode()
protected TermSuggestion.Entry
newEntry
(StreamInput in) void
protected Comparator<Suggest.Suggestion.Entry.Option>
void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
addTerm, fromXContent, getEntries, getName, getSize, iterator, parseEntries, reduce, toXContent, trim
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
SCORE
-
FREQUENCY
-
-
Constructor Details
-
TermSuggestion
-
TermSuggestion
- Throws:
IOException
-
-
Method Details
-
setSort
-
getSort
-
sortComparator
- Overrides:
sortComparator
in classSuggest.Suggestion<TermSuggestion.Entry>
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classSuggest.Suggestion<TermSuggestion.Entry>
- Throws:
IOException
-
getWriteableName
Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
- Specified by:
getWriteableName
in classSuggest.Suggestion<TermSuggestion.Entry>
-
fromXContent
public static TermSuggestion fromXContent(org.elasticsearch.xcontent.XContentParser parser, String name) throws IOException - Throws:
IOException
-
newEntry
- Specified by:
newEntry
in classSuggest.Suggestion<TermSuggestion.Entry>
- Throws:
IOException
-
equals
- Overrides:
equals
in classSuggest.Suggestion<TermSuggestion.Entry>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classSuggest.Suggestion<TermSuggestion.Entry>
-