Class Pivot.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.transform.Pivot.Builder
All Implemented Interfaces:
ObjectBuilder<Pivot>
Enclosing class:
Pivot

public static class Pivot.Builder
extends ObjectBuilderBase
implements ObjectBuilder<Pivot>
Builder for Pivot.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • aggregations

      public final Pivot.Builder aggregations​(java.util.Map<java.lang.String,​Aggregation> map)
      Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.

      API name: aggregations

      Adds all entries of map to aggregations.

    • aggregations

      public final Pivot.Builder aggregations​(java.lang.String key, Aggregation value)
      Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.

      API name: aggregations

      Adds an entry to aggregations.

    • aggregations

      public final Pivot.Builder aggregations​(java.lang.String key, java.util.function.Function<Aggregation.Builder,​ObjectBuilder<Aggregation>> fn)
      Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.

      API name: aggregations

      Adds an entry to aggregations using a builder lambda.

    • groupBy

      public final Pivot.Builder groupBy​(java.util.Map<java.lang.String,​PivotGroupBy> map)
      Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.

      API name: group_by

      Adds all entries of map to groupBy.

    • groupBy

      public final Pivot.Builder groupBy​(java.lang.String key, PivotGroupBy value)
      Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.

      API name: group_by

      Adds an entry to groupBy.

    • groupBy

      public final Pivot.Builder groupBy​(java.lang.String key, java.util.function.Function<PivotGroupBy.Builder,​ObjectBuilder<PivotGroupBy>> fn)
      Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.

      API name: group_by

      Adds an entry to groupBy using a builder lambda.

    • build

      public Pivot build()
      Builds a Pivot.
      Specified by:
      build in interface ObjectBuilder<Pivot>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.