Class BucketKsAggregation.Builder

All Implemented Interfaces:
WithJson<BucketKsAggregation.Builder>, ObjectBuilder<BucketKsAggregation>
Enclosing class:
BucketKsAggregation

public static class BucketKsAggregation.Builder
extends BucketPathAggregation.AbstractBuilder<BucketKsAggregation.Builder>
implements ObjectBuilder<BucketKsAggregation>
Builder for BucketKsAggregation.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • alternative

      public final BucketKsAggregation.Builder alternative​(java.util.List<java.lang.String> list)
      A list of string values indicating which K-S test alternative to calculate. The valid values are: "greater", "less", "two_sided". This parameter is key for determining the K-S statistic used when calculating the K-S test. Default value is all possible alternative hypotheses.

      API name: alternative

      Adds all elements of list to alternative.

    • alternative

      public final BucketKsAggregation.Builder alternative​(java.lang.String value, java.lang.String... values)
      A list of string values indicating which K-S test alternative to calculate. The valid values are: "greater", "less", "two_sided". This parameter is key for determining the K-S statistic used when calculating the K-S test. Default value is all possible alternative hypotheses.

      API name: alternative

      Adds one or more values to alternative.

    • fractions

      public final BucketKsAggregation.Builder fractions​(java.util.List<java.lang.Double> list)
      A list of doubles indicating the distribution of the samples with which to compare to the buckets_path results. In typical usage this is the overall proportion of documents in each bucket, which is compared with the actual document proportions in each bucket from the sibling aggregation counts. The default is to assume that overall documents are uniformly distributed on these buckets, which they would be if one used equal percentiles of a metric to define the bucket end points.

      API name: fractions

      Adds all elements of list to fractions.

    • fractions

      public final BucketKsAggregation.Builder fractions​(java.lang.Double value, java.lang.Double... values)
      A list of doubles indicating the distribution of the samples with which to compare to the buckets_path results. In typical usage this is the overall proportion of documents in each bucket, which is compared with the actual document proportions in each bucket from the sibling aggregation counts. The default is to assume that overall documents are uniformly distributed on these buckets, which they would be if one used equal percentiles of a metric to define the bucket end points.

      API name: fractions

      Adds one or more values to fractions.

    • samplingMethod

      public final BucketKsAggregation.Builder samplingMethod​(@Nullable java.lang.String value)
      Indicates the sampling methodology when calculating the K-S test. Note, this is sampling of the returned values. This determines the cumulative distribution function (CDF) points used comparing the two samples. Default is upper_tail, which emphasizes the upper end of the CDF points. Valid options are: upper_tail, uniform, and lower_tail.

      API name: sampling_method

    • self

      protected BucketKsAggregation.Builder self()
      Specified by:
      self in class AggregationBase.AbstractBuilder<BucketKsAggregation.Builder>
    • build

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