Description
When querying FTS with facets - either date or numeric - and providing ranges, it is not considered an error to omit the name of the range. That leads to confusing results, especially when one declares multiple ranges without a name.
"strength": {
|
"field": "abv",
|
"size": 3,
|
"numeric_ranges" : [
|
{"name": "light", "min": 0.0, "max": 3.0},
|
{"name": "strong", "min": 3.0, "max": 5.0},
|
{"name": "extra-strong", "min": 5.0}
|
]
|
}
|
yields:
"strength": {
|
"field": "abv",
|
"total": 166,
|
"missing": 30,
|
"other": 0,
|
"numeric_ranges": [
|
{
|
"name": "light",
|
"min": 0,
|
"max": 3,
|
"count": 99
|
},
|
{
|
"name": "extra-strong",
|
"min": 5,
|
"count": 49
|
},
|
{
|
"name": "strong",
|
"min": 3,
|
"max": 5,
|
"count": 18
|
}
|
]
|
}
|
Whereas
"strength": {
|
"field": "abv",
|
"size": 3,
|
"numeric_ranges" : [
|
{"min": 0.0, "max": 3.0},
|
{"min": 3.0, "max": 5.0},
|
{"min": 5.0}
|
]
|
}
|
yields
"strength": {
|
"field": "abv",
|
"total": 49,
|
"missing": 30,
|
"other": 0,
|
"numeric_ranges": [
|
{
|
"name": "",
|
"min": 5,
|
"count": 49
|
}
|
]
|
}
|
Looks like it considers all ranges have the same name ("empty"?) and only considers one of the declared ranges.