We are using ElasticSearch 5.0.0.
Please find data in movies index in ElasticSearch in attachment.
Please let us know if there is a simpler query or any other way to perform the aggregation query given in snippet below on all the fields of index in mapping instead of just this single column.
GET /movies/_search?pretty
{
"size": 0,
"_source": false,
"query": {
"query_string": {
"analyze_wildcard": true,
"query": "*drama*"
}
},
"aggs": {
"distinct_tables_1": {
"terms": {
"field": "_type"
},
"aggs": {
"distinct_col_1": {
"terms": {
"field": "genres.keyword",
"include" : ".*rama.*"
}
}
}
}
}
}