Change the Solr rule deployment script to support the Querqy 5 rule API#164
Open
Change the Solr rule deployment script to support the Querqy 5 rule API#164
Conversation
epugh
approved these changes
Nov 6, 2024
Contributor
epugh
left a comment
There was a problem hiding this comment.
LGTM. Where the G means GREAT. I expected this to be more in the vein of the smui2solrclud where we wedged in some python. I really appreciate that this is a refactoring, and that we removed more lines of code than we added by a big margin.
We should add something to the Docs to help folks upgrading know to review their setups.
c6bb73d to
f81be6e
Compare
…PI. The example smui2solr.sh was still using ssh based file upload to deploy Querqy rules, there is a new way with Querqy 5: the Querqy rewriter API. * New smui2solr.sh deployment script that uses the Querqy 5 API. It is triggered with 4 parameters 1) the path to the common rules file 2) the path to the replace rules file 3) the target system, i.e. PRELIVE or LIVE 4) the Solr core or collection name (taken from the rules collection) * The script expects all other configuration as environment variables: - SMUI_QUERQY_REWRITER_COMMON_RULES: the name of the common rules rewriter the rules should be deployed to - SMUI_QUERQY_REWRITER_COMMON_RULES_DECOMPOUND: the name of the common rules rewriter for decompound rules (required, if decompound rules shall be exported separately) - SMUI_QUERQY_REWRITER_REPLACE: the name of the replace rules rewriter (required, if spelling/replacement rules are used) - SMUI_2SOLR_SOLR_HOST or SMUI_DEPLOY_LIVE_SOLR_HOST: the live Solr host - SMUI_DEPLOY_PRELIVE_SOLR_HOST: the prelive Solr host, if prelive deployment is enabled - SMUI_DEPLOY_(PRE)LIVE_SOLR_(USER|PASSWORD): the live/prelive user/password if Solr basic authentication is used - SMUI_DEPLOY_PRELIVE_SOLR_ALLOW_INSECURE: if the --insecure flag should be used when authenticating (i.e. no cert validation) * Removing all configuration related to the *target* file names of the common rules, optional decompound common rules and replace rules file names as they are no longer copied to a target. * Changing the decision to trigger a GIT based rule deployment to a dedicated toggle / environment variable SMUI_DEPLOYMENT_GIT_ENABLE which needs to be set to true. No longer relying on the magic name "GIT" as the rules file name on the deployment target. * Add jq to SMUI Docker image to facilitate JSON based Querqy request recreation in smui2solr.sh script.
f81be6e to
62f5b42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The example smui2solr.sh was still using ssh based file upload to deploy Querqy rules, there is a new way with Querqy 5: the Querqy rewriter API.
The script expects all other configuration as environment variables:
Removing all configuration related to the target file names of the common rules, optional decompound common rules and replace rules file names as they are no longer copied to a target.
Changing the decision to trigger a GIT based rule deployment to a dedicated toggle / environment variable SMUI_DEPLOYMENT_GIT_ENABLE which needs to be set to true. No longer relying on the magic name "GIT" as the rules file name on the deployment target.
Add jq to SMUI Docker image to facilitate JSON based Querqy request recreation in smui2solr.sh script.