Best way to do a top strings query?


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": {

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


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

Thanks for the quick reply!

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