You are here

Installing and configuring Solr shards

Follow these steps to set up sharding of a non-sharded index or change the number of instances of an already sharded index.
Do not use SSL with sharding.
  1. Create machines to host Solr shards.
    1. These machines are basically application servers that hosts Solr webapp. If you install multiple Solr webapps on the same machine, each Solr instance must have a different configuration. In the solr4.xml file, edit the following parameters so that all Solr instances point to different root directories for each node:

      • solr/home
      • solr/model/dir
      • solr/content/dir

      Note: All the Solr instances hosting shards on a given host must have separate model and index contentstore locations.
  2. Install and start Alfresco One 5.1. For more information, see Installing Alfresco using setup wizards.
  3. Delete the existing Solr indexes from the installation.

    Delete the alfresco and archive cores using the following commands:

  4. Add any custom core templates. For more information, see Core templates.
  5. Configure the <SOLR_HOME>/conf/ file. For more information, see About file.
  6. Start the Solr server.
  7. Create your new index shards and instances by configuring the properties on the URL.

    This URL configures a sharded cluster that contains 10 shards, 1 node, and 1 instance of each shard. The following options must be used in the URL:
    • numShards specifies the number of logical shards.
    • numNodes specifies the total number of Solr nodes.
    • nodeInstance is the actual Solr instance corresponding to that host:port.
    • template defines the basic configuration for a new Solr core with some configuration properties. For more information, see Core templates.
    • storeRef specifies reference to a node store.

    When you install Alfresco One 5.1.5 using the installer, the templates used to create shards do not use the port specified in the installer. Here's an example to show how to set a non-SSL port manually when creating a shard.

    Example: If you want a sharded Solr installation with a different Tomcat port (8090), set the property.alfresco.port property on the URL used to create the shard. The property.alfresco.port property specifies the port used to communicate with the repository (or repositories through a load balancer). This property can also be set if communicating through a different host or load balancer. In this example, we will set property.alfresco.port=8090, as shown below:

  8. The Solr cores will register and start tracking the indexes.

    If there are two indexes for the same store, the old index will be used until both the indexes are at the same state. Thereafter, both the indexes will be used.

  9. Set the following properties in the file.

  10. Restart Alfresco.
  11. You can turn off any old indexes from tracking. To do so, wait for the instances to time out and let the new index to be up-to-date. Alternatively, navigate to the JMX sharding operations and clear out all the registered shards, and start again.
You have a new live index.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.