Elastic aggregation, how does it works?


(VIKAS KAPADIYA) #1

Please tell the how the aggregation query works in elasticsearch. please tell the steps which aggregation will execute first in sub aggregation.?


(David Pilato) #2

Do you have an example of what you are asking for?


(VIKAS KAPADIYA) #3

yes, Below is the aggregation query

table:

author weekday status
me monday ok
me tuesday ok
me moday bad

query:

{
"size": 0,
"aggs": {
"author": {
"terms": {
"field": "author"
},
"aggs": {
"days": {
"terms": {
"field": "weekday"
},
"aggs": {
"status": {
"terms": {
"field": "status"
}
}
}
}
}
}
}
}


(David Pilato) #4

What do you want to know?


(Christian Dahlqvist) #5

It is not clear what you are looking for. The section on aggregations in the Definitive guide describes aggregations and the underlying concepts quite well, even though it was written for Elasticsearch 2.x. This blog post is also useful even though it is old. You also have the official documentation, which the current state and capabilities..


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.