Tuesday, 7 May 2019

How get top compound words from text in elasticsearch?

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:

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



from How get top compound words from text in elasticsearch?

No comments:

Post a Comment