Class TermSuggestion
org.elasticsearch.search.suggest.Suggest.Suggestion<TermSuggestion.Entry>
org.elasticsearch.search.suggest.term.TermSuggestion
- All Implemented Interfaces:
<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
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.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.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 <Suggest.Suggestion.Entry.Option>
static <Suggest.Suggestion.Entry.Option>
static int
Deprecated.Fields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion
entries, name, size
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
other)
static TermSuggestion
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser, name)
getSort()
Returns the name of the writeable objectint
Returns a integer representing the type of the suggestion.int
hashCode()
protected TermSuggestion.Entry
newEntry(StreamInput in)
void
protected <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.
, , , , , , , ,
Methods inherited from interface java.lang.
,
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
TYPE
public static final int TYPEDeprecated.- See Also:
- Constant Field Values
-
SCORE
-
FREQUENCY
-
-
Constructor Details
-
TermSuggestion
-
TermSuggestion
- Throws:
-
-
Method Details
-
getWriteableType
public int getWriteableType()Description copied from class:Suggest.Suggestion
Returns 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:
getWriteableType
in classSuggest.Suggestion<TermSuggestion.Entry>
-
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:
-
getWriteableName
public 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.common.xcontent.XContentParser parser, name) throws- Throws:
-
newEntry
- Specified by:
newEntry
in classSuggest.Suggestion<TermSuggestion.Entry>
- Throws:
-
equals
public boolean equals( other)- Overrides:
equals
in classSuggest.Suggestion<TermSuggestion.Entry>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classSuggest.Suggestion<TermSuggestion.Entry>
-