Skip to content

Fix an NPE when requesting inner hits and _source is disabled.#44836

Merged
jtibshirani merged 2 commits intoelastic:masterfrom
jtibshirani:nested-with-source-disabled
Jul 25, 2019
Merged

Fix an NPE when requesting inner hits and _source is disabled.#44836
jtibshirani merged 2 commits intoelastic:masterfrom
jtibshirani:nested-with-source-disabled

Conversation

@jtibshirani
Copy link
Copy Markdown
Contributor

@jtibshirani jtibshirani commented Jul 24, 2019

This PR makes two changes to FetchSourceSubPhase when _source is disabled and
we're in a nested context:

  • If no source filters are provided, return early to avoid an NPE.
  • If there are source filters, make sure to throw an exception.

The behavior was chosen to match what currently happens in a non-nested context.

Addresses #43517.

This PR makes two changes to FetchSourceSubPhase when _source is disabled and
we're in a nested context:
* If no source filters are provided, return early to avoid an NPE.
* If there are source filters, make sure to throw an exception.

The behavior was chosen to match what currently happens in a non-nested context.
@jtibshirani jtibshirani added >bug :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.4.0 labels Jul 24, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search

@jtibshirani jtibshirani removed the WIP label Jul 25, 2019
@jtibshirani
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample

Copy link
Copy Markdown
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jtibshirani jtibshirani merged commit 729aca5 into elastic:master Jul 25, 2019
@jtibshirani jtibshirani deleted the nested-with-source-disabled branch July 25, 2019 17:34
jtibshirani added a commit that referenced this pull request Jul 25, 2019
This PR makes two changes to FetchSourceSubPhase when _source is disabled and
we're in a nested context:
* If no source filters are provided, return early to avoid an NPE.
* If there are source filters, make sure to throw an exception.

The behavior was chosen to match what currently happens in a non-nested context.
jkakavas pushed a commit that referenced this pull request Jul 31, 2019
This PR makes two changes to FetchSourceSubPhase when _source is disabled and
we're in a nested context:
* If no source filters are provided, return early to avoid an NPE.
* If there are source filters, make sure to throw an exception.

The behavior was chosen to match what currently happens in a non-nested context.
jtibshirani added a commit that referenced this pull request Aug 12, 2019
This PR makes two changes to FetchSourceSubPhase when _source is disabled and
we're in a nested context:
* If no source filters are provided, return early to avoid an NPE.
* If there are source filters, make sure to throw an exception.

The behavior was chosen to match what currently happens in a non-nested context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Search/Search Search-related issues that do not fall into other categories v7.3.1 v7.4.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants