mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-02-10 13:25:07 +00:00
* Add analyzer documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add index and search analyzer pages Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Doc review comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * More doc review comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Implemented editorial comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update index-analyzers.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
840 B
840 B
layout | title | parent | grand_parent | nav_order | redirect_from | |
---|---|---|---|---|---|---|
default | Value count | Metric aggregations | Aggregations | 140 |
|
Value count aggregations
The value_count
metric is a single-value metric aggregation that calculates the number of values that an aggregation is based on.
For example, you can use the value_count
metric with the avg
metric to find how many numbers the aggregation uses to calculate an average value.
GET opensearch_dashboards_sample_data_ecommerce/_search
{
"size": 0,
"aggs": {
"number_of_values": {
"value_count": {
"field": "taxful_total_price"
}
}
}
}
{% include copy-curl.html %}
Example response
...
"aggregations" : {
"number_of_values" : {
"value" : 4675
}
}
}