Information for: DEVELOPERS   PARTNERS

Acquia Search with Site Factory

ADVANCED - Incorrect use of this webpage’s content can share search data between websites in your cluster.

For your Site Factory websites to be able to use Acquia Search, you must install the suite of search modules for your version of Drupal.

Note

The instructions vary depending on the Solr version that you plan to use. Acquia recommends using Solr 7 for all new sites. However, you may have reasons to use an older version. For more information about your options, see Acquia Search with Solr 7.

  • If you use Solr 7, you don’t need to share a single search index. Each website in an environment can have its own Solr index, independent of the same site in other environments or some other sites.
  • If you use Solr 3/4, all websites in an environment share a single search index. You must configure your websites to provide website-specific hashes for Acquia Search to return search results for only a single website in your cluster.

Solr 7 Instructions

Note

Cloning or creating a Site Factory site doesn’t create a new Solr index for the site. You must create it manually after creating or cloning a site on your Site Factory Management Console.

Tip

Although enabling Acquia Connector is not necessary, we recommend that you enable it as it fills in the credentials that you would otherwise have to manually copy from the cloud UI.

  1. Add the required modules and configuration to your sites. For more information, see Installing Acquia Search with Solr 7 for Drupal 8 and 9.

  2. Use the Cloud Platform user interface to create indexes for both new and cloned sites. For more information, see Managing search indexes.

    When creating an index, the system requires you to specify the Database name.

  3. Select the option that matches the DB Identifier for the site. To get this value, access Site Factory Management Console and click the I icon on the site’s card. For example, ID 371.

    search_site_factory_1

  4. If you can’t find your DB Identifier in the list, then you must create an index. Copy the suffix and scroll in the list of DB identifiers to find it.

  5. Use an Acquia-provided config set. Ensure that you use the default_drupal-4.1.1-solr-7.x.0 config set.

  6. Click Add to begin the process of creating your search index. It takes a few minutes to complete.

Solr 3/4 Instructions

To configure Acquia Search for multisite use with Site Factory:

  1. Contact Acquia Support to request that search cores be provisioned for each environment in your Site Factory subscription.
  2. Install and configure the recommended search modules for your version of Drupal.
  3. Enable multisite search support using the following steps appropriate for your installed version of Drupal:
  4. To prevent searches from returning results for multiple websites, configure unique hash values for each website, as described in Ensure correct implementation of Solr hashes.

Post completion of these steps, if your websites can’t connect to Acquia Search, see Troubleshooting multiple search cores.

Drupal 7 only: Configuring automated core switching

Once you enable the Acquia Search Multiple Indexes module, confirm that Acquia Search is configured to switch search cores when necessary by performing the steps for your chosen search modules.

Note

The Acquia Search Multiple Indexes module must be enabled or these pages will be inaccessible.

Drupal 7 websites using the Search API module

  1. Ensure that your website is not using any of the code overrides included in the Overriding Solr core automatic connection switching documentation page.
  2. Sign in to your Drupal website as an administrator.
  3. In the top menu, click Configuration.
  4. In the Search and metadata section, click Search API.
  5. Click Edit next to the Server that you want to modify.
  6. Click the Acquia Search section to display its available options.
  7. Click the Configure Acquia Search section to display its available options.
  8. Select the Automatically switch when an Acquia Environment is detected check box.

Drupal 7 websites using the Apache Solr module

  1. Ensure that your website is not using any of the code overrides included in the Overriding Solr core automatic connection switching documentation page.
  2. Sign in to your Drupal website as an administrator.
  3. In the top menu, click Configuration.
  4. In the Search and metadata section, click Apache Solr search.
  5. Click the Settings tab, and then click Edit for the desired search environment.
  6. Click the Configure Acquia Search section to display its available options.
  7. Select the Automatically switch when an Acquia Environment is detected check box.