For the fields fetch phase, avoid reloading stored fields.#58196
Merged
jtibshirani merged 3 commits intoelastic:field-retrievalfrom Jun 17, 2020
Merged
For the fields fetch phase, avoid reloading stored fields.#58196jtibshirani merged 3 commits intoelastic:field-retrievalfrom
jtibshirani merged 3 commits intoelastic:field-retrievalfrom
Conversation
Collaborator
|
Pinging @elastic/es-search (:Search/Search) |
10 tasks
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
47c46f9 to
2c7279d
Compare
jimczi
approved these changes
Jun 16, 2020
Contributor
jimczi
left a comment
There was a problem hiding this comment.
I left a question, lgtm otherwise
| context.fetchSourceContext(new FetchSourceContext(true)); | ||
| } | ||
| fieldsVisitor = new FieldsVisitor(context.sourceRequested()); | ||
| boolean loadSource = context.sourceRequested() || context.fetchFieldsContext() != null; |
Contributor
There was a problem hiding this comment.
Should we have the same logic in the else below or do we expect users to not use stored_fields in conjunction with the new fields option ?
Member
There was a problem hiding this comment.
I think it'd be safest to add it below too.
Contributor
Author
There was a problem hiding this comment.
Oops, thanks for catching this. I'll push an update.
nik9000
approved these changes
Jun 16, 2020
| keyword: "x" | ||
| integer: 42 | ||
|
|
||
| - do: |
Member
There was a problem hiding this comment.
I tend to stick refresh on the index request.
Contributor
Author
There was a problem hiding this comment.
👍 this is nicer, especially when there's only one index request.
Contributor
Author
|
@elasticmachine run elasticsearch-ci/2 |
jtibshirani
added a commit
that referenced
this pull request
Jun 17, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jun 26, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jun 30, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jun 30, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jul 8, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jul 14, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jul 15, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jul 18, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jul 21, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
that referenced
this pull request
Jul 23, 2020
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
jtibshirani
added a commit
to jtibshirani/elasticsearch
that referenced
this pull request
Jul 27, 2020
…8196) This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute (plural). This way, we can make sure that the stored fields (including _source) are only loaded once per hit as part of FetchPhase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates FetchFieldsPhase to override hitExecute instead of hitsExecute
(plural). This way, we can make sure that the stored fields (including _source)
are only loaded once per hit as part of FetchPhase.
This improves the performance of
fieldsloading so that it's very close tosource filtering. See #55363 (comment) for more details.
Relates to #55363.