Module org.elasticsearch.server
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
Contains the suggested text with its document frequency and score.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.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
FieldsFields inherited from class org.elasticsearch.search.suggest.Suggest.Suggestion.Entry.Option
COLLATE_MATCH, HIGHLIGHTED, SCORE, TEXT
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getFreq()
protected void
mergeInto
(Suggest.Suggestion.Entry.Option otherOption) 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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
FREQ
-
-
Constructor Details
-
Option
-
Option
- Throws:
IOException
-
-
Method Details
-
mergeInto
- Overrides:
mergeInto
in classSuggest.Suggestion.Entry.Option
-
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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Overrides:
toXContent
in classSuggest.Suggestion.Entry.Option
- Throws:
IOException
-