-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
Description
In ES 1.5, many aggregations now return a formatted <foo>_as_string version of the return values by default, even without specifying a format in the request, or regardless of the field type.
For instance:
"aggregations": {
"my_stats": {
"count": 54,
"min": 10148,
"max": 19602,
"avg": 15151.611111111111,
"sum": 818187,
"min_as_string": "10148.0",
"max_as_string": "19602.0",
"avg_as_string": "15151.611111111111",
"sum_as_string": "818187.0"
}
}Aggregations where I've observed this:
as_string always present:
- min
- max
- sum
- avg
- stats
- extended_stats
- value_count
- percentiles
- percentiles_ranks
- cardinality
as_string only present if the field is a date, regardless if format is specified or not:
- terms
- histogram
- date_histogram
Does it ever make sense to return a formatted version of a numeric field? For dates, should we only return a formatted version if format is specified in the request?