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:
Streamable
,ToXContent
,ToXContentObject
- 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
-
-
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
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description static TermSuggestion.Entry.Option
fromXContent(XContentParser parser)
int
getFreq()
protected XContentBuilder
innerToXContent(XContentBuilder builder, ToXContent.Params params)
protected void
mergeInto(Suggest.Suggestion.Entry.Option otherOption)
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.void
setFreq(int freq)
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option
collateMatch, equals, getHighlighted, getScore, getText, hashCode, setScore, toXContent
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
FREQ
public static final ParseField FREQ
-
-
Constructor Detail
-
Option
public Option(Text text, int freq, float score)
-
Option
protected Option()
-
-
Method Detail
-
mergeInto
protected void mergeInto(Suggest.Suggestion.Entry.Option otherOption)
- 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.
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classSuggest.Suggestion.Entry.Option
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Overrides:
writeTo
in classSuggest.Suggestion.Entry.Option
- Throws:
java.io.IOException
-
innerToXContent
protected XContentBuilder innerToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Overrides:
innerToXContent
in classSuggest.Suggestion.Entry.Option
- Throws:
java.io.IOException
-
fromXContent
public static TermSuggestion.Entry.Option fromXContent(XContentParser parser)
-
-