lambdaworks / zio-elasticsearch

ZIO Elasticsearch is a type-safe and streaming-friendly ZIO native Elasticsearch client.
https://lambdaworks.github.io/zio-elasticsearch/
Apache License 2.0
60 stars 18 forks source link

Extra letters in aggregations responses #365

Open dbulaja98 opened 10 months ago

dbulaja98 commented 10 months ago

There are sometimes extra letters for terms and for percentiles aggregations in the elasticsearch response. Something like this happens: sterms#aggName

vanjaftn commented 9 months ago

I did some research on Percentiles and Terms. It appears that there is no error, but rather the Percentiles and Percentile Ranks have a keyed parameter. The choice between tdigest_percentiles and hdr_percentiles as a response depends on this parameter. Since we didn't use the keyed parameter, it defaults to tdigest. Therefore it has those extra letters in response.

As for Terms, it seems that it can accept both integers and strings, and when it receives a string, its response is referred to as sterms. The message "Result of the TermsAggregator when the field is a String" is mentioned for string_terms.

dbulaja98 commented 9 months ago

Thank you Vanja, great job! 🚀

dbulaja98 commented 9 months ago

We should consider adjusting aggregations responses.