-
Notifications
You must be signed in to change notification settings - Fork 802
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
Search.count with post_filter throws error #518
Comments
Thanks for the report. The question is whether we exclude the |
My expectation was that it would simply exclude the post_filter for the count. The whole point of the dsl is that you can add things to the query set, throwing an error at that point puts you in a unrecoverable situation. Sure it might be unexpected that it throws away the post filter, but I it already throws away some other things from the query. |
You are right, thanks for raising this issue, fix has been pushed to master. |
Thanks! Cleaning up for the new year? ;-) |
I found the same problem with es v5.0.2, it give "request does not support [post_filter]", how to save this ? |
Did you also upgrade the elasticsearch-dsl package? |
@hvdklauw |
Seems the check in Search.to_dict for the if count needs to be before it adds the post_filter.
In this case the post_filter is on a aggs.bucket which doesn't get added.
The text was updated successfully, but these errors were encountered: