-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
#8232: Adding warnings when a Projection Query has an empty Filter Group #8813
base: 1.10.x
Are you sure you want to change the base?
Conversation
…ontent item when the query has no filters
…turning nothing when there's an empty filter group
// Iterate over each filter group, but ignore empty ones, because they'd cause all content items to be returned. | ||
foreach (var group in queryRecord.FilterGroups.Where(group => group.Filters.Count > 0)) { |
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.
This is the only functional change, the rest is just code styling and comment rephrasing.
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.
I am suggesting adding a limit filter instead (100, 500). And add a notification.
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.
I didn't find a suitable way to apply such a limit due to how the query is constructed (there is no explicit limit filter) without hurting the abstractions. It is possible to intervene towards the end of the query evaluation when Slice is called (and apply a limit there), but that would mess up paging.
I added a notification instead, when a Query or a ProjectionPart is saved, IMO that's good enough.
…bout the effect of an empty filter group
Fixes #8232