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.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
The suggestion responses corresponding with the suggestions in the request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a part from the suggest text with suggested options.static classstatic classNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intDeprecated.Fields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
entries, name, sizeFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TermSuggestionfromXContent(org.elasticsearch.common.xcontent.XContentParser parser, String name)getSort()Returns the name of the writeable objectintReturns a integer representing the type of the suggestion.inthashCode()protected TermSuggestion.EntrynewEntry(StreamInput in)voidprotected Comparator<Suggest.Suggestion.Entry.Option>voidwriteTo(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, trimMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
TYPE
Deprecated.- See Also:
- Constant Field Values
-
SCORE
-
FREQUENCY
-
-
Constructor Details
-
TermSuggestion
-
TermSuggestion
- Throws:
IOException
-
-
Method Details
-
getWriteableType
public int getWriteableType()Description copied from class:Suggest.SuggestionReturns a integer representing the type of the suggestion. This is used for internal serialization over the network. This class is now serialized as a NamedWriteable and this method only remains for backwards compatibility- Overrides:
getWriteableTypein classSuggest.Suggestion<TermSuggestion.Entry>
-
setSort
-
getSort
-
sortComparator
- Overrides:
sortComparatorin classSuggest.Suggestion<TermSuggestion.Entry>
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSuggest.Suggestion<TermSuggestion.Entry>- Throws:
IOException
-
getWriteableName
Description copied from interface:NamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein classSuggest.Suggestion<TermSuggestion.Entry>
-
fromXContent
public static TermSuggestion fromXContent(org.elasticsearch.common.xcontent.XContentParser parser, String name) throws IOException- Throws:
IOException
-
newEntry
- Specified by:
newEntryin classSuggest.Suggestion<TermSuggestion.Entry>- Throws:
IOException
-
equals
- Overrides:
equalsin classSuggest.Suggestion<TermSuggestion.Entry>
-
hashCode
public int hashCode()- Overrides:
hashCodein classSuggest.Suggestion<TermSuggestion.Entry>
-