Best way to do a top strings query?

Hi,

We want to be able to do a "top strings" (that's my naming) query. Like a top terms, but want the top entire strings in a field rather than the terms. I followed the instructions in this post and reindexed the data with the field as not_analyzed. After doing that, the query below does return the top strings:

GET indexname*/_search
{
"size": 0,
"aggs": {
"top-phrases-aggregation": {
"terms": {
"field":"contentAnalyzed",
"size":20
}
}
}
}

So, I've got what I need, but I'm wondering if there are other/better ways to do this?

Thanks,
Casie

I don't believe so. Aggregation is the right way to go IMHO.

Thanks for the quick reply!