Skip to content

Explain api: move query parsing to the coordinating node #14270

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

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented Oct 23, 2015

Similarly to what we did with the search api, we can now also move query parsing on the coordinating node for the explain api. Given that the explain api is a single shard operation (compared to search which is instead a broadcast operation), this doesn't change a lot in how the api works internally. The main benefit is that we can simplify the java api by requiring a structured query object to be provided rather than a bytes array that will get parsed on the data node. Previously if you specified a QueryBuilder it would be serialized in json format and would get reparsed on the data node, while now it doesn't go through parsing anymore (as expected), given that after the query-refactoring we are able to properly stream queries natively.

@nik9000
Copy link
Member

nik9000 commented Oct 23, 2015

Looks right to me.

@javanna javanna force-pushed the enhancement/explain_parse_coord_node branch from d9fb6e9 to 901828e Compare October 28, 2015 09:09
@javanna javanna force-pushed the enhancement/explain_parse_coord_node branch from 901828e to aa1d612 Compare October 28, 2015 09:16
@s1monw
Copy link
Contributor

s1monw commented Oct 28, 2015

LGTM thanks @javanna

Similarly to what we did with the search api, we can now also move query parsing on the coordinating node for the explain api. Given that the explain api is a single shard operation (compared to search which is instead a broadcast operation), this doesn't change a lot in how the api works internally. The main benefit is that we can simplify the java api by requiring a structured query object to be provided rather than a bytes array that will get parsed on the data node. Previously if you specified a QueryBuilder it would be serialized in json format and would get reparsed on the data node, while now it doesn't go through parsing anymore (as expected), given that after the query-refactoring we are able to properly stream queries natively.

Closes elastic#14270
@javanna javanna force-pushed the enhancement/explain_parse_coord_node branch from aa1d612 to ea750de Compare October 28, 2015 09:42
@javanna javanna merged commit ea750de into elastic:master Oct 28, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Search Refactoring labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants