Class TermSuggestion.Entry.Option
java.lang.Object
org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option
org.elasticsearch.search.suggest.term.TermSuggestion.Entry.Option
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentFragment
- Enclosing class:
- TermSuggestion.Entry
public static class TermSuggestion.Entry.Option extends Suggest.Suggestion.Entry.Option
Contains the suggested text with its document frequency and score.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description static ParseField
FREQ
Fields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option
COLLATE_MATCH, HIGHLIGHTED, SCORE, TEXT
-
Constructor Summary
Constructors Constructor Description Option(StreamInput in)
Option(Text text, int freq, float score)
-
Method Summary
Modifier and Type Method Description static TermSuggestion.Entry.Option
fromXContent(XContentParser parser)
int
getFreq()
protected void
mergeInto(Suggest.Suggestion.Entry.Option otherOption)
void
setFreq(int freq)
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option
collateMatch, equals, getHighlighted, getScore, getText, hashCode, setScore
-
Field Details
-
Constructor Details
-
Method Details
-
mergeInto
- Overrides:
mergeInto
in classSuggest.Suggestion.Entry.Option
-
setFreq
public void setFreq(int freq) -
getFreq
public int getFreq()- Returns:
- How often this suggested text appears in the index.
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classSuggest.Suggestion.Entry.Option
- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceToXContent
- Overrides:
toXContent
in classSuggest.Suggestion.Entry.Option
- Throws:
java.io.IOException
-
fromXContent
-