Example: where (place.type = 'Restaurant' and place.kind = 'Chinese') or (place.type = 'Bar' and place.kind in ('beer','wine'))
{
query: {
bool: {
should: [
{
bool: {
must: [
{match: { 'place.type': 'Restaurant' }},
{match: { 'place.kind': 'Chinese' }}
],
}
},
{
bool: {
must: [
{match: { 'place.type': 'Bar' }},
{match: { 'place.kind': ['beer', 'wine'].join(' OR') }}
]
}
}
]
}
}
}