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

Allow support for SOLR 8.x in Drupal 7 set-up. #212

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

Conversation

johnrosswvsu
Copy link

@johnrosswvsu johnrosswvsu commented Mar 5, 2025

Allow support for SOLR 8.x support in Drupal 7 set-up.

Before merging this PR, check the build results on CircleCI, and then visit the test site and confirm that the correct version of Drupal was, in fact, installed and tested.

Optionally, you may also create your own test site:

  • Create a new Drupal 7 site on Pantheon.
  • When site creation is finished, visit dashboard.
  • Switch to "git" mode.
  • Clone your site locally.
  • Apply the files from this PR on top of your local checkout.
    • git remote add drops-7 git@github.com:pantheon-systems/drops-7.git
    • git fetch drops-7
    • git merge drops-7/update-7.95
  • Push your files back up to Pantheon.
  • Switch back to sftp mode.
  • Visit your site and step through the installation process.

Setting Up SOLR 8.x in Drupal 7 From Scratch

  • Install the following modules (use the latest versions if needed):
    • Chaos Tools Suite version: 7.x-1.21
    • Entity API version: 7.x-1.11
    • Search API version: 7.x-1.29
    • Search API Solr version: 7.x-1.16
  • Request Pantheon to remove the Git hook blocking the use of SOLR 8 in Upstream Drupal 7 sites. This is assuming Pantheon has not removed this block globally yet.
  • Update Upstream to use SOLR 8, once the previous step is done.
  • Push your files back up to Pantheon.
  • In your site, enable the following modules:
  • Configure Pantheon Apache Solr (this can be skipped in outside Pantheon):
    • Configuration > Search and Metadata > Pantheon Apache Solr > Post schema.xml (tab)
    • Choose sites/all/modules/contrib/search_api_solr/solr-conf/8.x/schema.xml (recommended) and click Post schema.
    • After waiting for a few minutes confirm if the configuration is updated by checking the Status tab beside (left) the Post schema.xml.
    • Check some test queries by checking the Execute query tab beside (right) the Post schema.xml.
  • Configure Search API or create new server and index configuration:
  • Configuration > Search and Metadata > Search API
    • Add a new server, using Solr service Service class.
    • Set configuration using this suggested values for Pantheon (change values accordingly if outside Pantheon):
      • HTTP protocol: https
      • Solr host: localhost
      • Solr port: 8983
      • Solr path: /solr
    • Add a new server, using Solr service Service class.
    • Set configuration using this suggested values:
      • Enabled: true
      • Server: the new server created above.
      • The rest of the settings is based on user preference. I.e. Index items immediately, inclusive Fields, Highlighting in Filters.
  • Index the contents, if there are any.
  • Create a Views display that uses the Indexing with an exposed filter for the query string.

Sample: https://dev-drupal7-solr.pantheonsite.io/search

Switching from SOLR 3.x to SOLR 8.x in Drupal 7

  • Update the site using the latest Drops 7 code base (with these code changes included). (Or at least the Pantheon project only inside the modules directory).
  • Apply the patch for Search API Solr (If not yet incorporated to the latest version, apply the patch found in https://www.drupal.org/project/search_api_solr/issues/3254212#comment-16017066).
  • Assuming the pre-existing Drupal 7 site used the default SOLR configurations for 3.x, then it is assumed that the 8.x SOLR configurations should be used. If there are customizations use the template for 8.x and apply the customizations.
  • Configure Pantheon Apache Solr:
    • Configuration > Search and Metadata > Pantheon Apache Solr > Post schema.xml (tab)
    • Choose sites/all/modules/contrib/search_api_solr/solr-conf/8.x/schema.xml (recommended) and click Post schema.
    • After waiting for a few minutes confirm if the configuration is updated by checking the Status tab beside (left) the Post schema.xml.
    • Check some test queries by checking the Execute query tab beside (right) the Post schema.xml.
  • Run any pending Search API tasks if there are alerts to this effects.
  • Reindex site contents.

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.

1 participant