I try to represent trough time documents containing reference to some countries and not containing them.
I set 2 filters
GET /article/_search
{
"size": 0,
"aggs" : {
"country" : {
"filter":{
"bool":{
"must": {
"terms":{
"Fulltext" : ["sierra leone", "liberia"]
}
}
}
}
},
"not_country" : {
"filter":{
"bool":{
"must_not": {
"terms":{
"Fulltext" : ["sierra leone", "liberia"]
}
}
}
}
}
}
}
And it seems fine. I get this return
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 5285,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"country" : {
"doc_count" : 713
},
"not_country" : {
"doc_count" : 4572
}
}
}
But the problem comes when I use those filters in the area vizualisation settings (Buckets > Split Series > Sub Aggregation > Filters). The vizualisation shows 0 "not_country" documents whereas there should be 713. And even the "country" documents count is wrong (I got 2432 when I gather them all in a custom time period whereas I should get 4572).
Can you help me ?