Local Solr aligned with prod/stage: single Solr 9.11 service, Solr 8 and switch removed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#! /bin/bash
|
||||
# Bascule le Drupal local entre Solr 8 (branche prod) et Solr 9 (branche stage).
|
||||
# bin/solr_switch.sh 8|9
|
||||
# Écrit (ou supprime) web/sites/default/settings.solr.php, inclus par settings.php, puis drush cr.
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1
|
||||
F=public_html/web/sites/default/settings.solr.php
|
||||
case "$1" in
|
||||
8) rm -f "$F" ;;
|
||||
9) cat > "$F" <<'PHP'
|
||||
<?php
|
||||
// Généré par bin/solr_switch.sh 9 : Drupal local -> conteneur solr9 (Solr 9)
|
||||
foreach (['materio', 'database_search_autocomplete'] as $server) {
|
||||
$config["search_api.server.$server"]['backend_config']['connector_config']['host'] = 'solr9';
|
||||
$config["search_api.server.$server"]['backend_config']['connector_config']['solr_version'] = '9';
|
||||
}
|
||||
PHP
|
||||
;;
|
||||
*) echo "usage: $0 8|9" >&2; exit 1 ;;
|
||||
esac
|
||||
docker exec materiod8-php-1 drush cr >/dev/null && echo "Drupal local -> Solr $1"
|
||||
Reference in New Issue
Block a user