[BUG] doc_count_error_upper_bound
for terms agg should not show 0 when descending _count sort is not used
#11851
Labels
Describe the bug
Encountered this as a part of #11732
doc_count_error
is only relevant when the buckets are sorted in descending_count
order (I think this is a documentation gap too, but that's a separate issue https://opensearch.org/docs/latest/aggregations/bucket/terms/). If a different sort order is used thendoc_count_error_upper_bound
currently shows 0. This can be confusing for users since it implies that there are no candidate buckets being eliminated byshard_size
.Related component
Search:Aggregations
To Reproduce
Example using
noaa
data from OSB but the underlying data doesn't really matter:Expected behavior
Whenever the
doc_count_error
cannot be calculated, it either show not be returned in the response body or it should return -1 to differentiate the cases where there is no error vs cases where it cannot be computed.Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: