Class CustomSuggestion.Entry
java.lang.Object
org.opensearch.search.suggest.Suggest.Suggestion.Entry<CustomSuggestion.Entry.Option>
org.opensearch.example.customsuggester.CustomSuggestion.Entry
- All Implemented Interfaces:
java.lang.Iterable<CustomSuggestion.Entry.Option>,Writeable,ToXContent,ToXContentFragment
- Enclosing class:
- CustomSuggestion
public static class CustomSuggestion.Entry extends Suggest.Suggestion.Entry<CustomSuggestion.Entry.Option>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomSuggestion.Entry.OptionNested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object> -
Field Summary
-
Constructor Summary
Constructors Constructor Description Entry()Entry(StreamInput in)Entry(Text text, int offset, int length, java.lang.String dummy) -
Method Summary
Modifier and Type Method Description static CustomSuggestion.EntryfromXContent(XContentParser parser)java.lang.StringgetDummy()Meaningless field used to test that plugin suggesters can add fields to their entriesprotected voidmerge(Suggest.Suggestion.Entry<CustomSuggestion.Entry.Option> otherEntry)protected CustomSuggestion.Entry.OptionnewOption(StreamInput in)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Methods inherited from class org.opensearch.search.suggest.Suggest.Suggestion.Entry
addOption, addOptions, declareCommonFields, equals, getLength, getOffset, getOptions, getText, hashCode, iterator, reduce, sort
-
Constructor Details
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
java.io.IOException
-
newOption
- Specified by:
newOptionin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
java.io.IOException
-
merge
- Overrides:
mergein classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>
-
getDummy
public java.lang.String getDummy()Meaningless field used to test that plugin suggesters can add fields to their entries -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Overrides:
toXContentin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
java.io.IOException
-
fromXContent
-