Class AbstractPercentilesAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilder
org.elasticsearch.search.aggregations.AbstractAggregationBuilder<AB>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder<AB>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.LeafOnly<ValuesSource,T>
org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder<T>
- All Implemented Interfaces:
NamedWriteable,Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment,Rewriteable<AggregationBuilder>,BaseAggregationBuilder
- Direct Known Subclasses:
PercentileRanksAggregationBuilder,PercentilesAggregationBuilder
public abstract class AbstractPercentilesAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>> extends ValuesSourceAggregationBuilder.LeafOnly<ValuesSource,T>
This provides a base class for aggregations that are building percentiles or percentiles-like functionality (e.g. percentile ranks).
It provides a set of common fields/functionality for setting the available algorithms (TDigest and HDRHistogram),
as well as algorithm-specific settings via a
PercentilesConfig object-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<AB>>Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
AggregationBuilder.BucketCardinality, AggregationBuilder.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description protected booleankeyedstatic org.elasticsearch.common.ParseFieldKEYED_FIELDprotected double[]valuesFields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
configFields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metadataFields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
factoriesBuilder, name -
Method Summary
Modifier and Type Method Description doublecompression()Deprecated.Tcompression(double compression)Deprecated.static <T extends AbstractPercentilesAggregationBuilder<T>>
org.elasticsearch.common.xcontent.ConstructingObjectParser<T,java.lang.String>createParser(java.lang.String aggName, TriFunction<java.lang.String,double[],PercentilesConfig,T> ctor, java.util.function.Supplier<PercentilesConfig> defaultConfig, org.elasticsearch.common.ParseField valuesField)protected org.elasticsearch.common.xcontent.XContentBuilderdoXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)booleanequals(java.lang.Object obj)inthashCode()protected voidinnerWriteTo(StreamOutput out)Write subclass's state to the stream.booleankeyed()Get whether the XContent response should be keyedTkeyed(boolean keyed)Set whether the XContent response should be keyedPercentilesMethodmethod()Deprecated.Tmethod(PercentilesMethod method)Deprecated.intnumberOfSignificantValueDigits()Deprecated.TnumberOfSignificantValueDigits(int numberOfSignificantValueDigits)Deprecated.PercentilesConfigpercentilesConfig()Returns how the percentiles algorithm has been configured, or null if it has not been configured yetTpercentilesConfig(PercentilesConfig percentilesConfig)Sets how the percentiles algorithm should be configuredMethods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.LeafOnly
bucketCardinality, subAggregationsMethods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
declareFields, declareFields, defaultValueSourceType, doBuild, doWriteTo, field, field, format, format, getRegistryKey, innerBuild, internalXContent, missing, missing, resolveConfig, script, script, serializeTargetValueType, timeZone, timeZone, userValueTypeHint, userValueTypeHintMethods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
build, getMetadata, getWriteableName, setMetadata, subAggregation, subAggregation, toXContent, writeToMethods inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
buildPipelineTree, doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, shallowCopy, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getType
-
Field Details
-
KEYED_FIELD
public static final org.elasticsearch.common.ParseField KEYED_FIELD -
keyed
protected boolean keyed -
values
protected double[] values
-
-
Method Details
-
createParser
public static <T extends AbstractPercentilesAggregationBuilder<T>> org.elasticsearch.common.xcontent.ConstructingObjectParser<T,java.lang.String> createParser(java.lang.String aggName, TriFunction<java.lang.String,double[],PercentilesConfig,T> ctor, java.util.function.Supplier<PercentilesConfig> defaultConfig, org.elasticsearch.common.ParseField valuesField) -
innerWriteTo
Description copied from class:ValuesSourceAggregationBuilderWrite subclass's state to the stream.- Specified by:
innerWriteToin classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>- Throws:
java.io.IOException
-
keyed
Set whether the XContent response should be keyed -
keyed
public boolean keyed()Get whether the XContent response should be keyed -
numberOfSignificantValueDigits
Deprecated.Expert: set the number of significant digits in the values. Only relevant when usingPercentilesMethod.HDR. Deprecated: set numberOfSignificantValueDigits by configuring aPercentilesConfig.Hdrinstead and set viapercentilesConfig(PercentilesConfig) -
numberOfSignificantValueDigits
@Deprecated public int numberOfSignificantValueDigits()Deprecated.Expert: get the number of significant digits in the values. Only relevant when usingPercentilesMethod.HDR. Deprecated: get numberOfSignificantValueDigits by inspecting thePercentilesConfigreturned frompercentilesConfig()instead -
compression
Deprecated.Expert: set the compression. Higher values improve accuracy but also memory usage. Only relevant when usingPercentilesMethod.TDIGEST. Deprecated: set compression by configuring aPercentilesConfig.TDigestinstead and set viapercentilesConfig(PercentilesConfig) -
compression
@Deprecated public double compression()Deprecated.Expert: get the compression. Higher values improve accuracy but also memory usage. Only relevant when usingPercentilesMethod.TDIGEST. Deprecated: get compression by inspecting thePercentilesConfigreturned frompercentilesConfig()instead -
method
Deprecated.Deprecated: set method by configuring aPercentilesConfiginstead and set viapercentilesConfig(PercentilesConfig) -
method
Deprecated.Deprecated: get method by inspecting thePercentilesConfigreturned frompercentilesConfig()instead -
percentilesConfig
Returns how the percentiles algorithm has been configured, or null if it has not been configured yet -
percentilesConfig
Sets how the percentiles algorithm should be configured -
doXContentBody
protected org.elasticsearch.common.xcontent.XContentBuilder doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
doXContentBodyin classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-
hashCode
public int hashCode()- Overrides:
hashCodein classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-