-
Notifications
You must be signed in to change notification settings - Fork 578
adding stats aggregation docs #10251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
adding stats aggregation docs #10251
Conversation
Signed-off-by: Anton Rubin <anton.rubin@eliatra.com>
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review. |
Signed-off-by: Anton Rubin <anton.rubin@eliatra.com>
@rishabhmaurya Could you please review this PR? Thanks! |
``` | ||
{% include copy-curl.html %} | ||
|
||
To compute statistics on the `kwh` field across all documents, use the following aggregation request which suppresses document hits by setting `size` to `0`, and defines a `stats` aggregation named `consumption_stats` over the `kwh` field: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing setting to size to 0 isn't a hard requirement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rishabhmaurya no, its just these docs are regarding aggregations, therefore its focusing on the aggs part
To compute statistics on the `kwh` field across all documents, use the following aggregation request which suppresses document hits by setting `size` to `0`, and defines a `stats` aggregation named `consumption_stats` over the `kwh` field: | ||
|
||
```json | ||
GET /power_usage/_search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to also add an example to nested term aggregation having stats for each bucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rishabhmaurya thats added now
Signed-off-by: Anton Rubin <anton.rubin@eliatra.com>
Description
adding stats aggregation docs
Version
all
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.