Skip to content

Conversation

vixducis
Copy link

@vixducis vixducis commented Aug 6, 2025

Sometimes, I come across a situation where I want to apply filters on multiple queries in one request. Each of the filters in the request may only apply to one of the queries. In that case, an InvalidFilterQuery will be thrown because not all filters are valid for all queries.

I'm aware that this can be disabled with the query-builder.disable_invalid_filter_query_exception config variable, but I'd like to keep throwing exceptions in most cases, but when one of these special cases arise, disable it on the QueryBuilder level.

This should keep the current default functionality as-is and not introduce any breaking changes. If this is not suitable for the project or you may have any other questions, please let me know.

@4RSIM3R
Copy link

4RSIM3R commented Aug 18, 2025

Totally agree on this approach...

@freekmurze
Copy link
Member

Could you add a test for the new function?

@vixducis
Copy link
Author

Regarding the tests: will do.

Should similar functionality be added for the other actions (sorts, includes) as well to keep the functionality uniform?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants