Given
Data in index looks like
{
"entity_tags": [
{
"tags": [
"two",
"three"
],
"tag_data_type": "multitextselect",
"tag_group_name": "one 3"
},
{
"tags": [
"new1"
],
"tag_data_type": "textselect",
"tag_group_name": "one"
},
{
"tags": [
"10"
],
"tag_data_type": "counter",
"tag_group_name": "new"
}
],
"class": "A"
}
I need to write a Elasticsearch query (facet) in python such that output will return ( Need to return all possible values)
- class: [A], # as class contains A option only
- new:[10] # new contains10 option only
- one:[new1] # one contains new & new1 option only
- one 3:[three, two] # one 3 contains two & three option only
For a list of dict (here entity_tags ) it should return all tag_group_name values with possible tags values
Note: Above data is a sample document in ElasticSearch I need to return all possible values that are returned in response to support dynamic filters