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
}
}
}
}