I am trying to use term aggregation with dfs_query_then_fetch in order to get accurate values but still i am not getting accurate count.
QUERY:
GET demo/_search?pretty=true&search_type=dfs_query_then_fetch
{
"aggs" : {
"products" : {
"terms" : {
"field" : "demo1.keyword",
"size" : 5
}
}
}
}
Result:
"aggregations": {
"products": {
"doc_count_error_upper_bound": 10959,
"sum_other_doc_count": 10454016,
"buckets": [
{
"key": "SK148",
"doc_count": 4442
},
{
"key": "SK67",
"doc_count": 4432
},
{
"key": "SK489",
"doc_count": 4420
},
{
"key": "SK592",
"doc_count": 2245
},
{
"key": "SK88",
"doc_count": 2245
}
]
}
}
I believe while using dfs_query_then_fetch with term aggregation i will get doc_count_error_upper_bound with zero value.