It's odd. in kibanan discovery, I use filter bar to search "DestCountry" which equals to "IT", then i got 2007 hits. But, when i use the follow aggs in console, it gives me the answer of 2371. i use ES7.3.
-= agg query in console =-
GET kibana_sample_data_flights/_search
{
"size": 0,
"aggs": {
"flight_dest": {
"terms": {
"field": "DestCountry"
}
}
}
}
-= result =-
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"flight_dest" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 3187,
"buckets" : [
{
"key" : "IT",
"doc_count" : 2371
},
......
}
Sorry, and msot wierd, when i use edit in DSL from filter setting in filter bar. it gave me the following answer.
-= in DSL =-
{
"query": {
"match": {
"DestCountry": {
"query": "IT"
}
}
}
}
then I use this to search in console, I got the answer of 2371, which equal to using agg.
-= query in console =-
GET kibana_sample_data_flights/_search
{
"query": {
"match": {
"DestCountry": {
"query": "IT"
}
}
}
}
so, do we trust the result of filter bar in Kibana Discovery ?
展开