mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
d9f0245b10
Backport of #47468 to 7.x This PR adds a new metric aggregation called string_stats that operates on string terms of a document and returns the following: min_length: The length of the shortest term max_length: The length of the longest term avg_length: The average length of all terms distribution: The probability distribution of all characters appearing in all terms entropy: The total Shannon entropy value calculated for all terms This aggregation has been implemented as an analytics plugin.
57 lines
1.8 KiB
Plaintext
57 lines
1.8 KiB
Plaintext
[[search-aggregations-metrics]]
|
|
== Metrics Aggregations
|
|
|
|
The aggregations in this family compute metrics based on values extracted in one way or another from the documents that
|
|
are being aggregated. The values are typically extracted from the fields of the document (using the field data), but
|
|
can also be generated using scripts.
|
|
|
|
Numeric metrics aggregations are a special type of metrics aggregation which output numeric values. Some aggregations output
|
|
a single numeric metric (e.g. `avg`) and are called `single-value numeric metrics aggregation`, others generate multiple
|
|
metrics (e.g. `stats`) and are called `multi-value numeric metrics aggregation`. The distinction between single-value and
|
|
multi-value numeric metrics aggregations plays a role when these aggregations serve as direct sub-aggregations of some
|
|
bucket aggregations (some bucket aggregations enable you to sort the returned buckets based on the numeric metrics in each bucket).
|
|
|
|
include::metrics/avg-aggregation.asciidoc[]
|
|
|
|
include::metrics/weighted-avg-aggregation.asciidoc[]
|
|
|
|
include::metrics/cardinality-aggregation.asciidoc[]
|
|
|
|
include::metrics/extendedstats-aggregation.asciidoc[]
|
|
|
|
include::metrics/geobounds-aggregation.asciidoc[]
|
|
|
|
include::metrics/geocentroid-aggregation.asciidoc[]
|
|
|
|
include::metrics/max-aggregation.asciidoc[]
|
|
|
|
include::metrics/min-aggregation.asciidoc[]
|
|
|
|
include::metrics/percentile-aggregation.asciidoc[]
|
|
|
|
include::metrics/percentile-rank-aggregation.asciidoc[]
|
|
|
|
include::metrics/scripted-metric-aggregation.asciidoc[]
|
|
|
|
include::metrics/stats-aggregation.asciidoc[]
|
|
|
|
include::metrics/string-stats-aggregation.asciidoc[]
|
|
|
|
include::metrics/sum-aggregation.asciidoc[]
|
|
|
|
include::metrics/tophits-aggregation.asciidoc[]
|
|
|
|
include::metrics/valuecount-aggregation.asciidoc[]
|
|
|
|
include::metrics/median-absolute-deviation-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|