Class CustomSuggestion

java.lang.Object
org.opensearch.search.suggest.Suggest.Suggestion<CustomSuggestion.Entry>
org.opensearch.example.customsuggester.CustomSuggestion
All Implemented Interfaces:
Iterable<CustomSuggestion.Entry>, org.opensearch.core.common.io.stream.NamedWriteable, org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentFragment

public class CustomSuggestion extends Suggest.Suggestion<CustomSuggestion.Entry>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent

    org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable

    org.opensearch.core.common.io.stream.Writeable.Reader<V extends Object>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.opensearch.core.ParseField
     
    static final int
     

    Fields inherited from class org.opensearch.search.suggest.Suggest.Suggestion

    entries, name, size

    Fields inherited from interface org.opensearch.core.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomSuggestion(String name, int size, String dummy)
     
    CustomSuggestion(org.opensearch.core.common.io.stream.StreamInput in)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromXContent(org.opensearch.core.xcontent.XContentParser parser, String name)
     
    A meaningless value used to test that plugin suggesters can add fields to their Suggestion types This can't be serialized to xcontent because Suggestions appear in xcontent as an array of entries, so there is no place to add a custom field.
     
    int
     
    newEntry(org.opensearch.core.common.io.stream.StreamInput in)
     
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class org.opensearch.search.suggest.Suggest.Suggestion

    addTerm, equals, fromXContent, getEntries, getName, getSize, hashCode, iterator, parseEntries, reduce, sortComparator, toXContent, trim

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment

    isFragment