Skip to content
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

Avoid double loading DocValues with ScriptDocValues and Fields API #79106

Closed
stu-elastic opened this issue Oct 13, 2021 · 2 comments
Closed

Avoid double loading DocValues with ScriptDocValues and Fields API #79106

stu-elastic opened this issue Oct 13, 2021 · 2 comments
Assignees
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement Team:Core/Infra Meta label for core/infra team

Comments

@stu-elastic
Copy link
Contributor

When implementing the Fields API, we should avoid double loading DocValues if a users uses ScriptDocValues (doc['myfield']) and DocValuesField (field('myfield')).

This will allow users to incrementally use the scripting Fields API in their scripts, when they add functionality or fix a bug, for example without a surprising penalty.

Refs: #78950

@stu-elastic stu-elastic added >enhancement :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Oct 13, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@stu-elastic
Copy link
Contributor Author

DocValuesField has getScriptDocValues which avoids this double loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

3 participants