-
Notifications
You must be signed in to change notification settings - Fork 111
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
Rollup : add "count document" aggregation metric #57
Comments
Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com>
We had an open issue from Elasticsearch that was tracking an enhancement that would have solved this. |
For collecting the number of documents from the source index, the index management code base was prepped for a change in core which would make use of the _doc_counts metadata field to allow for seamlessly aggregating summary documents as we do in rollups. This core change did not come, but the change really belongs in core. This issue is open in the core repo here: |
Issue by pmarjou22
Thursday Jan 14, 2021 at 09:31 GMT
Originally opened as opendistro-for-elasticsearch/index-management#387
I'm currently using Rollup on 1.12.0, and I have to create a dummy field on all my documents to be able to count the number of documents from source index.
It would be nice to be able to add this aggregation directly from RollUp configuration without this workaround
Current Workaound with event.count set to 1 on all documents
Source Index
POST sourceindex/_doc/
{
"event.name" : "event1",
"event.category" : "category1",
"event.count" : 1,
"date": "2015-01-01T12:10:30Z"
}
POST sourceindex/_doc
{
"event.name" : "event2",
"event.category" : "category1",
"event.count" : 1,
"date": "2015-01-01T12:10:30Z"
}
POST sourceindex/_doc
{
"event.name" : "event3",
"event.category" : "category2",
"event.count" : 1,
"date": "2015-01-01T12:10:30Z"
}
Target Index workaround : Sum on event.count
The text was updated successfully, but these errors were encountered: