I have an index with this mapping:
"domain": {
"type": "string",
"index": "not_analyzed"
},
"keyword": {
"type": "string",
}
Example data:
{"domain": "google.com", "keyword":"search"},
{"domain": "google.com", "keyword":"people"},
{"domain": "facebook.com", "keyword":"people"},
{"domain": "foo.com", "keyword":"bar"},
I want to create a query, that will return:
- domains, filtered by keyword
- total count of keywords resulted domains have
For search "people" it might be "google": 2 and "facebook": 1
Thanks for your help!