-
Notifications
You must be signed in to change notification settings - Fork 496
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
7000 mpconfig solr #8825
7000 mpconfig solr #8825
Conversation
src/main/java/edu/harvard/iq/dataverse/search/SolrClientService.java
Outdated
Show resolved
Hide resolved
d495b53
to
5d03cbc
Compare
…#7000 By refactoring SystemConfig.getSolrHostColonPort, the Solr endpoint is not just configurable via a database setting, but also by all mechanisms of MicroProfile Config. - The database setting still has priority over the other mechanisms. - It's completely backward compatible, no config change necessary. - Tests have been added to ensure the behaviour - Default ("localhost:8983") for no setting given is now also done via MPCONFIG - Default for container usage ("solr:8983") possible via MPCONFIG profile "ct"
When using Dataverse with a non-default Solr, HTTPS, custom core name or similar, it's necessary to have a configurable URL for the Solr endpoint. This becomes now possible via MicroProfile Config, defaulting to the old variant.
Describe the new options to set the Solr endpoint, crosslinking the old way and adding hints about MPCONFIG profiles.
5d03cbc
to
6965beb
Compare
added to sprint Dec 15, 2022 |
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.
Just some quick comments.
src/main/java/edu/harvard/iq/dataverse/search/SolrClientService.java
Outdated
Show resolved
Hide resolved
As we are now using JvmSettings everywhere as an abstraction above MPCONFIG, no need to import on our own.
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 test this but the API tests are passing and the code changes make sense. Approved.
@poikilotherm more merge conflicts, as expected since other MPCONFIG PRs have been merged. Can you please resolved them? |
Ready to merge except for the merge conflicts. |
All set! 😄 |
What this PR does / why we need it:
For unknown reasons, the Solr endpoint has been made configurable via a Database Setting only. This is very cumbersome for testing and container usage. Providing simple defaults via MPCONFIG takes lots of this load away. It also properly decouples creating the connection to Solr from the Database connection.
This PR is fully backward compatible with the old behaviour - anyone already having the database setting will let that setting take precedence!
This PR also very much enhances the configuration of the Solr connection, as it allows for the first time to choose transport protocol, core name and/or path, which makes it much more compatible with Solr installations that differ from our classic installations. (It does, however, not yet add support for SolrCloud).
Relates to #7000
Closes #3212
Which issue(s) this PR closes:
None.
Special notes for your reviewer:
Suggestions on how to test this:
Play around with the settings described in the added docs and watch it work. Or take a look at the nice test examples, also using the new shiny
@JvmSetting
test extension!Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Not really.
Is there a release notes update needed for this change?:
Maybe? Dunno. Please leave comment.
Additional documentation:
Included.