Class TermSuggestion.Entry.Option
java.lang.Object
org.opensearch.search.suggest.Suggest.Suggestion.Entry.Option
org.opensearch.search.suggest.term.TermSuggestion.Entry.Option
- All Implemented Interfaces:
Writeable
,org.opensearch.common.xcontent.ToXContent
,org.opensearch.common.xcontent.ToXContentFragment
- Enclosing class:
- TermSuggestion.Entry
Contains the suggested text with its document frequency and score.
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsFields inherited from class org.opensearch.search.suggest.Suggest.Suggestion.Entry.Option
COLLATE_MATCH, HIGHLIGHTED, SCORE, TEXT
Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TermSuggestion.Entry.Option
fromXContent
(org.opensearch.common.xcontent.XContentParser parser) int
getFreq()
protected void
mergeInto
(Suggest.Suggestion.Entry.Option otherOption) void
setFreq
(int freq) org.opensearch.common.xcontent.XContentBuilder
toXContent
(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.opensearch.search.suggest.Suggest.Suggestion.Entry.Option
collateMatch, equals, getHighlighted, getScore, getText, hashCode, setScore
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
FREQ
public static final org.opensearch.common.ParseField FREQ
-
-
Constructor Details
-
Option
-
Option
- Throws:
IOException
-
-
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:
IOException
-
toXContent
public org.opensearch.common.xcontent.XContentBuilder toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.common.xcontent.ToXContent
- Overrides:
toXContent
in classSuggest.Suggestion.Entry.Option
- Throws:
IOException
-
fromXContent
public static TermSuggestion.Entry.Option fromXContent(org.opensearch.common.xcontent.XContentParser parser)
-