Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Using multi-core features

As mentioned before, you are able to set up a single Solr instance, the backend engine of eZ Find, to serve multiple sites (it does not even matter if these are on the same box). Similar to a database, Solr is capable of having multiple search indexes from one servlet, because Solr supports the concepts of multiple "cores". This means that it can run multiple instances of itself inside a servlet container. Each core has its own set of configuration files (including the "schema") and dedicated directories.

Lets go through the steps of setting up a Solr instance which must serve two sites. To keep it simple we'll call them ezlabs .no and

  1. The easiest way is to first prepare a central location for the Solr Index. This can for example be:

  2. Next you should create two additional directories inside it, as follows:
  3. Inside /srv/solr/java you should store a copy of the contents of the java directory of your eZ Find installation, or if you don't have one yet, download it from
  4. Next create a symlink for the solr/lib plugin directory inside /srv/solr/cores like this:
    ln -s /srv/solr/java/solr/lib /srv/solr/cores
  5. Create additional directories for each of your sites, called ezlabs and ez in your /srv/solr/cores. Both of them must contain a data and a conf subdirectory.
    Your file structure should look something like this:
  6. In both conf directories you must then copy the contents of the folder extension/ezfind/java/solr/conf/* and adapt the Solr dataDir.
  7. Next create a solr.xml file inside /srv/solr/cores/solr.xml with the following content:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- snip the comments from Apache wiki -->
    <solr persistent="true" sharedLib="lib">
        <cores adminPath="/admin/cores">
             <core name="ezlabsno" instanceDir="ezlabsno" />
             <core name="ezno" instanceDir="ezno" />
  8. If you already have indexed data for one or both of your sites, you may stop Solr from indexing them again. You should then copy the index and spellchecker directories to your data directories (in /srv/solr/cores/ezlabsno/data and /srv/solr/cores/ezno/data).
  9. Now you should restart Solr with the following parameters:
    cd /srv/solr/java; java -Dsolr.solr.home=/srv/solr/cores -jar start.jar
  10. It's important to keep an eye on the output, in case of potential errors (for example things that are permission related).
  11. And finally you can configure the individual eZ Publish and eZ Find instances with the dedicated URLs as base URLs in solr.ini:

Ester Heylen (01/04/2010 3:21 pm)

Ester Heylen (01/04/2010 3:21 pm)


  • something missing?

    I guess something is missing after "Now you should restart Solr with the following parameters as follows:"
    isn't it?
  • yes... not working

    The above advices are not complete, as I said before.
    (I've spent 3hr already on this.... geee!)

    there is sure another mistake

     instanceDir="siteoneno "

    should be


    without the blank space at the end, isn't it?

    (see )
  • still not working

    Thank you for the updates.
    It still does not work for us (while it works with single solr).

    We get this error (with our server is Debian lenny)

    28-nov-2009 19.39.38 org.apache.solr.request.XSLTResponseWriter init
    INFO: xsltCacheLifetimeSeconds=5
    28-nov-2009 19.39.38 org.apache.solr.core.RequestHandlers initHandlersFromConfig
    INFO: created standard: solr.SearchHandler
    28-nov-2009 19.39.38 org.apache.solr.core.RequestHandlers initHandlersFromConfig
    INFO: created dismax: solr.SearchHandler
    28-nov-2009 19.39.38 org.apache.solr.core.RequestHandlers initHandlersFromConfig
    INFO: created partitioned: solr.SearchHandler
    28-nov-2009 19.39.38 org.apache.solr.core.RequestHandlers initHandlersFromConfig
    INFO: created ezpublish: solr.DisMaxRequestHandler
    28-nov-2009 19.39.38 org.apache.solr.common.SolrException log
    GRAVE: org.apache.solr.common.SolrException: Error loading class 'org.ezsystems.solr.handler.ezfind.eZFindRequestHandler'
    	at org.apache.solr.core.SolrResourceLoader.findClass(
    	at org.apache.solr.core.SolrCore.createInstance(
    	at org.apache.solr.core.SolrCore.createRequestHandler(
    	at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(
    	at org.apache.solr.core.SolrCore.<init>(
    	at org.apache.solr.core.CoreContainer.create(
    	at org.apache.solr.core.CoreContainer.load(
    	at org.apache.solr.core.CoreContainer$Initializer.initialize(
    	at org.apache.solr.servlet.SolrDispatchFilter.init(
    	at org.mortbay.jetty.servlet.FilterHolder.doStart(
    	at org.mortbay.component.AbstractLifeCycle.start(
    	at org.mortbay.jetty.servlet.ServletHandler.initialize(
    	at org.mortbay.jetty.servlet.Context.startContext(
    	at org.mortbay.jetty.webapp.WebAppContext.startContext(
    	at org.mortbay.jetty.handler.ContextHandler.doStart(
    	at org.mortbay.jetty.webapp.WebAppContext.doStart(
    	at org.mortbay.component.AbstractLifeCycle.start(
    	at org.mortbay.jetty.handler.HandlerCollection.doStart(
    	at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(
    	at org.mortbay.component.AbstractLifeCycle.start(
    	at org.mortbay.jetty.handler.HandlerCollection.doStart(
    	at org.mortbay.component.AbstractLifeCycle.start(
    	at org.mortbay.jetty.handler.HandlerWrapper.doStart(
    	at org.mortbay.jetty.Server.doStart(
    	at org.mortbay.component.AbstractLifeCycle.start(
    	at org.mortbay.xml.XmlConfiguration.main(
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.mortbay.start.Main.invokeMain(
    	at org.mortbay.start.Main.start(
    	at org.mortbay.start.Main.main(
    Caused by: java.lang.ClassNotFoundException: org.ezsystems.solr.handler.ezfind.eZFindRequestHandler
    	at$ Source)
    	at Method)
    	at Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(
    	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(
    	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Unknown Source)
    	at org.apache.solr.core.SolrResourceLoader.findClass(
    	... 32 more

    while trying to surf in http://localhost... we get "severe SOLR configuration error"


    We do really need to have solr working for several ez websites

    Thank you for your help,
    • Re: still not working

      I can't say if this is the same problem but I just got the same error (GRAVE: org.apache.solr.common.SolrException: Error loading class 'org.ezsystems.solr.handler.ezfind.eZFindRequestHandler).

      The directory extension/ezfind/java/solr/lib/ was missing and, with it, the file ezsystems-ezfind-solr-extension-2.1.jar.
      I kinda messed up using SVN to transfer eZFind from one box to another.

      mes deux centimes de franc ...
  • Typo in solr.xml

    It seems that the line which says:

    <solr persistent="true" shareLib="lib">

    has a typo. I've had much more success using

    <solr persistent="true" sharedLib="lib">

    (shared, not share)
  • My Multi-Core Woes [RESOLVED]

    I was able to get mult-core installed with the instructions above. But the search did not work for my sites. My check list looked like this.

    Solr running: OK,
    Solr Administration Pages working: OK,
    Index with updatesearchindexsolr.php: OK,?
    Synchronize from site_admin: FAILED,
    Search results from site: FAILED,


    Make a change to each sites extension/ezfind/settings/solr.ini . add /<corename> to the end of each SearchServerURI like below:

    # Base URI of the Solr server

    You must then re-index each site with php extension/ezfind/bin/php/updatesearchindexsolr.php -s site_admin
  • news

    good stories and articles contained in this article, your post is very good and interesting I always read what is in this blog. I hope more and more other interesting articles that I can read and an inspiration for me . . . . . . . . . .