I have a field, location.vertical.depth.value, which is a float_range field. I'd like Elasticsearch to return the minimum lower bound for this field across all query results.
An example document might be:
{
"location": {
"vertical": {
"depth": {
"value": {
"gte": 42.0,
"lte": 64.0
}
}
}
}
}
This is my attempt:
"aggs": {
"min_depth": { "min": { "field": "location.vertical.depth.value" } }
}
This throws an exception:
class
org.elasticsearch.search.aggregations.support.ValuesSource$Rangecannot be cast to classorg.elasticsearch.search.aggregations.support.ValuesSource$Numeric
Interestingly though I can do something similar with a date_range field with "min_date": { "min": { "field": "date" } }.