Skip to content

Inner hits source filtering not working #23090

@mattweber

Description

@mattweber

When using nested inner hits feature and source filtering on the inner hit the included fields are not returned. This is specifying the include path relative to the nested object (which is how it is returned in results without filtering). If I specify the include using the absolute path, I get a result but the source is no longer returned relative to the nested object.

If I have this document:

{"nested":[{"nested_field": "some value"}]}

Without filtering, a nested inner hit response would return:

..."_source": {"nested_field": "some value"}

If I set the inner hit source filtering to include nested_field I get:

..."_source": {}

And if I set the inner hit source filtering to include nested.nested_field I get:

..."_source": {"nested": {"nested_field": "some value"}}

This is on elasticsearch 5.2.0.

/cc @martijnvg @tlrx

Metadata

Metadata

Assignees

Labels

:Search/SearchSearch-related issues that do not fall into other categories>bugv6.0.0-beta2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions