Can ES format number of hits to things such as 143k or 12.6m

Hi - pretty much as the title suggest, I was wondering if ES has any functionality built in which can format the number of "hits" returned into a specified method or value.

For example, I perform a query, which returns say 12,253,634 results... would it be possible, or is it possible anywhere to specify a value of say "thousands" or "millions" which would return the number of hits as either "12.2m" or 12253.6k" kind of thing. I'm guessing not but thought I'd check - it may be that we need to write a function to do it via the API end.

Thanks

We only do that for some statistic APIs when you add the ?human flag.

https://www.elastic.co/guide/en/elasticsearch/reference/5.3/common-options.html#_human_readable_output

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.