Aggregation
map string to Aggregation
This type represents a dictionary mapping string keys to Aggregation values.
Properties
-
aggregationsmap string to Aggregation -
Sub-aggregations for this aggregation. Only applies to bucket aggregations.
-
adjacency_matrixobject -
A bucket aggregation returning a form of adjacency matrix. The request provides a collection of named filter expressions, similar to the
filtersaggregation. Each bucket in the response represents a non-empty cell in the matrix of intersecting filters. -
filtersmap string to Query -
Filters used to create buckets. At least one filter is required.
-
auto_date_histogramobject -
A multi-bucket aggregation similar to the date histogram, except instead of providing an interval to use as the width of each bucket, a target number of buckets is provided.
-
formatstring -
The date format used to format
key_as_stringin the response. If noformatis specified, the first date format specified in the field mapping is used. -
minimum_interval -
The minimum rounding interval. This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than
minimum_interval. -
Values:
secondminutehourdaymonthyear -
avgobject -
A single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents.
-
avg_bucketobject -
A sibling pipeline aggregation which calculates the mean value of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
boxplotobject -
A metrics aggregation that computes a box plot of numeric values extracted from the aggregated documents.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
compressionnumber -
Limits the maximum number of nodes used by the underlying TDigest algorithm to
20 * compression, enabling control of memory usage and approximation error. -
execution_hint· default: default -
The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases). To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
-
Values:
defaulthigh_accuracy -
bucket_scriptobject -
A parent pipeline aggregation which runs a script which can perform per bucket computations on metrics in the parent multi-bucket aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
bucket_selectorobject -
A parent pipeline aggregation which runs a script to determine whether the current bucket will be retained in the parent multi-bucket aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
bucket_sortobject -
A parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation.
-
gap_policy· default: skip -
The policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
bucket_count_ks_testobject -
A sibling pipeline aggregation which runs a two sample Kolmogorov–Smirnov test ("K-S test") against a provided distribution and the distribution implied by the documents counts in the configured sibling aggregation.
-
alternativestring -
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.
-
fractionsnumber -
A list of doubles indicating the distribution of the samples with which to compare to the
buckets_pathresults. 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. -
sampling_methodstring -
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, andlower_tail. -
bucket_correlationobject -
A sibling pipeline aggregation which runs a correlation function on the configured sibling multi-bucket aggregation.
-
functionobjectrequired -
The correlation function to execute.
-
count_correlationobjectrequired -
The configuration to calculate a count correlation. This function is designed for determining the correlation of a term value and a given metric.
-
indicatorobjectrequired -
The indicator with which to correlate the configured
bucket_pathvalues. -
cardinalityobject -
A single-value metrics aggregation that calculates an approximate count of distinct values.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
precision_thresholdnumber · default: 3000 -
A unique count below which counts are expected to be close to accurate. This allows to trade memory for accuracy.
-
execution_hint -
Mechanism by which cardinality aggregations is run.
Supported values include:
global_ordinals: Run the aggregation by using global ordinals of the field and resolving those values after finishing a shard.segment_ordinals: Run the aggregation by using segment ordinal values and resolving those values after each segment.direct: Run the aggregation by using field values directly.save_memory_heuristic: Heuristic-based mode, default in Elasticsearch 8.3 and earlier.save_time_heuristic: Heuristic-based mode, default in Elasticsearch 8.4 and later.
-
Values:
global_ordinalssegment_ordinalsdirectsave_memory_heuristicsave_time_heuristic -
cartesian_boundsobject -
A metric aggregation that computes the spatial bounding box containing all values for a Point or Shape field.
-
cartesian_centroidobject -
A metric aggregation that computes the weighted centroid from all coordinate values for point and shape fields.
-
categorize_textobject -
A multi-bucket aggregation that groups semi-structured text into buckets.
-
max_unique_tokensnumber · default: 50 -
The maximum number of unique tokens at any position up to max_matched_tokens. Must be larger than 1. Smaller values use less memory and create fewer categories. Larger values will use more memory and create narrower categories. Max allowed value is 100.
-
max_matched_tokensnumber · default: 5 -
The maximum number of token positions to match on before attempting to merge categories. Larger values will use more memory and create narrower categories. Max allowed value is 100.
-
similarity_thresholdnumber · default: 50 -
The minimum percentage of tokens that must match for text to be added to the category bucket. Must be between 1 and 100. The larger the value the narrower the categories. Larger values will increase memory usage and create narrower categories.
-
categorization_filtersstring -
This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time as categorization_analyzer. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use the categorization_analyzer property instead and include the filters as pattern_replace character filters.
-
categorization_analyzeroneOf -
The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. The syntax is very similar to that used to define the analyzer in the
_analyzeendpoint. This property cannot be used at the same time as categorization_filters. -
change_pointobject -
A sibling pipeline that detects, spikes, dips, and change points in a metric. Given a distribution of values provided by the sibling multi-bucket aggregation, this aggregation indicates the bucket of any spike or dip and/or the bucket at which the largest change in the distribution of values, if they are statistically significant. There must be at least 22 bucketed values. Fewer than 1,000 is preferred.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
childrenobject -
A single bucket aggregation that selects child documents that have the specified type, as defined in a
joinfield. -
compositeobject -
A multi-bucket aggregation that creates composite buckets from different sources. Unlike the other multi-bucket aggregations, you can use the
compositeaggregation to paginate all buckets from a multi-level aggregation efficiently. -
cumulative_cardinalityobject -
A parent pipeline aggregation which calculates the cumulative cardinality in a parent
histogramordate_histogramaggregation. -
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
cumulative_sumobject -
A parent pipeline aggregation which calculates the cumulative sum of a specified metric in a parent
histogramordate_histogramaggregation. -
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
date_histogramobject -
A multi-bucket values source based aggregation that can be applied on date values or date range values extracted from the documents. It dynamically builds fixed size (interval) buckets over the values.
-
calendar_interval -
Calendar-aware interval. Can be specified using the unit name, such as
month, or as a single unit quantity, such as1M. -
Values:
second1sminute1mhour1hday1dweek1wmonth1Mquarter1qyear1y -
fixed_intervaloneOf -
Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar.
-
Values:
-10 -
formatstring -
The date format used to format
key_as_stringin the response. If noformatis specified, the first date format specified in the field mapping is used. -
min_doc_countnumber -
Only returns buckets that have
min_doc_countnumber of documents. By default, all buckets between the first bucket that matches documents and the last one are returned. -
missingoneOf -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
offsetoneOf -
Changes the start value of each bucket by the specified positive (
+) or negative offset (-) duration. -
Values:
-10 -
date_rangeobject -
A multi-bucket value source based aggregation that enables the user to define a set of date ranges - each representing a bucket.
-
derivativeobject -
A parent pipeline aggregation which calculates the derivative of a specified metric in a parent
histogramordate_histogramaggregation. -
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
diversified_samplerobject -
A filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents. Similar to the
sampleraggregation, but adds the ability to limit the number of matches that share a common value. -
execution_hint· default: global_ordinals -
The type of value used for de-duplication.
Supported values include:
map: Hold field values directly.global_ordinals: Hold ordinals of the field as determined by the Lucene index.bytes_hash: Hold hashes of the field values - with potential for hash collisions.
-
Values:
mapglobal_ordinalsbytes_hash -
max_docs_per_valuenumber · default: 1 -
Limits how many documents are permitted per choice of de-duplicating value.
-
extended_statsobject -
A multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.
-
extended_stats_bucketobject -
A sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
frequent_item_setsobject -
A bucket aggregation which finds frequent item sets, a form of association rules mining that identifies items that often occur together.
-
filterQuery -
Query that filters documents from analysis.
-
filterQuery -
A single bucket aggregation that narrows the set of documents to those that match a query.
-
filtersobject -
A multi-bucket aggregation where each bucket contains the documents that match a query.
-
geo_boundsobject -
A metric aggregation that computes the geographic bounding box containing all values for a Geopoint or Geoshape field.
-
geo_centroidobject -
A metric aggregation that computes the weighted centroid from all coordinate values for geo fields.
-
geo_distanceobject -
A multi-bucket aggregation that works on
geo_pointfields. Evaluates the distance of each document value from an origin point and determines the buckets it belongs to, based on ranges defined in the request. -
geohash_gridobject -
A multi-bucket aggregation that groups
geo_pointandgeo_shapevalues into buckets that represent a grid. Each cell is labeled using a geohash which is of user-definable precision. -
geo_lineobject -
Aggregates all
geo_pointvalues within a bucket into aLineStringordered by the chosen sort field. -
sortobject -
The name of the numeric field to use as the sort key for ordering the points. When the
geo_lineaggregation is nested inside atime_seriesaggregation, this field defaults to@timestamp, and any other value will result in error. -
include_sortboolean -
When
true, returns an additional array of the sort values in the feature properties. -
geotile_gridobject -
A multi-bucket aggregation that groups
geo_pointandgeo_shapevalues into buckets that represent a grid. Each cell corresponds to a map tile as used by many online map sites. -
geohex_gridobject -
A multi-bucket aggregation that groups
geo_pointandgeo_shapevalues into buckets that represent a grid. Each cell corresponds to a H3 cell index and is labeled using the H3Index representation. -
globalobject -
Defines a single bucket of all the documents within the search execution context. This context is defined by the indices and the document types you’re searching on, but is not influenced by the search query itself.
-
histogramobject -
A multi-bucket values source based aggregation that can be applied on numeric values or numeric range values extracted from the documents. It dynamically builds fixed size (interval) buckets over the values.
-
hard_boundsobject -
Limits the range of buckets in the histogram. It is particularly useful in the case of open data ranges that can result in a very large number of buckets.
-
min_doc_countnumber -
Only returns buckets that have
min_doc_countnumber of documents. By default, the response will fill gaps in the histogram with empty buckets. -
missingnumber -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
offsetnumber -
By default, the bucket keys start with 0 and then continue in even spaced steps of
interval. The bucket boundaries can be shifted by using theoffsetoption. -
ip_rangeobject -
A multi-bucket value source based aggregation that enables the user to define a set of IP ranges - each representing a bucket.
-
ip_prefixobject -
A bucket aggregation that groups documents based on the network or sub-network of an IP address.
-
inferenceobject -
A parent pipeline aggregation which loads a pre-trained model and performs inference on the collated result fields from the parent bucket aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
inference_configobject -
Contains the inference type and its options.
-
classificationobject -
Classification configuration for inference.
-
num_top_feature_importance_valuesnumber · default: 0 -
Specifies the maximum number of feature importance values per document.
-
prediction_field_typestring -
Specifies the type of the predicted field to write. Acceptable values are: string, number, boolean. When boolean is provided 1.0 is transformed to true and 0.0 to false.
-
lineobject -
sortobject -
The name of the numeric field to use as the sort key for ordering the points. When the
geo_lineaggregation is nested inside atime_seriesaggregation, this field defaults to@timestamp, and any other value will result in error. -
include_sortboolean -
When
true, returns an additional array of the sort values in the feature properties. -
matrix_statsobject -
A numeric aggregation that computes the following statistics over a set of document fields:
count,mean,variance,skewness,kurtosis,covariance, andcovariance. -
maxobject -
A single-value metrics aggregation that returns the maximum value among the numeric values extracted from the aggregated documents.
-
max_bucketobject -
A sibling pipeline aggregation which identifies the bucket(s) with the maximum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s).
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
median_absolute_deviationobject -
A single-value aggregation that approximates the median absolute deviation of its search results.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
compressionnumber · default: 1000 -
Limits the maximum number of nodes used by the underlying TDigest algorithm to
20 * compression, enabling control of memory usage and approximation error. -
execution_hint· default: default -
The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases). To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
-
Values:
defaulthigh_accuracy -
minobject -
A single-value metrics aggregation that returns the minimum value among numeric values extracted from the aggregated documents.
-
min_bucketobject -
A sibling pipeline aggregation which identifies the bucket(s) with the minimum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s).
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
missingobject -
A field data based single bucket aggregation, that creates a bucket of all documents in the current document set context that are missing a field value (effectively, missing a field or having the configured NULL value set).
-
moving_percentilesobject -
Given an ordered series of percentiles, "slides" a window across those percentiles and computes cumulative percentiles.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
moving_fnobject -
Given an ordered series of data, "slides" a window across the data and runs a custom script on each window of data. For convenience, a number of common functions are predefined such as
min,max, and moving averages. -
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
multi_termsobject -
A multi-bucket value source based aggregation where buckets are dynamically built - one per unique set of values.
-
collect_mode· default: breadth_first -
Specifies the strategy for data collection.
Supported values include:
depth_first: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.breadth_first: Caches the set of documents that fall into the uppermost buckets for subsequent replay.
-
Values:
depth_firstbreadth_first -
orderoneOf -
Specifies the sort order of the buckets. Defaults to sorting by descending document count.
-
min_doc_countnumber · default: 1 -
The minimum number of documents in a bucket for it to be returned.
-
shard_min_doc_countnumber · default: 1 -
The minimum number of documents in a bucket on each shard for it to be returned.
-
shard_sizenumber -
The number of candidate terms produced by each shard. By default,
shard_sizewill be automatically estimated based on the number of shards and thesizeparameter. -
show_term_doc_count_errorboolean · default: false -
Calculates the doc count error on per term basis.
-
sizenumber · default: 10 -
The number of term buckets should be returned out of the overall terms list.
-
normalizeobject -
A parent pipeline aggregation which calculates the specific normalized/rescaled value for a specific bucket value.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
method -
The specific method to apply.
Supported values include:
rescale_0_1: This method rescales the data such that the minimum number is 0, and the maximum number is 1, with the rest normalized linearly in-between.rescale_0_100: This method rescales the data such that the minimum number is 0, and the maximum number is 100, with the rest normalized linearly in-between.percent_of_sum: This method normalizes each value so that it represents a percentage of the total sum it attributes to.mean: This method normalizes such that each value is normalized by how much it differs from the average.z-score: This method normalizes such that each value represents how far it is from the mean relative to the standard deviation.softmax: This method normalizes such that each value is exponentiated and relative to the sum of the exponents of the original values.
-
Values:
rescale_0_1rescale_0_100percent_of_summeanz-scoresoftmax -
parentobject -
A special single bucket aggregation that selects parent documents that have the specified type, as defined in a
joinfield. -
percentile_ranksobject -
A multi-value metrics aggregation that calculates one or more percentile ranks over numeric values extracted from the aggregated documents.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
keyedboolean · default: true -
By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array. Set to
falseto disable this behavior. -
hdrobject -
Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks.
-
tdigestobject -
Sets parameters for the default TDigest algorithm used to calculate percentile ranks.
-
compressionnumber -
Limits the maximum number of nodes used by the underlying TDigest algorithm to
20 * compression, enabling control of memory usage and approximation error. -
execution_hint· default: default -
The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases). To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
-
Values:
defaulthigh_accuracy -
percentilesobject -
A multi-value metrics aggregation that calculates one or more percentiles over numeric values extracted from the aggregated documents.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
keyedboolean · default: true -
By default, the aggregation associates a unique string key with each bucket and returns the ranges as a hash rather than an array. Set to
falseto disable this behavior. -
tdigestobject -
Sets parameters for the default TDigest algorithm used to calculate percentiles.
-
compressionnumber -
Limits the maximum number of nodes used by the underlying TDigest algorithm to
20 * compression, enabling control of memory usage and approximation error. -
execution_hint· default: default -
The default implementation of TDigest is optimized for performance, scaling to millions or even billions of sample values while maintaining acceptable accuracy levels (close to 1% relative error for millions of samples in some cases). To use an implementation optimized for accuracy, set this parameter to high_accuracy instead.
-
Values:
defaulthigh_accuracy -
percentiles_bucketobject -
A sibling pipeline aggregation which calculates percentiles across all bucket of a specified metric in a sibling aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
rangeobject -
A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket.
-
rare_termsobject -
A multi-bucket value source based aggregation which finds "rare" terms — terms that are at the long-tail of the distribution and are not frequent.
-
rateobject -
Calculates a rate of documents or a field in each bucket. Can only be used inside a
date_histogramorcompositeaggregation. -
reverse_nestedobject -
A special single bucket aggregation that enables aggregating on parent documents from nested documents. Should only be defined inside a
nestedaggregation. -
random_samplerobject -
A single bucket aggregation that randomly includes documents in the aggregated results. Sampling provides significant speed improvement at the cost of accuracy.
-
samplerobject -
A filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents.
-
scripted_metricobject -
A metric aggregation that uses scripts to provide a metric output.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
combine_scriptstring -
Runs once on each shard after document collection is complete. Allows the aggregation to consolidate the state returned from each shard.
-
init_scriptstring -
Runs prior to any collection of documents. Allows the aggregation to set up any initial state.
-
map_scriptstring -
Run once per document collected. If no
combine_scriptis specified, the resulting state needs to be stored in thestateobject. -
serial_diffobject -
An aggregation that subtracts values in a time series from themselves at different time lags or periods.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
significant_termsobject -
Returns interesting or unusual occurrences of terms in a set.
-
background_filterQuery -
A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.
-
chi_squareobject -
Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score.
-
execution_hint -
Mechanism by which the aggregation should be executed: using field values directly or using global ordinals.
-
Values:
mapglobal_ordinalsglobal_ordinals_hashglobal_ordinals_low_cardinality -
gndobject -
Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score.
-
mutual_informationobject -
Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score.
-
percentageobject -
A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.
-
p_valueobject -
Significant terms heuristic that calculates the p-value between the term existing in foreground and background sets.
The p-value is the probability of obtaining test results at least as extreme as the results actually observed, under the assumption that the null hypothesis is correct. The p-value is calculated assuming that the foreground set and the background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, with the null hypothesis that the probabilities are the same.
-
shard_min_doc_countnumber -
Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the
min_doc_count. Terms will only be considered if their local shard frequency within the set is higher than theshard_min_doc_count. -
significant_textobject -
Returns interesting or unusual occurrences of free-text terms in a set.
-
background_filterQuery -
A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.
-
chi_squareobject -
Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score.
-
execution_hint -
Determines whether the aggregation will use field values directly or global ordinals.
-
Values:
mapglobal_ordinalsglobal_ordinals_hashglobal_ordinals_low_cardinality -
gndobject -
Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score.
-
min_doc_countnumber · default: 3 -
Only return values that are found in more than
min_doc_counthits. -
mutual_informationobject -
Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score.
-
percentageobject -
A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.
-
shard_min_doc_countnumber -
Regulates the certainty a shard has if the values should actually be added to the candidate list or not with respect to the min_doc_count. Values will only be considered if their local shard frequency within the set is higher than the
shard_min_doc_count. -
statsobject -
A multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.
-
stats_bucketobject -
A sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
string_statsobject -
A multi-value metrics aggregation that computes statistics over string values extracted from the aggregated documents.
-
sumobject -
A single-value metrics aggregation that sums numeric values that are extracted from the aggregated documents.
-
sum_bucketobject -
A sibling pipeline aggregation which calculates the sum of a specified metric across all buckets in a sibling aggregation.
-
formatstring -
DecimalFormatpattern for the output value. If specified, the formatted value is returned in the aggregation’svalue_as_stringproperty. -
gap_policy· default: skip -
Policy to apply when gaps are found in the data.
Supported values include:
skip: Treats missing data as if the bucket does not exist. It will skip the bucket and continue calculating using the next available value.insert_zeros: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.keep_values: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used, otherwise the empty bucket is skipped.
-
Values:
skipinsert_zeroskeep_values -
termsobject -
A multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.
-
collect_mode -
Determines how child aggregations should be calculated: breadth-first or depth-first.
Supported values include:
depth_first: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.breadth_first: Caches the set of documents that fall into the uppermost buckets for subsequent replay.
-
Values:
depth_firstbreadth_first -
execution_hint -
Determines whether the aggregation will use field values directly or global ordinals.
-
Values:
mapglobal_ordinalsglobal_ordinals_hashglobal_ordinals_low_cardinality -
min_doc_countnumber · default: 1 -
Only return values that are found in more than
min_doc_counthits. -
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
orderoneOf -
Specifies the sort order of the buckets. Defaults to sorting by descending document count.
-
shard_min_doc_countnumber -
Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to the
min_doc_count. Terms will only be considered if their local shard frequency within the set is higher than theshard_min_doc_count. -
shard_sizenumber -
The number of candidate terms produced by each shard. By default,
shard_sizewill be automatically estimated based on the number of shards and thesizeparameter. -
time_seriesobject -
The time series aggregation queries data created using a time series index. This is typically data such as metrics or other data streams with a time component, and requires creating an index using the time series mode.
-
top_hitsobject -
A metric aggregation that returns the top matching documents per bucket.
-
missingboolean | number | string -
The value to apply to documents that do not have a value. By default, documents without a value are ignored.
-
explainboolean · default: false -
If
true, returns detailed information about score computation as part of a hit. -
fieldsobject -
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.
-
highlightobject -
Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results.
-
typeanyOf -
Supported values include:
plain: Theplainhighlighter uses the standard Lucene highlighterfvh: The fvh highlighter uses the Lucene Fast Vector highlighter.unified: The unified highlighter uses the Lucene Unified Highlighter.
-
Values:
plainfvhunified -
boundary_scanner -
Specifies how to break the highlighted fragments: chars, sentence, or word. Only valid for the unified and fvh highlighters. Defaults to
sentencefor theunifiedhighlighter. Defaults tocharsfor thefvhhighlighter.Supported values include:
chars: Use the characters specified byboundary_charsas highlighting boundaries. Theboundary_max_scansetting controls how far to scan for boundary characters. Only valid for thefvhhighlighter.sentence: Break highlighted fragments at the next sentence boundary, as determined by Java’sBreakIterator. You can specify the locale to use withboundary_scanner_locale. When used with theunifiedhighlighter, thesentencescanner splits sentences bigger thanfragment_sizeat the first word boundary next to fragment_size. You can setfragment_sizeto0to never split any sentence.word: Break highlighted fragments at the next word boundary, as determined by Java’sBreakIterator. You can specify the locale to use withboundary_scanner_locale.
-
Values:
charssentenceword -
boundary_scanner_localestring · default: Locale.ROOT -
Controls which locale is used to search for sentence and word boundaries. This parameter takes a form of a language tag, for example:
"en-US","fr-FR","ja-JP". -
fragmenter· default: span -
Specifies how text should be broken up in highlight snippets:
simpleorspan. Only valid for theplainhighlighter. -
Values:
simplespan -
highlight_queryQuery -
Highlight matches for a query other than the search query. This is especially useful if you use a rescore query because those are not taken into account by highlighting by default.
-
max_analyzed_offsetnumber -
If set to a non-negative value, highlighting stops at this defined maximum limit. The rest of the text is not processed, thus not highlighted and no error is returned The
max_analyzed_offsetquery setting does not override theindex.highlight.max_analyzed_offsetsetting, which prevails when it’s set to lower value than the query setting. -
no_match_sizenumber · default: 0 -
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragmentsnumber · default: 5 -
The maximum number of fragments to return. If the number of fragments is set to
0, no fragments are returned. Instead, the entire field contents are highlighted and returned. This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. Ifnumber_of_fragmentsis0,fragment_sizeis ignored. -
order· default: none -
Sorts highlighted fragments by score when set to
score. By default, fragments will be output in the order they appear in the field (order:none). Setting this option toscorewill output the most relevant fragments first. Each highlighter applies its own logic to compute relevancy scores. -
Values:
score -
phrase_limitnumber · default: 256 -
Controls the number of matching phrases in a document that are considered. Prevents the
fvhhighlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields,phrase_limitphrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvhhighlighter. -
Use in conjunction with
pre_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags. -
Use in conjunction with
post_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags. -
require_field_matchboolean · default: true -
By default, only fields that contains a query match are highlighted. Set to
falseto highlight all fields. -
Set to
styledto use the built-in tag schema. -
Values:
styled -
fieldsmap string to objectrequired -
<string>object -
typeanyOf -
Supported values include:
plain: Theplainhighlighter uses the standard Lucene highlighterfvh: The fvh highlighter uses the Lucene Fast Vector highlighter.unified: The unified highlighter uses the Lucene Unified Highlighter.
-
Values:
plainfvhunified -
boundary_scanner -
Specifies how to break the highlighted fragments: chars, sentence, or word. Only valid for the unified and fvh highlighters. Defaults to
sentencefor theunifiedhighlighter. Defaults tocharsfor thefvhhighlighter.Supported values include:
chars: Use the characters specified byboundary_charsas highlighting boundaries. Theboundary_max_scansetting controls how far to scan for boundary characters. Only valid for thefvhhighlighter.sentence: Break highlighted fragments at the next sentence boundary, as determined by Java’sBreakIterator. You can specify the locale to use withboundary_scanner_locale. When used with theunifiedhighlighter, thesentencescanner splits sentences bigger thanfragment_sizeat the first word boundary next to fragment_size. You can setfragment_sizeto0to never split any sentence.word: Break highlighted fragments at the next word boundary, as determined by Java’sBreakIterator. You can specify the locale to use withboundary_scanner_locale.
-
Values:
charssentenceword -
boundary_scanner_localestring · default: Locale.ROOT -
Controls which locale is used to search for sentence and word boundaries. This parameter takes a form of a language tag, for example:
"en-US","fr-FR","ja-JP". -
fragmenter· default: span -
Specifies how text should be broken up in highlight snippets:
simpleorspan. Only valid for theplainhighlighter. -
Values:
simplespan -
highlight_queryQuery -
Highlight matches for a query other than the search query. This is especially useful if you use a rescore query because those are not taken into account by highlighting by default.
-
max_analyzed_offsetnumber -
If set to a non-negative value, highlighting stops at this defined maximum limit. The rest of the text is not processed, thus not highlighted and no error is returned The
max_analyzed_offsetquery setting does not override theindex.highlight.max_analyzed_offsetsetting, which prevails when it’s set to lower value than the query setting. -
no_match_sizenumber · default: 0 -
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragmentsnumber · default: 5 -
The maximum number of fragments to return. If the number of fragments is set to
0, no fragments are returned. Instead, the entire field contents are highlighted and returned. This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. Ifnumber_of_fragmentsis0,fragment_sizeis ignored. -
order· default: none -
Sorts highlighted fragments by score when set to
score. By default, fragments will be output in the order they appear in the field (order:none). Setting this option toscorewill output the most relevant fragments first. Each highlighter applies its own logic to compute relevancy scores. -
Values:
score -
phrase_limitnumber · default: 256 -
Controls the number of matching phrases in a document that are considered. Prevents the
fvhhighlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields,phrase_limitphrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvhhighlighter. -
Use in conjunction with
pre_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags. -
Use in conjunction with
post_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags. -
require_field_matchboolean · default: true -
By default, only fields that contains a query match are highlighted. Set to
falseto highlight all fields. -
Set to
styledto use the built-in tag schema. -
Values:
styled -
script_fieldsmap string to object -
Returns the result of one or more script evaluations for each hit.
-
sortoneOf -
Sort order of the top matching hits. By default, the hits are sorted by the score of the main query.
-
stored_fieldsoneOf -
Returns values for the specified stored fields (fields that use the
storemapping option). -
t_testobject -
A metrics aggregation that performs a statistical hypothesis test in which the test statistic follows a Student’s t-distribution under the null hypothesis on numeric values extracted from the aggregated documents.
-
top_metricsobject -
A metric aggregation that selects metrics from the document with the largest or smallest sort value.
-
value_countobject -
A single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents.
-
weighted_avgobject -
A single-value metrics aggregation that computes the weighted average of numeric values that are extracted from the aggregated documents.
-
variable_width_histogramobject -
A multi-bucket aggregation similar to the histogram, except instead of providing an interval to use as the width of each bucket, a target number of buckets is provided.