Git Product home page Git Product logo

solr's Introduction

Solr Lando Plugin

This is the official Lando plugin for Solr. When installed it...

  • Allows users to run various solr versions

Of course, once a user is running their Solr project with Lando they can take advantage of all the other awesome development features Lando provides.

Basic Usage

Add a solr service to your Landofile

services:
  myservice:
    type: solr

For more info you should check out the docs:

Issues, Questions and Support

If you have a question or would like some community support we recommend you join us on Slack.

If you'd like to report a bug or submit a feature request then please use the issue queue in this repo.

Changelog

We try to log all changes big and small in both THE CHANGELOG and the release notes.

Contributors

Made with contributors-img.

Other Selected Resources

solr's People

Contributors

dependabot[bot] avatar eevensen avatar github-actions[bot] avatar kayakr avatar mrmcgovern avatar pirog avatar reynoldsalec avatar richarddavies avatar

Watchers

 avatar  avatar  avatar

solr's Issues

Error when setting custom solr config

My config:

  solr:
    type: solr:8
    portforward: true
    core: cufpt
    config:
      dir: html/modules/contrib/search_api_solr/jump-start/solr8/config-set

Error:

solr_1        | lando 12:53:08.80 INFO  ==> Lando handing off to: /bin/sh -c /start-solr.sh html/modules/contrib/search_api_solr/jump-start/solr8/config-set
solr_1        | Executing /start-solr.sh html/modules/contrib/search_api_solr/jump-start/solr8/config-set
solr_1        | Booting solr with...
solr_1        | CORE: cufpt
solr_1        | CONFIG CUSTOM: html/modules/contrib/search_api_solr/jump-start/solr8/config-set
solr_1        | DATADIR: /var/solr/data
solr_1        | INSTALL DIR: /opt/solr
solr_1        | Executing /opt/docker-solr/scripts/precreate-core cufpt /solrconf
solr_1        | Core cufpt already exists
solr_1        | cp: cannot stat '/var/solr/data/cufpt/conf/.': Permission denied

Two sites sharing a single Solr core possible?

Has anyone managed to get Drupal 8 Search API Solr multisite feature, sharing a single Solr core, running in Lando? Just to be clear, this is not a Drupal multisite installation, but two separate web sites, sharing a single Solr core, to be able to index and search in both sites, on either web site.

I am fine with both these scenarios, whichever is easier to set up:

  • The two sites in the same Lando instance, like in lando/lando#2355
  • Two Separate Lando instances, somehow sharing the same Solr core

Multiple solr cores in one solr service

Is there a possability to use multiple cores in one Solr Service? Our CMS use this way of configuration for multiple languages (one solr core per language).

I found this comment, but it doesn't give a hint how to achieve that:

@tanc is correct about the URLS.
it might be possible to support multiple cores in a single image but that should be a separate issue

Originally posted by @pirog in lando/lando#1123 (comment)

Solr core not installed

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

Support patch versions

I would like to be able to use a patch version of Solr, e.g.:

services:
  solr:
    type: solr:8.11.2

Currently if I use this then parseConfig() (https://github.com/lando/solr/blob/main/services/solr/builder.js#L109) doesn't recognize it and falls back to the generic config.

Maybe we can strip off the patch version before we do the comparison? Something like:

const parseConfig = options => {
  let version = options.version;
  if (version.includes('.')) {
     version = version.split('.').slice(0, 2).join('.');
  }
  switch (version) {
    case '3.6': return parse3(options);
    // ...
  }
}

Issue connecting Lando app to Solr proxy

I have been trying to connect my Lando app with Solr so that I can connect that Solr node to my Drupal 8 website.

Following this guide (https://docs.lando.dev/solr/) I've added the following lines to my .lando.yml file. This creates a healthy solr node/ proxy:

proxy:
  solr:
    - solr.drupal-digitalconvergence-website.lndo.site
    
services:
  myservice:
    type: solr
    portforward: 8983
    core: my-core
    config:
      dir: docroot/modules/contrib/search_api_solr/jump-start/solr7/config-set

The main issue I'm facing is that when creating the server on my Drupal site to connect with Solr I am continually presented with:

Server Connection: The Solr server could not be reached or is protected by your service provider.

I've followed the following documentation for the setup of said server (https://www.drupal.org/docs/8/modules/search-api-solr/search-api-solr-howtos/add-a-new-server)

Is there anything I'm missing in terms of my .lando.yml file? Or something I am over looking?

Two sites both running solr (different versions) collide

I have a few sites with a solr 8 service and another with a solr 7 service all running at the same time. They're completely different codebases, lando files, etc. When I go to Search API in the one running solr 7, it's picking up the version from one of the ones running solr 8 - somehow the service is bleeding outside the container. How is this even possible? Shouldn't the proxy stuff prevent that like it does with appserver?

I had to shut everything down except the solr 7 site to get it to work.

Solr config from Drupal module isn't being copied to Solr Container

Using a Drupal codebase with the Search API Solr module, this was the configuration I've used for the Solr service for some time:

services:
  search:
      type: solr:8
      core: drupal9
      portforward: true
      config:
        dir: /app/drupal/modules/contrib/search_api_solr/jump-start/solr8/config-set

In the current Lando release (3.6.2), the Solr core (drupal9) will be created in /var/solr/data, but the folder is empty, no config inside.
The config source (/app/drupal/modules/contrib/search_api_solr/jump-start/solr8/config-set) exists.

What am I missing?

Drupal 9 unable to get solr up an running

What is your lando version and operating system? (note that the older your version the less likely we are to reply)
Macbook Big Sur 11.1

Tell us about your .lando.yml
Trying to load solr with
search: type: solr:8.6 portforward: true core: myCore config: dir: lando-src/solr-primary

Tell us about the command you were running

lando rebuild

Tell us about the error you got

โ–  The service "search" failed its healthcheck
This may be ok but we recommend you run the command below to investigate:
lando logs -s search


**Tell us generally about your bug**
The logs show this
search_1         | Executing /start-solr.sh lando-src/solr-primary
search_1         | Booting solr with...
search_1         | CORE: prac
search_1         | CONFIG CUSTOM: lando-src/solr-primary
search_1         | DATADIR: /opt/solr/server/solr/mycores
search_1         | INSTALL DIR: /opt/solr
search_1         | Executing /opt/docker-solr/scripts/precreate-core prac /solrconf
search_1         | Core prac already exists
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrcore.properties.old': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrconfig_backup.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./accents_en.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./accents_und.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./elevate.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./protwords_en.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./protwords_und.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./schema_extra_fields.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./schema_extra_types.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./schema.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrconfig_extra.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrconfig_index.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrconfig_query.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrconfig_requestdispatcher.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrconfig.xml': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./solrcore.properties': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./stopwords_en.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./stopwords_und.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./synonyms_en.txt': Permission denied
search_1         | cp: cannot create regular file '/opt/solr/server/solr/mycores/prac/conf/./synonyms_und.txt': Permission denied
search_1         | cp: preserving times for '/opt/solr/server/solr/mycores/prac/conf/.': Operation not permitted



Any help would be appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.