I am trying to query for parent documents containing children which match my query clauses.
Query could be of the form A AND B or A OR B etc.
On forming a query for find parents where children name or Description contains "word1" AND "word2" something like this..
"has_child": {
"type": "ChildType",
"score_mode": "sum",
"bool": {
"must": [
{
"multi_match": {
"query": "word1",
"fields": [
"name",
"description"
]
}
},
{
"multi_match": {
"query": "word2",
"fields": [
"name",
"description"
]
}
}]
},
"inner_hits": {
"size": 2,
}
I am getting parsing exception "[has_child] query does not support [bool]". Is there a way to achieve what I am trying to do?