0

I have an eZ Publish and a Magento site on two different servers, and one Solr server. The Solr server is now used as the search engine for eZ Publish but I would also like to use the same Solr-server on Magento.

eZ Publish comes with an extension (eZFind) which contains schema.xml, and I got it working straight of the box without any configuration (other than defining the Solr-server, user, password, etc).

Magento ships with a schema.xml and solrconfig.xml, which according the documentation needs to be copied to the Solr-server.

I'm a bit afraid of doing this since I don't want to break the search on eZ Publish.

Does anyone have any experience with this or has any recommendations on the Solr setup?

Fredrik
  • 1,741
  • 4
  • 24
  • 40

2 Answers2

3

You need to use the multi-core feature of Solr (see there) so that you will only have one Solr instance, serving 2 cores (at least). What does that mean ? Each core will be defined by at least 2 files (schema.xml and solrconfig.xml), which will be located in dedicated folders within your Solr installation. Then the cores have to be registered in a file named solr.xml which, in your case, could look like this :

<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true" sharedLib="lib">
    <cores adminPath="/admin/cores">
         <core name="ezpublish" instanceDir="ezpublish" />
         <core name="magento" instanceDir="magento" />
    </cores>
</solr>

If your current solr installation is still in the eZ Find extension, then you should have a look a this page which tells you how to move the bundled Solr installation outside of eZ Publish. Then, add a new core with the Magenta configuration files.

Depending on the Solr version you are using, I would recommend installing Solr on your own (without taking the one for eZ Find) and apply the eZ Publish configuration on it.

foobar
  • 926
  • 6
  • 21
1

You can use solr's multicore feature which allows you to host multiple indexes, each with its own schema and each accessible with its own url (http://localhost:8983/solr/ezpublish/ and http://localhost:8983/solr/magento).

eZPublish has a tutorial on how to do this : http://doc.ez.no/Extensions/eZ-Publish-extensions/eZ-Find/eZ-Find-2.7/Advanced-Configuration/Using-multi-core-features

All you should have left to do is copy your magento config

Ben
  • 39
  • 2