-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Is it possible to control the order of methods when chaining multiple? #300
Comments
bodybuilder()
.query("match", "rvcategory", "kilim")
.filter('term', 'shape')
.agg('terms', 'rvcategory')
.agg('terms', 'shape')
.size(10)
.from(0)
.build() |
It seems like you're encountering a challenge with the order of operations in your query. Have you considered using a nested aggregation within a filtered aggregation? This way, you can achieve the desired review result of returning aggregations not included in the filter. Here's an example structure you could try: json |
I am trying to implement something that functions like post_filter, to be able to return aggregations not included in the filter.
When I try to build a query with query, aggregations and filter, in that order, bodybuilder re-orders the methods and generates the filter before everything else.
Is it possible to achieve this result or something that functions the same way?
The text was updated successfully, but these errors were encountered: