I am adding a facet_filter to the abv facet.
{
"query": {
"match_all": {}
},
"facets": {
"ABV": {
"range":{
"abv":[
{ "to": 3 },
{ "from": 3, "to": 5 },
{ "from": 5 }
]
},
"facet_filter": {
** "range": { "abv": { "from": 3, "to": 5 } }
** }}
}
}
Yet the response returns all of the abv ranges.
"facets":{
"ABV":{
"_type":"range",
"ranges":[
{
"to":3.0,
"count":0,
"total_count":0,
"total":0.0,
"mean":0.0
},
{
"from":3.0,
"to":5.0,
"count":601,
"min":3.0,
"max":4.99,
"total_count":601,
"total":2680.95,
"mean":4.460815307820299
},
{
"from":5.0,
"count":261,
"min":5.0,
"max":5.0,
"total_count":261,
"total":1305.0,
"mean":5.0
}
]
}
}
Using a term facet_filter only returns a facet for the filtered term. I
expected to only get a facet back for the filtered range. Is this the
correct way to filter search results for a range?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.