Hoping someone can help here and tell me if the query I'm attempting to run is possible/supported by Elasticsearch (I've read through the docs and forums and been unable to find any answer).
I have a child document (Child) that has a parent document set on it, with the child document having a number of nested fields that require nested queries to be run. I wish to run a has child query on the parent document, with the inner query on the child document being against a nested field. For example:
"query" : {
"has_child" : {
"query" : {
"bool" : {
"must" : {
"bool" : {
"must" : {
"nested" : {
"query" : {
"bool" : {
"must" : {
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
"term" : {
"Owner.Type" : "User",
"_cache" : true
}
}
}
}
}
},
"path" : "Owner"
}
}
}
}
}
},
"child_type" : "Child"
}
}
This should return valid results based on the documents in Elasticsearch, however the query successfully runs with no results returned.
Any suggestions?
Thanks in advance