SolrCloud with Legacy Configuration Files

If you are migrating from a non-SolrCloud environment to SolrCloud, this information may be helpful.

All of the required configuration is already set up in the sample configurations shipped with Solr. You only need to add the following if you are migrating old configuration files. Do not remove these files and parameters from a new Solr instance if you intend to use Solr in SolrCloud mode.

These properties exist in 3 files: schema.xml, solrconfig.xml, and solr.xml.

  1. In schema.xml, you must have a _version_ field defined:

    <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
  2. In solrconfig.xml, you must have an UpdateLog defined. This should be defined in the updateHandler section.

    <updateHandler>
      ...
      <updateLog>
        <str name="dir">${solr.data.dir:}</str>
      </updateLog>
      ...
    </updateHandler>
  3. The DistributedUpdateProcessor is part of the default update chain and is automatically injected into any of your custom update chains, so you don’t actually need to make any changes for this capability. However, should you wish to add it explicitly, you can still add it to the solrconfig.xml file as part of an updateRequestProcessorChain. For example:

    <updateRequestProcessorChain name="sample">
      <processor class="solr.LogUpdateProcessorFactory" />
      <processor class="solr.DistributedUpdateProcessorFactory"/>
      <processor class="my.package.UpdateFactory"/>
      <processor class="solr.RunUpdateProcessorFactory" />
    </updateRequestProcessorChain>

    If you do not want the DistributedUpdateProcessFactory auto-injected into your chain (for example, if you want to use SolrCloud functionality, but you want to distribute updates yourself) then specify the NoOpDistributingUpdateProcessorFactory update processor factory in your chain:

    <updateRequestProcessorChain name="sample">
      <processor class="solr.LogUpdateProcessorFactory" />
      <processor class="solr.NoOpDistributingUpdateProcessorFactory"/>
      <processor class="my.package.MyDistributedUpdateFactory"/>
      <processor class="solr.RunUpdateProcessorFactory" />
    </updateRequestProcessorChain>

    In the update process, Solr skips updating processors that have already been run on other nodes.

Comments on this Page

We welcome feedback on Solr documentation. However, we cannot provide application support via comments. If you need help, please send a message to the Solr User mailing list.