Having the following query:
curl -XGET 'localhost/my_index/my_type/_search?pretty=true' -d'
{
"query": {
"bool": {
"must": [
{
"query_string": {
"default_field": "body",
"query": "hello stackoverflow"
}
},
{
"terms": {
"_id": ["10"]
}
},
{
"has_child": {
"type": "user_item_relation",
"query": {
"term": {
"user_id": "1234"
}}}},
{
"has_child": {
"type": "user_item_relation",
"query": {
"term": {
"fav": "0"
}}}}]}}}'
Is there a way to combine the two last conditions (user_id = 1234 and fav = "0") on a single one without using two times has_child?