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

IQSS/10705: Refactor permission filter query in indexing #10706

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Jul 19, 2024

What this PR does / why we need it: See issue. This is a refactor that should be easier to maintain and slightly more efficient.

Which issue(s) this PR closes:

Closes #10705

Special notes for your reviewer: FWIW: I wouldn't have done this if QDR didn't need to get the string listing the groups for reuse, which meant I had to pull apart the code generating the query itself from just getting that group list.

Suggestions on how to test this: Nominally this PR should produce no change/users should still see the same things in search, correct for their permissions. The easiest way to test may be to just set FINE logging on the SearchServiceBean and verify that the queries produced in both the current and new code are the same.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

// -----------------------------------
// PERMISSION FILTER QUERY
// -----------------------------------
String permissionFilterQuery = this.getPermissionFilterQuery(dataverseRequest, solrQuery, onlyDatatRelatedToMe, addFacets);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the dataverse param was never used in getPermissionFilterQuery - that must have been dropped at some point.


logger.fine("Groups: " + groupString);
String permissionQuery = buildPermissionFilterQuery(avoidJoin, groupString);
logger.fine("Permission Query: " + permissionQuery);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the query from the existing code line 1203 should be the same in all cases, whether the avoidJoin flag is set or not.

@qqmyers qqmyers added Size: 3 A percentage of a sprint. 2.1 hours. GDCC: QDR of interest to QDR Consider For Next Release A simple change (eg bug fix) that would be good to prioritize since it has been seen in the wild labels Jul 21, 2024
@cmbz cmbz added the FY25 Sprint 7 FY25 Sprint 7 (2024-09-25 - 2024-10-09) label Sep 25, 2024
@cmbz cmbz added this to the 6.5 milestone Sep 30, 2024
@sekmiller sekmiller self-assigned this Oct 1, 2024
@coveralls
Copy link

Coverage Status

coverage: 20.879% (+0.01%) from 20.869%
when pulling 86ea279 on QualitativeDataRepository:QDR-refactor_avoidJoin_in_indexing
into a0cb73d on IQSS:develop.

@sekmiller sekmiller removed their assignment Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Consider For Next Release A simple change (eg bug fix) that would be good to prioritize since it has been seen in the wild FY25 Sprint 7 FY25 Sprint 7 (2024-09-25 - 2024-10-09) GDCC: QDR of interest to QDR Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: Ready for QA ⏩
Development

Successfully merging this pull request may close these issues.

Search permission calculation is complex and can be redundant
4 participants