Hi all!
I have an index with parent-child capability. I managed the has-child query to bring me specific fields from the parent with the command:
_source": ["parent_field_1","parent_field_2"...]
and it worked. Now i want to do the same for the children fields putting the same command again, but i receive the error message:
"type": "parsing_exception",
"reason": "[has_child] query does not support [_source]",
My query:
GET npk/_search
{
"_source": ["parent_field_1","parent_field_2"...],
"query": {
"has_child": {
"type": "body",
"min_children": 1,
"_source": ["child_field_1","child_field_2"...]
"query": {
"range": {
"child_field_1": {
"gte": 5,
"lte": 10
} } },
"inner_hits": {}
} } }
How can i choose which fields from children i receive?