Number of identical documents?

Let's say I have an index with 50 documents that contain 5 different names. Is there a way to list the number of repeated names in descending order?

For example:
{
"John": 19,
"David": 17,
"Susan": 7,
"Peter": 4,
"Amy": 3
}

A terms aggregation is probably what you want.

thank you, I will look into it.

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