Class SearchPlugin.AggregationSpec

java.lang.Object
org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<AggregationBuilder,​org.elasticsearch.common.xcontent.ContextParser<java.lang.String,​? extends AggregationBuilder>>
org.elasticsearch.plugins.SearchPlugin.AggregationSpec
Enclosing interface:
SearchPlugin

public static class SearchPlugin.AggregationSpec
extends SearchPlugin.SearchExtensionSpec<AggregationBuilder,​org.elasticsearch.common.xcontent.ContextParser<java.lang.String,​? extends AggregationBuilder>>
Specification for an Aggregation.
  • Constructor Details

    • AggregationSpec

      public AggregationSpec​(org.elasticsearch.common.ParseField name, Writeable.Reader<T> reader, org.elasticsearch.common.xcontent.ContextParser<java.lang.String,​T> parser)
      Specification for an Aggregation.
      Parameters:
      name - holds the names by which this aggregation might be parsed. The ParseField.getPreferredName() is special as it is the name by under which the reader is registered. So it is the name that the AggregationBuilder should return from NamedWriteable.getWriteableName().
      reader - the reader registered for this aggregation's builder. Typically a reference to a constructor that takes a StreamInput
      parser - the parser the reads the aggregation builder from xcontent
    • AggregationSpec

      public AggregationSpec​(java.lang.String name, Writeable.Reader<T> reader, org.elasticsearch.common.xcontent.ContextParser<java.lang.String,​T> parser)
      Specification for an Aggregation.
      Parameters:
      name - the name by which this aggregation might be parsed or deserialized. Make sure that the AggregationBuilder returns this from NamedWriteable.getWriteableName().
      reader - the reader registered for this aggregation's builder. Typically a reference to a constructor that takes a StreamInput
      parser - the parser the reads the aggregation builder from xcontent
    • AggregationSpec

      @Deprecated public AggregationSpec​(org.elasticsearch.common.ParseField name, Writeable.Reader<? extends AggregationBuilder> reader, Aggregator.Parser parser)
      Deprecated.
      Use the ctor that takes a ContextParser instead
      Specification for an Aggregation.
      Parameters:
      name - holds the names by which this aggregation might be parsed. The ParseField.getPreferredName() is special as it is the name by under which the reader is registered. So it is the name that the AggregationBuilder should return from NamedWriteable.getWriteableName().
      reader - the reader registered for this aggregation's builder. Typically a reference to a constructor that takes a StreamInput
      parser - the parser the reads the aggregation builder from xcontent
    • AggregationSpec

      @Deprecated public AggregationSpec​(java.lang.String name, Writeable.Reader<? extends AggregationBuilder> reader, Aggregator.Parser parser)
      Deprecated.
      Use the ctor that takes a ContextParser instead
      Specification for an Aggregation.
      Parameters:
      name - the name by which this aggregation might be parsed or deserialized. Make sure that the AggregationBuilder returns this from NamedWriteable.getWriteableName().
      reader - the reader registered for this aggregation's builder. Typically a reference to a constructor that takes a StreamInput
      parser - the parser the reads the aggregation builder from xcontent
  • Method Details