Skip to content
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

portal Query Builder produces incorrect results for boolean any operator #2587

Open
mbjones opened this issue Dec 14, 2024 · 0 comments
Open
Assignees
Labels
bug portals Anything related to portals query builder relates to the QueryBuilderView, used in the EditCollecionView

Comments

@mbjones
Copy link
Member

mbjones commented Dec 14, 2024

Describe the bug
When building a data collection query in the portal Query Builder, using the 'any' dropdown produces incorrect results. It appears the multiple query rules are AND'ed rather than being OR'ed. This bug was reported by an ADC user, and verified through several variants by @mbjones

To Reproduce

  1. Create test portal
  2. Open the Data tab to edit the collection query to use a single rule, note query result count (e.g., creator contains 'Nash')
  3. Add a second rule that expands the query (e.g., All Metadata contains 'Alaska') and used they 'any' operator
  4. Note that the query resultset gets smaller rather than larger

Expected behavior
An OR'ed query generally should be the same size or larger.

Screenshots

First query, 9 results:

image

Second query: 8 results (should be > 4,084 and < 4093

image

For any two subqueries that produce results with counts of x and y, the OR'ed query should produce at least as many as the larger resultset, and potentially as many as x+y combined. This could probably be encoded in a test to ensure the system does not regress.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Firefox 132.0
@mbjones mbjones added the bug label Dec 14, 2024
@robyngit robyngit self-assigned this Dec 16, 2024
@robyngit robyngit added portals Anything related to portals query builder relates to the QueryBuilderView, used in the EditCollecionView labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug portals Anything related to portals query builder relates to the QueryBuilderView, used in the EditCollecionView
Projects
None yet
Development

No branches or pull requests

2 participants