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
Fix issues with too long sets of work keys in queries and URLs #3087
Fix issues with too long sets of work keys in queries and URLs #3087
Conversation
The terms query should also provide better performance.
Work keys query is now a separate query type.
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 haven't tried this hands-on yet, but it looks logical to me. I've left a handful of minor comments.
This might also be a good time to review the Mink RecordVersionsTest and make sure it's covering everything that it should, if you have a moment... want to be sure we can reliably use that as a before-and-after to be confident that the refactoring hasn't obviously changed/broken anything.
} | ||
$params->set('q', implode(' OR ', $query)); | ||
$params->set('q', '{!terms f=work_keys_str_mv}' . implode(',', $terms)); |
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.
Can we guarantee that no term will ever contain a comma?
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.
No. I thought escaping the delimiter above would be enough, but now that I checked it, that doesn't work. I'll think about an alternative.
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 changed the delimiter to chr(1F) and removed the useless escaping (verified manually with Solr that all the characters can be in a term as is).
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 looking good to me now, and all tests are passing. Thanks for the fix, @EreMaijala!
No description provided.