Skip to main content
Last Reviewed: 2026-03-31

Customize Solr Config

Steps for how to apply customized Solr configuration on Pantheon.


Before you begin

Ensure you have installed the Search API Pantheon module before proceeding.

Apply Custom Solr Configurations

There are instances where you may want to edit the configuration file like schema.xml or synonyms.txt to customize the search results. The Search API Solr module provides these configuration files via a jump-start config set.

  1. Copy the config-set folder to a new directory inside /code (e.g. /code/solr/config).
Information:
Note

Relocating these files outside of the web/modules/contrib/search_api_solr path ensures your custom configurations will not be overwritten by future module updates.

  1. Edit the necessary file (e.g.synonyms_en.txt) or any configuration files you want to customize.

(Optional) Modify the Solr Schema version name, so there is a differentiator to your custom configuration from the default (e.g., drupal-4.3.5-solr-8.x-1-YOUR-CUSTOM-IDENTIFIER).

  1. Commit the changes, it is recommended to test this in a multidev environment.

  2. Post the custom schema to the Solr server using the Drush command with the path to your custom config set:

  3. Pantheon's platform checks for updated Solr configurations every 5 minutes. Wait 5 minutes to ensure your new custom configuration has been detected and applied by the platform before proceeding to the next step.

  4. After making sure the site uses the new Solr configuration, go to /admin/config/search/search-api and select your index, then click Rebuild tracking information and then click Index now.

Reloading Solr Core

Reloading Solr Core would be helpful if synonyms or other Solr config that you've recently posted isn't reflecting even after reindexing your site. Enable the module search_api_solr_admin and then execute the Drush command to reload the Solr server.

Using Drush

Using the Drupal Admin UI

  1. Go to /admin/modules
  2. Enable Search API Solr Admin
  3. Go to /admin/config/search/search-api
  4. Click the server you want to reload
  5. You'll be able to see the Reload Core button and you can simply click and confirm to reload
  6. Reindex the site to apply any changes