# How get top compound words from text in elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-get-top-compound-words-from-text-in-elasticsearch/177815>\
**Category:** Elasticsearch\
**Created:** [April 22, 2019, 8:09am UTC](https://discuss.elastic.co/t/how-get-top-compound-words-from-text-in-elasticsearch/177815 "2019-04-22T08:09:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osama\_Rasheed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/osama_rasheed/32/44543_2.png) [@Osama\_Rasheed](https://discuss.elastic.co/u/Osama_Rasheed)\
**Post date:** [April 22, 2019, 8:09am UTC](https://discuss.elastic.co/t/how-get-top-compound-words-from-text-in-elasticsearch/177815/1 "2019-04-22T08:09:57Z")

</div>

I need to get top terms from elasticsearch, currently we are using significant terms functionality provided by elasticsearch but in our case we need multiple words which come frequently and significantly together.

Please suggest is there any way to do that in elasticsearch?

Following is query we are currently using:

```auto
GET /mentions/_search
{
    "size": 0, 
    "query": {
        "match": {
            "snippet": {
                "query": "#Hashtag"
            }
        }
    },
   "aggs": {
        "trends": {
          "significant_terms": {
            "field": "snippet",
            "size": 1000
          }
        }
      }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 20, 2019, 8:09am UTC](https://discuss.elastic.co/t/how-get-top-compound-words-from-text-in-elasticsearch/177815/2 "2019-05-20T08:09:58Z")

</div>

Closed on May 20, 2019, 8:09am UTC

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