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.Option-
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested 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
-
Fields inherited from class org.opensearch.search.suggest.Suggest.Suggestion.Entry
length, offset, options, OPTIONS, text
-
Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description Entry()Entry(StreamInput in)Entry(Text text, int offset, int length, java.lang.String dummy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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
-
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
-
-
-
-
Constructor Detail
-
Entry
public Entry()
-
Entry
public Entry(Text text, int offset, int length, java.lang.String dummy)
-
Entry
public Entry(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
java.io.IOException
-
newOption
protected CustomSuggestion.Entry.Option newOption(StreamInput in) throws java.io.IOException
- Specified by:
newOptionin classSuggest.Suggestion.Entry<CustomSuggestion.Entry.Option>- Throws:
java.io.IOException
-
merge
protected void merge(Suggest.Suggestion.Entry<CustomSuggestion.Entry.Option> otherEntry)
- 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
public static CustomSuggestion.Entry fromXContent(XContentParser parser)
-
-