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
Remove redundant BytesQueryBuilder in favour of using WrapperQueryBuilder internally #10919
Remove redundant BytesQueryBuilder in favour of using WrapperQueryBuilder internally #10919
Conversation
c2e28dc
to
b0c3649
Compare
Heya @areek can you please double check that I am not missing anything here? :) |
Hey @javanna, this looks good! Thanks for fixing this :) |
b0c3649
to
6f380bf
Compare
…perFilterBuilder internally BytesFilterBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperFilterBuilder could be used instead. Added WrapperFilterBuilder constructor that accepts a BytesReference as argument. One other reason why this filter builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only filter builder that allows to build a filter through java api without having a respective filter parser. Closes elastic#10919
Hey @javanna, I have added a test that breaks with this change. The test along with the fix can be found here https://github.com/elastic/elasticsearch/compare/elastic:master...areek:pr/10919?expand=1 |
Hey @areek I did some more testing and compared the two constant score query outputs: Before:
After:
where the binary portion contains the following:
There is an additional layer of wrapping, which is expected since we use the wrapper filter, but this looks good to me, I don't see any problem. I pulled in your additional test but didn't seem to fail for me. Let me know what you think. |
6f380bf
to
0310539
Compare
…perFilterBuilder internally BytesFilterBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperFilterBuilder could be used instead. Added WrapperFilterBuilder constructor that accepts a BytesReference as argument. One other reason why this filter builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only filter builder that allows to build a filter through java api without having a respective filter parser. Closes elastic#10919
0310539
to
597e80f
Compare
…erQueryBuilder internally BytesQueryBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperQueryBuilder could be used instead. Added WrapperQueryBuilder constructor that accepts a BytesReference as argument. One other reason why this filter builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only query builder that allows to build a query through java api without having a respective query parser. Closes elastic#10919
597e80f
to
56ef4e5
Compare
…erQueryBuilder internally BytesQueryBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperQueryBuilder could be used instead. Added WrapperQueryBuilder constructor that accepts a BytesReference as argument. One other reason why this filter builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only query builder that allows to build a query through java api without having a respective query parser. Closes elastic#10919
…erQueryBuilder internally BytesQueryBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperQueryBuilder could be used instead. Added WrapperQueryBuilder constructor that accepts a BytesReference as argument. One other reason why this filter builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only query builder that allows to build a query through java api without having a respective query parser. Closes elastic#10919
56ef4e5
to
1a70a16
Compare
LGTM |
LGTM! |
…lder BytesFilterBuilder got removed from master and is now deprecated in 1.x. WrapperFilterBuilder should be used instead. Relates to elastic#10919
…lder BytesFilterBuilder got removed from master and is now deprecated in 1.x. WrapperFilterBuilder should be used instead. Relates to elastic#10919 Closes elastic#11112
BytesQueryBuilder was introduced to be used internally by the phrase suggester and its collate feature. It ended up being exposed via Java api but the existing WrapperQUeryBuilder could be used instead. Added WrapperQueryBuilder constructor that accepts a BytesReference as argument.
One other reason why this query builder should be removed is that it gets on the way of the query parsers refactoring, given that it's the only query builder that allows to build a query through java api without having a corresponding query parser.