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

SQL: consider _source instead of docvalue_fields for most of the fields' retrieval #41852

Closed
astefan opened this issue May 6, 2019 · 2 comments · Fixed by #44062
Closed

SQL: consider _source instead of docvalue_fields for most of the fields' retrieval #41852

astefan opened this issue May 6, 2019 · 2 comments · Fixed by #44062
Assignees

Comments

@astefan
Copy link
Contributor

astefan commented May 6, 2019

At the moment, ES SQL uses docvalue_fields for retrieval of all the requested fields in a query. This, though, has the downside mentioned in elastic/kibana#35489.

The alternative is to load the _source and extract the needed fields from there.

On one hand, the difficulty here is especially relevant for date and numeric fields where ES SQL needs to do the same parsing ES is doing when indexing a document so that the user is presented with the same value it would get back from Elasticsearch itself.

On the other hand, if one field only is already taken from _source, we should take all of them from _source since the _source is already loaded and built as JSON and the computational effort to re-parse the numeric and date fields is worth it.

Or, as a second alternative, maybe get fields other than dates from _source and the dates from docvalues_fields and skip re-parsing the dates.

@astefan astefan self-assigned this May 6, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@astefan
Copy link
Contributor Author

astefan commented Jul 25, 2019

7.x (7.4.0): 2633d11
master (8.0.0): 8bf8a05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants