-
Notifications
You must be signed in to change notification settings - Fork 130
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
Related filter negation has unexpected behavior #217
Comments
The complex query negation does not work as expected, however it would be possible to implement this using the |
The latter of the two queries is functionally useless. If the parent relationship has any child element that isn't excluded, it will be included in the results. A parent would only ever be excluded if all of its children were excluded. My initial reaction was to capture the exclusion markers and then flag that relationship to be excluded at the root filterset, however, this would also affect regular filters. e.g., it would not be possible to do: A few workarounds:
|
This builds off of the thoughts in #54 and #99, but there may be some potential confusion when it comes to related filter negation. Using the Blog/Entry example in #99, what would users expect to happen with the following filter?
Users might reasonably expect a list of blogs that don't have an entry about Lennon published in 2008.
Due to how related filtersets are processed, the following is produced instead. This would return the set of blogs that have any entries that aren't about Lennon published in 2008. eg, a blog could have discussed Lennon in 2008 and lentils in 2009, but it would still be returned in the results.
To produce the first query, users will most likely need to use the complex filter backend. I haven't tested it, but the following unencoded filter should work:
TODO:
The text was updated successfully, but these errors were encountered: