-
Notifications
You must be signed in to change notification settings - Fork 24
Home
Solr at Pantheon
graph TD
A[Solr Server] -->
B[Index] --> C{search_api_pantheon}
C -->|views| D[Search Form]
C -->|views| E[Search Page]
C -->|views| F[Robots]
H --> | Create Schema | G[search_api_pantheon_admin] --> |Post Schema| A
H[search_api_solr] --> C --> |indexed fields| B
I[Search_api] --> H
J[Drupal Entities] --> I
A --> |Status / Health| G
This module is for you if you meet the following requirements:
-
Using Drupal 9.2+
-
Hosting the Drupal site on Pantheon's platform
-
Your site uses
composer
to install modules and upgrade Drupal core using one of the following integrations:-
Pantheon's integrated composer (
build step: true
in your pantheon.yml) -
A Continuous Integration service like Circle CI or Travis
-
-
Have Dashboard access to the platform (necessary to deploy code changes)
This module is meant to simplify the usage of Search API and Search API Solr on Pantheon's Platform.
Search API Solr provides the ability to connect to any Solr server by providing numerous configuration options. This module automatically sets the Solr connection options by extending the plugin from Search API Solr. The module also changes its connection information based on different Pantheon environments and each Pantheon Environment has it's own SOLR CORE. Doing so eliminates the need to do extra work setting up Solr servers for each environment.
This module provides Drupal 9 integration with the Apache Solr project. Pantheon's current version as of the update of this document is 8.8.1.
Composer is the way you should be managing your drupal module requirements. This module will install its dependencies when you use composer to install.
-
Solarium. Solarium is a Solr client library for PHP and is not Drupal-specific. First, register Drupal.org as a provider of Composer packages. This command should be run locally from the root directory of your Drupal 8 git repository.
-
Search API. Search API is Drupal's module for indexing content entities.
-
Search API Solr. Search API Solr makes search API work with Apache Solr. Composer will manaage which version
-
Guzzle. Guzzle version 6 is standard with Drupal Core
8.x | 9.x
(read 8.x OR 9.x).
To require this module in your composer file:
composer require pantheon-systems/search_api_pantheon ^8 --prefer-dist
Install the module and push an updated composer.lock file to your pantheon environment.
See the Drupal.org for complete documentation on Search API. To configure the connection with Pantheon, do the following steps on your Dev environment (or a Multidev):
-
Enable Solr on your Pantheon site
- Under "Settings" in your Pantheon site dashboard, enable Solr as an add on. This feature is available for sandbox sites as well as paid plans at the Professional level and above.
-
Enable Solr 8 in your pantheon.yml file
-
Add the bolded portion to your pantheon.yml file (** SYNTAX NOT FINAL; Use pantheon internal YGG instructions until yml support is final and available in prod **):
php_version: 7.4 database: version: 10.4 drush_version: 10 search: version: 8
As you promote the code, the Pantheon.yml file will follow the code through environments enabling the solr server, However you will need to create an index for each environment and ensure the content is indexed after creation. Indices are specific to the Solr core with/for which they were created. Indices cannot be exported or moved once created.
-