Last active
March 16, 2022 05:33
-
-
Save colorfield/2d74317070da950e09eaac18dae92a31 to your computer and use it in GitHub Desktop.
Drupal Lando configuration for Solr 8 and Search API
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
name: drupal-solr | |
recipe: drupal8 | |
config: | |
# PHP 7 is required for Search API Solr > 2. | |
php: '7.4' | |
webroot: web | |
proxy: | |
search: | |
- admin.solr.lndo.site:8983 | |
# Documentation | |
# https://docs.lando.dev/config/solr.html | |
# https://docs.lando.dev/config/services.html | |
services: | |
# Spin up a Solr container called "search". | |
# Set "search" instead of "localhost" | |
# on the Drupal search api solr server configuration. | |
search: | |
# Use a specific Solr version. | |
type: solr:8 | |
# Optionally declare the name of the Solr core. | |
# This setting is only applicable for versions 5.5 and above. | |
core: drupal8 | |
portforward: true | |
# This should be the directory containing the schema.xml and solrconfig.xml files. | |
# Download the config.zip and extract it. | |
config: | |
conf: solr/conf |
So we need to update the config file to $CORE/conf
- Download the latest config.zip
- lando ssh -s search
- cd /opt/solr/server/solr/mycores/drupal8
- replace conf with unzip config.zip -d $CORE/conf
- restart lando
One correction to above, run:
lando ssh -s search -u root
This way you don't run into permission issues
Also you do't really need to copy the config in that way. You can put it as a local folder in your setup say in config/solr, then in your lando.yml just do this:
services:
search:
type: solr:6.6
portforward: true
core: drupal8
config:
dir: config/solr
There are same update to do :
1- type: solr:7 instead of type: solr:7.1
2- conf: web/modules/contrib/search_api_solr/solr-conf-templates/7.x instead of
conf: web/modules/contrib/search_api_solr/solr-conf/7.x
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
drupal8: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core drupal8: Can't load schema /opt/solr/server/solr/mycores/drupal8/conf/schema.xml: Plugin init failure for [schema.xml] fieldType "collated": Error loading class 'solr.ICUCollationField'