New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfiltered nested source should keep its full path #26102

Merged
merged 1 commit into from Aug 10, 2017

Conversation

Projects
None yet
5 participants
@martijnvg
Member

martijnvg commented Aug 8, 2017

As part of #18567 relative paths were no longer used to make nested hits more consistent with normal hits, but the _source of nested document was forgotten. Only if the nested _source was filtered the full field names / paths were used.

Closes #23090

I wonder if we should backport this change to 6.0 branch? It is a breaking change.

@mattweber

This comment has been minimized.

Show comment
Hide comment
@mattweber

mattweber Aug 10, 2017

Contributor

Thanks @martijnvg! Please backport if possible since 6x is still beta.

Contributor

mattweber commented Aug 10, 2017

Thanks @martijnvg! Please backport if possible since 6x is still beta.

@jpountz

This comment has been minimized.

Show comment
Hide comment
@jpountz

jpountz Aug 10, 2017

Contributor

+1 to backport to 6.0

Contributor

jpountz commented Aug 10, 2017

+1 to backport to 6.0

@jpountz

Let's add a note to the breaking changes?

@martijnvg martijnvg merged commit 076167f into elastic:master Aug 10, 2017

1 of 2 checks passed

elasticsearch-ci Build triggered. sha1 is merged.
Details
CLA Commit author is a member of Elasticsearch
Details

@martijnvg martijnvg added the >bug label Aug 10, 2017

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Oct 12, 2017

Return the _source of inner hit nested as is with wrapping it into it…
…s full path context

Due to a change happened via #26102 to make the nested source consistent
with or without source filtering, the _source of a nested inner hit was
always wrapped in the parent path. This turned out to be not ideal for
users relying on the nested source as it would require additional parsing
on the client side. This change fixes this, the _source of nested inner hits
is now no longer wrapped by parent json objects with the _source is included
as is or source filtering is used.

Internally source filtering and highlighting relies on the fact that the
_source of nested inner hits are accessible by its full field path, so
in order to now break this, the conversion of the _source into its binary
form is performed in FetchSourceSubPhase, after any potential source filtering
is performed to make sure the structure of _source of the nested inner hit
is consistent regardless if source filtering is performed.

Closes #26944

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Oct 12, 2017

Return the _source of inner hit nested as is without wrapping it into…
… its full path context

Due to a change happened via #26102 to make the nested source consistent
with or without source filtering, the _source of a nested inner hit was
always wrapped in the parent path. This turned out to be not ideal for
users relying on the nested source, as it would require additional parsing
on the client side. This change fixes this, the _source of nested inner hits
is now no longer wrapped by parent json objects, irregardless of whether
the _source is included as is or source filtering is used.

Internally source filtering and highlighting relies on the fact that the
_source of nested inner hits are accessible by its full field path, so
in order to now break this, the conversion of the _source into its binary
form is performed in FetchSourceSubPhase, after any potential source filtering
is performed to make sure the structure of _source of the nested inner hit
is consistent irregardless if source filtering is performed.

PR for #26944

Closes #26944

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Oct 19, 2017

Return the _source of inner hit nested as is without wrapping it into…
… its full path context

Due to a change happened via #26102 to make the nested source consistent
with or without source filtering, the _source of a nested inner hit was
always wrapped in the parent path. This turned out to be not ideal for
users relying on the nested source, as it would require additional parsing
on the client side. This change fixes this, the _source of nested inner hits
is now no longer wrapped by parent json objects, irregardless of whether
the _source is included as is or source filtering is used.

Internally source filtering and highlighting relies on the fact that the
_source of nested inner hits are accessible by its full field path, so
in order to now break this, the conversion of the _source into its binary
form is performed in FetchSourceSubPhase, after any potential source filtering
is performed to make sure the structure of _source of the nested inner hit
is consistent irregardless if source filtering is performed.

PR for #26944

Closes #26944

martijnvg added a commit that referenced this pull request Oct 19, 2017

Return the _source of inner hit nested as is without wrapping it into…
… its full path context

Due to a change happened via #26102 to make the nested source consistent
with or without source filtering, the _source of a nested inner hit was
always wrapped in the parent path. This turned out to be not ideal for
users relying on the nested source, as it would require additional parsing
on the client side. This change fixes this, the _source of nested inner hits
is now no longer wrapped by parent json objects, irregardless of whether
the _source is included as is or source filtering is used.

Internally source filtering and highlighting relies on the fact that the
_source of nested inner hits are accessible by its full field path, so
in order to now break this, the conversion of the _source into its binary
form is performed in FetchSourceSubPhase, after any potential source filtering
is performed to make sure the structure of _source of the nested inner hit
is consistent irregardless if source filtering is performed.

PR for #26944

Closes #26944

martijnvg added a commit that referenced this pull request Oct 19, 2017

Return the _source of inner hit nested as is without wrapping it into…
… its full path context

Due to a change happened via #26102 to make the nested source consistent
with or without source filtering, the _source of a nested inner hit was
always wrapped in the parent path. This turned out to be not ideal for
users relying on the nested source, as it would require additional parsing
on the client side. This change fixes this, the _source of nested inner hits
is now no longer wrapped by parent json objects, irregardless of whether
the _source is included as is or source filtering is used.

Internally source filtering and highlighting relies on the fact that the
_source of nested inner hits are accessible by its full field path, so
in order to now break this, the conversion of the _source into its binary
form is performed in FetchSourceSubPhase, after any potential source filtering
is performed to make sure the structure of _source of the nested inner hit
is consistent irregardless if source filtering is performed.

PR for #26944

Closes #26944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment