How to aggregate frequency count of words which exist in a field

Hi.
I want to evaluate frequency of terms which exist in a hashtags field of a twitter data.
for example i have an index which its name is twitter .
in twitter index i have a field which its name is hashtags.
for instance in twitter index:

"took" : 2,
 "timed_out" : false,
 "_shards" : {
   "total" : 1,
   "successful" : 1,
   "skipped" : 0,
   "failed" : 0
 },
 "hits" : {
   "total" : {
     "value" : 1,
     "relation" : "eq"
   },
   "max_score" : 1.0,
   "hits" : [
     {
       "_index" : "twitter",
       "_type" : "_doc",
       "_id" : "1",
       "_score" : 1.0,
       "_source" : {
         "created_at" : "Sat Sep 04 10:03:08 +0000 2021",
       "entities" : {
           "hashtags" : [
             "sea",
             "water",
             "fish",
             "sea",
             "salt",
             "water",
             "Ice",
             "fish",
             "fish"


so i want a result which it could show me the following format:
fish :3
ice:1
water:2
sea:2
salt:1

See Terms aggregation | Elasticsearch Guide [7.14] | Elastic

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