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:
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 ClassesNested 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 Object>, Writeable.Writer<V extends Object> -
Field Summary
Fields inherited from class org.opensearch.search.suggest.Suggest.Suggestion.Entry
length, offset, options, OPTIONS, textFields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomSuggestion.EntryfromXContent(XContentParser parser) getDummy()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) toXContent(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, sortMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.opensearch.common.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
Entry
public Entry() -
Entry
-
Entry
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
IOException
-
newOption
- Specified by:
newOptionin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
IOException
-
merge
- Overrides:
mergein classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>
-
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 IOException - Specified by:
toXContentin interfaceToXContent- Overrides:
toXContentin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
IOException
-
fromXContent
-