Consider the following data
POST programming/languages/1
{
"name":"java",
"type":"general_purpose"
}
POST programming/languages/2
{
"name":"javascript",
"type":"scripting"
}
POST programming/languages/3
{
"name":"c",
"type":"general_purpose"
}
GET programming/languages/_search
{
"query": {
"match": {
"type":"general_purpose"
}
}
}
If I need to find the docs which has more than one match of the field type
, how do that in elasticsearch ?
Normally using group by
with having
clause we can achieve this in SQL.
Can we achieve this in elasticsearch?