elastic / elasticsearch-java

Official Elasticsearch Java Client
Apache License 2.0
408 stars 237 forks source link

TermsBucketBase: doc_count_error should be doc_count_error_upper_bound #785

Closed stures closed 3 months ago

stures commented 4 months ago

Java API client version

8.13

Java version

21

Elasticsearch Version

8.13

Problem description

In the TermsBucketBase here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_per_bucket_document_count_error

The returned field is specified to doc_count_error_upper_bound

but the client expects: doc_count_error

https://github.com/elastic/elasticsearch-java/blob/c84fb7590f5bb700e653a1d2921de2fd01e0f2a3/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsBucketBase.java#L110

This causes errors when using this request

l-trotta commented 4 months ago

Hello! Thank you for reporting this, I'm getting a different error so I'll have to investigate this a bit more, but something is definitely not working.