Tuesday, April 03, 2018

Solr 7 TieredMergePolicyFactory

If you get this error when using Solr 7 in cloud mode when you try to create the collection about the TieredMergePolicyFactory:

"Caused by: solr.TieredMergePolicyFactory"

The reason maybe it failed to load the class and this is because the example solr config file has an error in it:

        <mergePolicyFactory class="solr.TieredMergePolicyFactory">
          <int name="maxMergeAtOnce">10</int>
          <int name="segmentsPerTier">10</int>
        </mergePolicyFactory>

This is what worked for me:

        <mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
            <int name="maxMergeAtOnce">10</int>
            <int name="segmentsPerTier">10</int>
        </mergePolicyFactory>