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
}
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.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.