Class SearchPlugin.SuggesterSpec<T extends SuggestionBuilder<T>>

java.lang.Object
org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<T,org.elasticsearch.core.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,IOException>>
org.elasticsearch.plugins.SearchPlugin.SuggesterSpec<T>
Enclosing interface:
SearchPlugin

public static class SearchPlugin.SuggesterSpec<T extends SuggestionBuilder<T>> extends SearchPlugin.SearchExtensionSpec<T,org.elasticsearch.core.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,IOException>>
Specification for a Suggester.
  • Constructor Details

    • SuggesterSpec

      public SuggesterSpec(org.elasticsearch.common.xcontent.ParseField name, Writeable.Reader<T> builderReader, org.elasticsearch.core.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,IOException> builderParser, Writeable.Reader<? extends Suggest.Suggestion> suggestionReader)
      Specification of custom Suggester.
      Parameters:
      name - holds the names by which this suggester might be parsed. The ParseField.getPreferredName() is special as it is the name by under which the request builder and Suggestion response readers are registered. So it is the name that the query and Suggestion response should use as their NamedWriteable.getWriteableName() return values too.
      builderReader - the reader registered for this suggester's builder. Typically a reference to a constructor that takes a StreamInput
      builderParser - a parser that reads the suggester's builder from xcontent
      suggestionReader - the reader registered for this suggester's Suggestion response. Typically a reference to a constructor that takes a StreamInput
    • SuggesterSpec

      public SuggesterSpec(String name, Writeable.Reader<T> builderReader, org.elasticsearch.core.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,IOException> builderParser, Writeable.Reader<? extends Suggest.Suggestion> suggestionReader)
      Specification of custom Suggester.
      Parameters:
      name - the name by which this suggester might be parsed or deserialized. Make sure that the query builder and Suggestion response reader return this name for NamedWriteable.getWriteableName().
      builderReader - the reader registered for this suggester's builder. Typically a reference to a constructor that takes a StreamInput
      builderParser - a parser that reads the suggester's builder from xcontent
      suggestionReader - the reader registered for this suggester's Suggestion response. Typically a reference to a constructor that takes a StreamInput
  • Method Details