Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danreb
Copy link
Contributor

@danreb danreb commented Jan 7, 2025

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.

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.
@danreb danreb requested a review from a team as a code owner January 7, 2025 05:57
@danreb danreb changed the title Add instructions for custom configuration Add instructions for Solr 8 custom configuration Jan 7, 2025
Copy link

⚡ 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
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@rachelwhitton rachelwhitton self-assigned this Jan 8, 2025
@@ -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.

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.

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants