Class PercentilesAggregationBuilder
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<VS,AB>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.MetricsAggregationBuilder<ValuesSource,T>
org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder<PercentilesAggregationBuilder>
org.elasticsearch.search.aggregations.metrics.PercentilesAggregationBuilder
- All Implemented Interfaces:
NamedWriteable
,VersionedNamedWriteable
,Writeable
,Rewriteable<AggregationBuilder>
,BaseAggregationBuilder
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
public class PercentilesAggregationBuilder
extends AbstractPercentilesAggregationBuilder<PercentilesAggregationBuilder>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,
AB extends ValuesSourceAggregationBuilder<AB>>, ValuesSourceAggregationBuilder.MetricsAggregationBuilder<VS extends ValuesSource, AB extends ValuesSourceAggregationBuilder<AB>>, ValuesSourceAggregationBuilder.SingleMetricAggregationBuilder<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.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.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 TypeFieldDescriptionstatic final String
static final org.elasticsearch.xcontent.ConstructingObjectParser<PercentilesAggregationBuilder,
String> Fields inherited from class org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder
keyed, KEYED_FIELD, values
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.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ModifierConstructorDescriptionPercentilesAggregationBuilder
(String name, double[] values, PercentilesConfig percentilesConfig) protected
PercentilesAggregationBuilder
(PercentilesAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected ValuesSourceType
Aggregations should use this method to define aValuesSourceType
of last resort.protected ValuesSourceRegistry.RegistryKey<?>
getType()
The name of the type of aggregation built by this builder.protected ValuesSourceAggregatorFactory
innerBuild
(AggregationContext context, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) double[]
Get the values to compute percentiles from.percentiles
(double... percents) Set the values to compute percentiles from.static void
protected AggregationBuilder
shallowCopy
(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) Create a shallow copy of this builder and replacingAggregationBuilder.factoriesBuilder
andmetadata
.Methods inherited from class org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder
compression, compression, createParser, doXContentBody, equals, hashCode, innerWriteTo, keyed, keyed, method, method, metricNames, numberOfSignificantValueDigits, numberOfSignificantValueDigits, percentilesConfig, percentilesConfig
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.LeafOnly
bucketCardinality, subAggregations
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
declareFields, declareFields, doBuild, doWriteTo, field, field, format, format, 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, getMinimalSupportedVersion, getName, getOutputFieldNames, getPipelineAggregations, getSubAggregations, isInSortOrderExecutionRequired, rewrite, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
NAME
- See Also:
-
REGISTRY_KEY
-
PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<PercentilesAggregationBuilder,String> PARSER
-
-
Constructor Details
-
PercentilesAggregationBuilder
- Throws:
IOException
-
PercentilesAggregationBuilder
-
PercentilesAggregationBuilder
public PercentilesAggregationBuilder(String name, double[] values, PercentilesConfig percentilesConfig) -
PercentilesAggregationBuilder
protected PercentilesAggregationBuilder(PercentilesAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata)
-
-
Method Details
-
registerAggregators
-
shallowCopy
protected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) Description copied from class:AggregationBuilder
Create a shallow copy of this builder and replacingAggregationBuilder.factoriesBuilder
andmetadata
. Used byAggregationBuilder.rewrite(QueryRewriteContext)
.- Specified by:
shallowCopy
in classAggregationBuilder
-
defaultValueSourceType
Description copied from class:ValuesSourceAggregationBuilder
Aggregations should use this method to define aValuesSourceType
of last resort. This will only be used when the resolver can't find a field and the user hasn't provided a value type hint.- Specified by:
defaultValueSourceType
in classValuesSourceAggregationBuilder<PercentilesAggregationBuilder>
- Returns:
- The CoreValuesSourceType we expect this script to yield.
-
percentiles
Set the values to compute percentiles from. -
percentiles
public double[] percentiles()Get the values to compute percentiles from. -
innerBuild
protected ValuesSourceAggregatorFactory innerBuild(AggregationContext context, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException - Specified by:
innerBuild
in classValuesSourceAggregationBuilder<PercentilesAggregationBuilder>
- Throws:
IOException
-
getType
Description copied from interface:BaseAggregationBuilder
The name of the type of aggregation built by this builder. -
getRegistryKey
- Specified by:
getRegistryKey
in classValuesSourceAggregationBuilder<PercentilesAggregationBuilder>
-