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.CommonFields
Nested 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.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
static org.elasticsearch.common.xcontent.ParseField
protected double[]
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
config
Fields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metadata
Fields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
DEFAULT_PREALLOCATION, factoriesBuilder, name
Fields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Deprecated.compression(double compression)
Deprecated.static <T extends AbstractPercentilesAggregationBuilder<T>>
org.elasticsearch.common.xcontent.ConstructingObjectParser<T,String>createParser(String aggName, TriFunction<String,double[],PercentilesConfig,T> ctor, Supplier<PercentilesConfig> defaultConfig, org.elasticsearch.common.xcontent.ParseField valuesField)
protected org.elasticsearch.common.xcontent.XContentBuilder
doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
boolean
int
hashCode()
protected void
innerWriteTo(StreamOutput out)
Write subclass's state to the stream.boolean
keyed()
Get whether the XContent response should be keyedkeyed(boolean keyed)
Set whether the XContent response should be keyedmethod()
Deprecated.method(PercentilesMethod method)
Deprecated.int
Deprecated.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 configuredMethods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.LeafOnly
bucketCardinality, subAggregations
Methods 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, userValueTypeHint
Methods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
build, getMetadata, getWriteableName, setMetadata, subAggregation, subAggregation, toXContent, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
buildPipelineTree, bytesToPreallocate, doRewrite, getName, getOutputFieldNames, getPipelineAggregations, getSubAggregations, rewrite, shallowCopy, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getType
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
KEYED_FIELD
public static final org.elasticsearch.common.xcontent.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,String> createParser(String aggName, TriFunction<String,double[],PercentilesConfig,T> ctor, Supplier<PercentilesConfig> defaultConfig, org.elasticsearch.common.xcontent.ParseField valuesField) -
innerWriteTo
Description copied from class:ValuesSourceAggregationBuilder
Write subclass's state to the stream.- Specified by:
innerWriteTo
in classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
- Throws:
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.Hdr
instead 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 thePercentilesConfig
returned 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.TDigest
instead 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 thePercentilesConfig
returned frompercentilesConfig()
instead -
method
Deprecated.Deprecated: set method by configuring aPercentilesConfig
instead and set viapercentilesConfig(PercentilesConfig)
-
method
Deprecated.Deprecated: get method by inspecting thePercentilesConfig
returned 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 IOException- Specified by:
doXContentBody
in classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
- Throws:
IOException
-
equals
- Overrides:
equals
in classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classValuesSourceAggregationBuilder<T extends AbstractPercentilesAggregationBuilder<T>>
-