-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
Description
Right now aggregations responses are hard to differentiate if you do not know how they were originally constructed.
In the .NET client I manage just about to peace back together the type of the aggregations by doing some simple property inspection.
For now this works even with the newly added 1.1 aggregations but I fear this approach won't scale in the long run.
If I could specify a agg_type_hint flag on the search requests so aggregations are returned like this:
"aggregations": {
"myagg": {
"_type": "nested",
"doc_count": 2
}
}
I could parse the aggregations to a typed response a lot easier without having the hold a ref to original search request object.
Note: I'm working on a PR for this