Module org.elasticsearch.server
Class AbstractPercentilesAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilder
org.elasticsearch.search.aggregations.AbstractAggregationBuilder<T>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder<T>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.LeafOnly<T>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.MetricsAggregationBuilder<T>
org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder<T>
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,Rewriteable<AggregationBuilder>,BaseAggregationBuilder,ToXContent,ToXContentFragment
- Direct Known Subclasses:
PercentileRanksAggregationBuilder,PercentilesAggregationBuilder
public abstract class AbstractPercentilesAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
extends ValuesSourceAggregationBuilder.MetricsAggregationBuilder<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<AB extends ValuesSourceAggregationBuilder<AB>>, ValuesSourceAggregationBuilder.MetricsAggregationBuilder<AB extends ValuesSourceAggregationBuilder<AB>>, ValuesSourceAggregationBuilder.SingleMetricAggregationBuilder<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.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metadataFields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
DEFAULT_PREALLOCATION, factoriesBuilder, nameFields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptiondoubleDeprecated.compression(double compression) Deprecated.static <T extends AbstractPercentilesAggregationBuilder<T>>
ConstructingObjectParser<T, String> createParser(String aggName, TriFunction<String, double[], PercentilesConfig, T> ctor, Supplier<PercentilesConfig> defaultConfig, ParseField valuesField) protected XContentBuilderdoXContentBody(XContentBuilder builder, ToXContent.Params params) booleaninthashCode()protected voidinnerWriteTo(StreamOutput out) Write subclass's state to the stream.keyed(boolean keyed) Set whether the XContent response should be keyedmethod()Deprecated.method(PercentilesMethod method) Deprecated.Generated metrics from this aggregation that can be accessed viaInternalAggregation.getProperty(String)intDeprecated.numberOfSignificantValueDigits(int numberOfSignificantValueDigits) Deprecated.Returns how the percentiles algorithm has been configured, or null if it has not been configured yetpercentilesConfig(PercentilesConfig percentilesConfig) Sets how the percentiles algorithm should be configuredbooleanDoes this aggregation support running with in a sampling context.Methods 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, innerBuild, internalXContent, 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, bytesToPreallocate, deepCopy, doRewrite, getName, getOutputFieldNames, getPipelineAggregations, getQuery, getSubAggregations, isInSortOrderExecutionRequired, rewrite, shallowCopy, supportsParallelCollection, toString, validateSequentiallyOrdered, validateSequentiallyOrderedWithoutGapsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getTypeMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragmentMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
getMinimalSupportedVersion, supportsVersion
-
Field Details
-
KEYED_FIELD
-
keyed
protected boolean keyed -
values
protected double[] values
-
-
Method Details
-
createParser
public static <T extends AbstractPercentilesAggregationBuilder<T>> ConstructingObjectParser<T,String> createParser(String aggName, TriFunction<String, double[], PercentilesConfig, T> ctor, Supplier<PercentilesConfig> defaultConfig, ParseField valuesField) -
supportsSampling
public boolean supportsSampling()Description copied from class:AggregationBuilderDoes this aggregation support running with in a sampling context. By default, it's false for all aggregations. If the sub-classed builder supports sampling, be sure of the following that the resulting internal aggregation objects override theInternalAggregation.finalizeSampling(SamplingContext)and scales any values that require scaling.- Overrides:
supportsSamplingin classAggregationBuilder- Returns:
- does this aggregation builder support sampling
-
innerWriteTo
Description copied from class:ValuesSourceAggregationBuilderWrite subclass's state to the stream.- Specified by:
innerWriteToin classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>- Throws:
IOException
-
keyed
Set 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.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.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 XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>- Throws:
IOException
-
equals
- Overrides:
equalsin classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-
hashCode
public int hashCode()- Overrides:
hashCodein classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-
metricNames
Description copied from class:ValuesSourceAggregationBuilder.MetricsAggregationBuilderGenerated metrics from this aggregation that can be accessed viaInternalAggregation.getProperty(String)- Specified by:
metricNamesin classValuesSourceAggregationBuilder.MetricsAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-