Support from Acquia helps fund testing for Drupal Acquia logo

Comments

asrob created an issue. See original summary.

SocialNicheGuru’s picture

Will this be backported to 7.x?

drunken monkey’s picture

Thanks for this issue!
For Drupal 7, see #2711685: Add support for Solr 6.

mkalkbrenner’s picture

FYI I already got Solr 6.0 running in combination with search_api_solr 8.x. But solrconf.xml from 5.x is incompatible and needs adjustments.

mkalkbrenner’s picture

Issue tags: +sprint
mkalkbrenner’s picture

sagesolutions’s picture

I've just got Solr 6.0 running with search_api_solr 8.x and its working pretty smoothly. See below for my steps on how to get them working together

Download the latest Solr 6 version

wget http://mirror.its.dal.ca/apache/lucene/solr/6.0.0/solr-6.0.0.zip

And install Solr as a service using the script:

sudo bash ./install_solr_service.sh solr-6.0.0.zip

Check if the service is running

sudo service solr status

You should see something similar to:

Found 1 Solr nodes:

Solr process 2750 running on port 8983

Now that solr is running, you can view the index via the browser to verify.

Use a browser and go to http://localhost:8983/solr/
You should see the solr admin website.

Now we need to create a core/collection so we can index items. Lets call ours “files”

Create a collection from the example conf

unzip solr-6.0.0.zip
cd solr-6.0.0

Note: For me, the files are be installed at /var/solr/data

Next, we want to install a collection for drupal indexing.

su - solr -c "/opt/solr/bin/solr create_core -c drupal -d /storage/solr-6.0.0/example/files/conf"

We will want to overwrite the conf folder with our drupal specific files from the search_api_solr module. Copy the folder from the search_api_solr/solr-conf/5.x into the /var/solr/data/drupal/conf folder, overrwriting the existing files.

Finally, update the Solr Config files to work with Solr 6.0

Update the solrconfig.xml file with the following:

Change the config name:

<config name="drupal-8.0-solr-6.x" >

Change the version number

<luceneMatchVersion>${solr.luceneMatchVersion:6.0.0}</luceneMatchVersion>

Comment out the unlockOnStartup

<!-- <unlockOnStartup>false</unlockOnStartup> -->

Save the solrconfig.xml file.

Next update the solrcore.properties file

solr.luceneMatchVersion=6.0.0

Save the file.

Update the schema.xml file

<schema name="drupal-8.0-solr-6.x" version="1.5">

Save the file.

Restart the solr service

service solr restart

You should be able to start indexing your drupal content with apache solr!

mkalkbrenner’s picture

Thanks for your post. It would be nice, if you post a patch that adds the Solr 6 config files.

You should be able to start indexing your drupal content with apache solr!

As I already mentioned in #4 I already did some first tests with Solr 6. The bad news are that the basic tests we have don't pass because some search results differ!
But I second that indexing works ... ;-)

asrob’s picture

Added a patch based on sagesolutions' comment.

fran seva’s picture

Hi -- I have applied the patch and downloaded Solr 6.0.0 and then create a core. After add the sever I got the following errors:

  • Solr no longer supports forceful unlocking via 'unlockOnStartup'. I think the problem is in #4 it is said we have to comment out and the patch is uncomment out. To fix it we have to update the patch.
  • You are using an incompatible schema.xml configuration file. Please follow the instructions in the INSTALL.txt file for setting up Solr.
    It seems the problems is @schema_version is getting the incorrect value. It should be something like drupal- but the current value is "example".
    The problem is caused by
    elseif (substr($stats_summary['@schema_version'], 0, 9) != 'drupal-4.')
    It's expecting have a 4.x version and what we really need is drupal-8.x. I think what it should be done is compare only drupal- string instead drupal-X.
fran seva’s picture

I have added a patch commenting the unlockOnStartup out.

fran seva’s picture

I've been thinking about how to check the version and what it's come to my mind was use $this->getSolrHelper()->getSolrMajorVersion(); to get the version of Solr instead set manually the string drupal-x.

I have also added the 6.x version in the override Solr version selector, the patch is attached.

mkalkbrenner’s picture

Assigned: Unassigned » mkalkbrenner
Status: Active » Needs review
Issue tags: -sprint
Related issues: +#2721613: Amount of search results with Solr 5.5.x and 6.x differ from 5.4.1 and earlier
FileSize
122.85 KB
3.76 KB

Thanks @all for your work. There're some erroneous comments here regarding the schema name. Since we just port the existing schema forward to Solr 6.x we still have schema name "drupal-4.3...".

Please be aware that we have a serious issue with any Solr version newer that 5.4.1!

mkalkbrenner’s picture

The existing tests pass for Solr versions before 5.5.x, but they fail for newer versions like 6.0.0:
https://travis-ci.org/mkalkbrenner/search_api_solr/builds/128850073

This will be targeted by #2721613: Amount of search results with Solr 5.5.x and 6.x differ from 5.4.1 and earlier.

mkalkbrenner’s picture

  • mkalkbrenner committed a86ef86 on 8.x-1.x
    Issue #2704383 by fran seva, asrob, mkalkbrenner, sagesolutions: Support...
mkalkbrenner’s picture

Status: Needs review » Fixed
steinmb’s picture

Is it a plan to backport this to D7? I also see a separate issue for D7 but do we need that? #2711685: Add support for Solr 6

mkalkbrenner’s picture

See comment #3.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Arvey’s picture

Hi!

Is this working on Drupal 8.1.7 with Solr 6.2.0?

I'm getting "The website encountered an unexpected error. Please try again later." everytime i'm saving it. The url is like this: http://localhost/forum/admin/config/search/search-api/add-server.

Please help, am i missing something?

steinmb’s picture

Upgrade this module to latest dev. If still problem, pls. include the error message from Drupal error log.

Arvey’s picture

Sorry I installed it wrong. But finally i fixed by using composer to handle it all. After creating a Solr Server a message error displayed saying: "You are using an incompatible schema.xml configuration file." How to fix it? Thanks!

mkalkbrenner’s picture

"You are using an incompatible schema.xml configuration file." How to fix it?

Please open a new support issue for that instead of commenting on a closed issue. In most cases I don't recognize these comments.

veerasekar.r89’s picture

Thanks...!
It working fine.