-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions for Solr 8 custom configuration #9366
base: main
Are you sure you want to change the base?
Conversation
The Support team often receive chat and ticket regarding instruction how to edit Solr 8 configuration files and this will be a good addition to our documentation and will be a big help for our CSE and customers.
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9366-documentation.appa.pantheon.site |
@@ -259,6 +259,19 @@ This occurs because both repositories contain a package called `drupal/search_ap | |||
|
|||
This error occurs after installing `search_api_pantheon` for Drupal using Composer. If you receive this error, you should switch to the [Drupal Composer-managed Upstream](https://github.com/pantheon-upstreams/drupal-composer-managed). See [Switch Your Custom Upstream](/guides/custom-upstream/switch-custom-upstream) for instructions on how to do this. | |||
|
|||
### Editing Solr Configuration files | |||
|
|||
There are instances where you want to edit the configuration file like `schema.xml` or `synonyms.txt` to customize the search results. The [Search API Solr](https://www.drupal.org/project/search_api_solr) module provided these configuration files via a [jump-start config set](https://git.drupalcode.org/project/search_api_solr/-/tree/4.x/jump-start/solr8/config-set?ref_type=heads). Installing the module in your Drupal sites will allow you to see these configuration files in the path `/code/web/module/contrib/searc_api_solr/jump-start/solr8/config-set`. If you need to edit any of the files, you need to copy the folder to a different location to prevent your changes from being overwritten for any future module update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here. searc_api_solr
should be search_api_solr
.
3. Alternatively, change the Solr Schema version name, so there is a differentiator to your custom configuration from the default. Please take a look at this [link](https://git.drupalcode.org/project/search_api_solr/-/blob/4.x/jump-start/solr8/config-set/schema.xml?ref_type=heads#L52) e.g. from this → `<schema name="drupal-4.3.5-solr-8.x-1" version="1.6">` to this` <schema name="drupal-4.3.5-solr-8.x-1-CUSTOM-IDENTIFIER" version="1.6">` **note:** change the word “CUSTOM-IDENTIFIER” to anything that describes your custom config. | ||
4. Commit the changes, it is recommended to test this in a multidev site. | ||
5. Go to the Search API Pantheon Admin interface and repost the Solr Schema specifying the path of your custom configuration, in this example, it is `/code/solr/config`. | ||
6. Wait for **5 minutes** for the configuration to take effect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other indicator that can be used to confirm the schema has been posted? 5 minutes is somewhat arbitrary. Not the end of the world, but it would be a bit more comforting to see a "success" confirmation of the process... somewhere.
5. Go to the Search API Pantheon Admin interface and repost the Solr Schema specifying the path of your custom configuration, in this example, it is `/code/solr/config`. | ||
6. Wait for **5 minutes** for the configuration to take effect. | ||
7. After making sure the site uses the new Solr configuration, **reset the index tracker** and then **re-index** the site. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps include common Drupal admin-page URL paths, on which re-indexing can be triggered? It would save new Drupal users some potential headache.
The Support team often receive chat and ticket regarding instruction how to edit Solr 8 configuration files and this will be a good addition to our documentation and will be a big help for our CSE and customers.
Summary
Using Solr 8 on the Latest Version of Drupa - Instruction for customizing Solr 8 configuration files.