Upgrading to Solr 9.x

Learn how to upgrade to the latest Solr version. If you're using Solr 8, we encourage you to upgrade to Solr 9.x at your earliest convenience.

Context

This upgrade procedure includes two sections. One section covers upgrading from Solr 8.11 to 9.7. The other section outlines additional steps for upgrading to Solr 9.8.

Follow the steps to upgrade from Solr 8.11 to 9.x:

Procedure

  1. Update the Solr version to 9.x in your manifest.json file.
  2. If you have custom Solr configuration, update the following information in the specified files:
    1. {SOLR_INSTANCE_DIR}/configsets/default/schema.xml

      Version 8.11

      Version 9.7

      <schema name="default" version="8.11">

      <schema name="default" version="1.6">

    2. {SOLR_INSTANCE_DIR}/configsets/default/solrconfig.xml

      Version 8.11

      Version 9.x

      <luceneMatchVersion>8.11.2</luceneMatchVersion><lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" regex=".*\.jar" />
      														<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" regex=".*\.jar" />
      														<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-analysis-extras-\d.*\.jar" /><lib dir="${solr.install.dir:../../../..}/contrib/hybris/lib" regex=".*\.jar" />
      <luceneMatchVersion>9.9</luceneMatchVersion>
      														<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" regex=".*\.jar" />
      														<lib dir="${solr.install.dir:../../../..}/modules/hybris/lib" regex=".*\.jar" /> 
      <filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0" />
      														<queryResultCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0" />
      														<documentCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0" />
      														<cache name="perSegFilter" class="solr.search.LRUCache" size="10" initialSize="0" autowarmCount="10"
      														regenerator="solr.NoOpRegenerator" /> 
      <filterCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" />
      														<queryResultCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" />
      														<documentCache class="solr.CaffeineCache" size="512" initialSize="512" autowarmCount="0" />
      														<cache name="perSegFilter" class="solr.CaffeineCache" size="10" initialSize="0" autowarmCount="10"
      														regenerator="solr.NoOpRegenerator" />  
    3. {SOLR_INSTANCE_DIR}/solr.xml

      Version 8.11

      Version 9.x

      <str name="zkCredentialsProvider">${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}</str>
      															<str name="zkACLProvider">${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}</str>
      <str name="zkACLProvider">${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}</str>
      														<str name="zkCredentialsProvider">${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}</str>
      														<str name="zkCredentialsInjector">${zkCredentialsInjector:org.apache.solr.common.cloud.DefaultZkCredentialsInjector}</str> 
      													
  3. If you have modified other configuration files provided by Solr out-of-the-box, update them with the new Solr 9 configuration files. For example, the jetty.xml file.

Next Steps

Once you've completed the steps for one of the upgrade scenarios, re-index the data. There isn't any downtime, but it's always recommended to index the data again.

Upgrading to Solr 9.8

Upgrading to Solr 9.8 from any previous release requires additional steps described in the procedure below.

Procedure

Because <lib> directive support is removed from solrconfig.xml, the current solr internal module configuration needs to be migrated from solrconfig.xml to solr.xml.
Before Migrating to 9.8 (for versions below 9.8) After migrating to 9.8

Changes to solrconfig.xml

solr.xml

<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" regex=".*\.jar" />
										<lib dir="${solr.install.dir:../../../..}/modules/hybris/lib" regex=".*\.jar" />  
<str name="modules">${solr.modules:analysis-extras,hybris}</str> 

The numVersionBuckets setting is now obsolete and should be removed.

<int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>