Prerequisites
The following are the prerequisites for using Acquia Search on your website:
Review the information on the Acquia Search module page.
Ensure that you upgrade to Acquia Search 3.0.9 before upgrading to Acquia Search 3.1.0+.
Prepare a local, virtual development environment for the project.
Install the Git, Composer, and Drush applications to use with your development environments:
Create an SSH key for your user, and provide access to that key to your Cloud Platform environment.
Installing Acquia Search Drupal modules
To install the Drupal modules to enable the use of Acquia Search:
Note
Acquia requires using the Acquia Connector module with Acquia Search. Installing the Acquia Connector module gives you simplified and automatic configuration of Search. Using Composer to install Acquia Search automatically pulls in the associated required version of Acquia Connector.
Install the Acquia Search module:
composer require "drupal/acquia_search:^3"
Enable the Acquia Search module:
drush en acquia_search
Configuring Acquia Search
To configure Acquia Search after deploying code to your Cloud Platform application:
Sign in to the deployed website.
Alternately, sign in to your website using SSH and run the following Drush command from your website’s docroot directory:
drush updatedb
Connecting to Acquia Search
To connect to Acquia Search:
Create a new Solr index for the desired database and environment through the Cloud UI.
Sign in to your website with the Acquia Search modules.
Navigate to Configuration > Search and Metadata > Search API.
The system displays the Search API settings page. If you have installed and configured Acquia Connector, you can skip to the last step.
Note
The Acquia Search module connects with the index automatically if the Search index was previously created for the configured Drupal application.
If the index is recognized, navigate to the Acquia Search settings configuration page and click Save configuration. The search index is connected to your Drupal application. If the Search index is not automatically identified, ensure that the Solr index exists in your Cloud Platform user interface.
On the Search API page, click Acquia Search API Solr server.
The system displays the Acquia Search API Solr server configuration page.
On the Acquia Search Status for this connection callout box, the expected Search index name is displayed in the following format:
ABCD-1234.[env].[your-website-name]
If you see an error, confirm that you have created the index for the desired environment and database name.
If you cannot add the expected Search index name in the Manage Search Indexes option in the Cloud Platform user interface (for example, for a local site or a site running inside a Cloud IDE or CDE), add a code override. For more information, see Specify the index override.
Configuring the index
To configure the index:
In the Operations menu, click Edit and select the Acquia Search API Solr server as the Server for the index.
Note
From Index Options, verify that the Read only option for the Acquia Search API Solr index is disabled. If not, indexing does not work.
Click Save configuration to save the index.
The website redirects you to the Search API page.
From the Operations menu, click Enable to enable the index.
Indexing site content
To index your site content:
On your website, from the Search API page, click the index name to open the index detail page.
Click Queue all items for reindexing.
Acquia Search displays a confirmation page that prompts you to confirm the reindexing attempt.
Click Confirm.
The system redirects you to the index details page.
Scroll to the end of the page and click Index now.
The Index status displays the number of items indexed out of the total number of items in the index. When the reindexing is complete, Acquia Search displays a banner message to indicate that the reindexing is completed as expected.
You have completed the installation of Acquia Search for your Drupal website.
For troubleshooting and Drush commands, see: