lando / solr

The Official Solr Lando Plugin
https://docs.lando.dev/solr/
GNU General Public License v3.0
0 stars 7 forks source link

Solr core not installed #4

Open nelsonsalves opened 2 years ago

nelsonsalves commented 2 years ago

Tell us about your setup

What is your lando version and operating system?

Lando: v3.1.4 Windows 10 using wsl2

Tell us about your .lando.yml

name: drupal9
recipe: drupal9
config:
  webroot: .
services:
  phpmyadmin:
    type: phpmyadmin
    hosts:
      - database
  database:
    type: mysql:5.7
  solr:
    type: solr:8
    portforward: true
    core: lando
    config:
      dir: solr-conf/8.x
tooling:
  drupalcs:
    service: appserver
    cmd: "/app/vendor/bin/phpcs --standard=Drupal,DrupalPractice"
    description: Run phpcs Drupal Coding Standards against a given file or directory.
  drupalcbf:
    service: appserver
    cmd: "/app/vendor/bin/phpcbf --standard=Drupal,DrupalPractice"
    description: Automatically fix Drupal coding standards suggestions.
  drupal-check:
    service: appserver
    cmd: /app/vendor/bin/drupal-check -ad
    description: Check Drupal code for deprecations and discover bugs via static analysis
  test:
    service: appserver
    cmd: "php /app/vendor/bin/phpunit -c /app/phpunit.xml"
    description: Run PHPUnit tests on a specific file or Drupal module.

Tell us about the error you got

I added the solr service to my lando file and when accessing the solr url i got an error saying

lando: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core lando: Error loading solr config from /var/solr/data/lando/conf/solrconfig.xml

Aditionally from the drupal side, it seems it can access the solr server but not his core. When accessing the solr url it shows that "No cores available" so it seems that lando didn't properly install the solr core.

Any ideas? Am I doing anything wrong? I found some issues that seem similar but they were a bit old.

Thanks in advance

Tigatok commented 2 years ago

Hi @st0rmblessed,

I have not tested with 8.x, however did you copy the solr configs from the contrib module, located at contrib/search_api_solr/solr-conf-template/8.x?

If so, that is incorrect. you need to run drush to generate the configurations. Those configs are not what you should be using.

Tigatok commented 2 years ago

linked issue: https://github.com/lando/lando/issues/3148

nelsonsalves commented 2 years ago

Hi @Tigatok, that was precisely what I was doing since I thought it was correct. I applied your solution and it worked !!!!! Thank you so much