Stats aggregation query on multiple fields


We are using stats aggregation in our project like below

    "aggs" : {
        "grades_stats" : { "stats" : { "field" : "grade" } }

For some new requirement we want to make use of multiple fields in stats query.
I have read documents on internet regarding it and my understanding is we can use only 1 field
in stats query.
Is there any other way to meet our new requirement?

You could use copy_to in your mappings in order to merge data from multiple fields into a single field. It would be the fastest option but would require reindexing.

Or you could merge the stats on client side, see eg.