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
function_score: use query and filter together #8675
Conversation
Before, if filter and query was defined for function_score, then the filter was silently ignored. Now, if both is defined then function score query wraps this in a filtered_query. closes elastic#8638
query = Queries.newMatchAllQuery(); | ||
} | ||
if (query == null && filter != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there can all be else if
no?
left two comments |
Should we raise an error instead of implicitely wrapping into a FilteredQuery? |
@jpountz I'm OK with wrapping this in a |
No objections, just wanted to make sure we considered this option too. :-) |
thanks for the quick review! Addressed all comments. |
closed f00b431 |
oh. wrong window, sorry |
LGTM |
Before, if filter and query was defined for function_score, then the
filter was silently ignored. Now, if both is defined then function score
query wraps this in a filtered_query.
closes #8638