-
Notifications
You must be signed in to change notification settings - Fork 486
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
base: develop
Are you sure you want to change the base?
IQSS/10705: Refactor permission filter query in indexing #10706
Conversation
// ----------------------------------- | ||
// PERMISSION FILTER QUERY | ||
// ----------------------------------- | ||
String permissionFilterQuery = this.getPermissionFilterQuery(dataverseRequest, solrQuery, onlyDatatRelatedToMe, addFacets); |
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.
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); |
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 and the query from the existing code line 1203 should be the same in all cases, whether the avoidJoin flag is set or not.
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: