Cloud Platform

Using multiple search indexes

Acquia Search supports the use of separate search indexes, both by Cloud Platform environment or multisite instance. Separate search indexes allows each environment of your application to have its own separate search index, enabling development and testing using independent Solr configuration and data.

Note

  • Only Enterprise and Elite subscriptions on Cloud Platform are entitled to multiple Solr indexes for a subscription. Other subscribers can choose to share their single Solr index across websites and environments.

  • Although this feature requires at least Acquia Connector version 8.x-1.12 or 7.x-3.1, Acquia recommends you use specific versions of Drupal modules for Acquia Search with your Acquia Search subscription.

  • For information about using Acquia Search with Site Factory, see Using Acquia Search with Site Factory.

  • Cloud Platform CD environments don’t include dedicated search indexes. Acquia recommends reusing any available Solr index from your subscription to test Acquia Search from an on-demand environment. For more information, see Overriding Solr index connection switching.

Per-environment connection behavior

The deprecated Acquia Search Multiple Indexes module previously provided this feature. You should disable this module.

The Drupal modules for Acquia Search detect the current application’s environment and then connect to the ideal Acquia-hosted Solr index. You can override this default.

As an example, if your current Acquia subscription (named in this example ABCD-12345) has three Solr indexes:

  • ABCD-12345.dev.default (Development)

  • ABCD-12345.test.default (Staging)

  • ABCD-12345.prod.default (Production)

and you try to copy a website between environments, one of the following actions will occur:

  • A valid index is found

    An Acquia-hosted website running in the development environment in the sites/default directory will use the ABCD-12345.dev.default index. If you copy this website to your test environment, the Solr connection will switch to the ABCD-12345.test.default index.

  • No valid index is found

    If you do not define a valid Solr index for an environment, the connection will switch to read-only mode on the production index. This change allows the environment to use search features, while protecting your production Solr data from modification by other environments. Without this protection, you could potentially corrupt or pollute your search data, or even cause security issues by exposing privileged information in unexpected ways.

    As an example, if you copy your Acquia-hosted production website to an Acquia-hosted environment named QA and if there is no defined QA Solr index in your subscription, the modules will connect in read-only mode to the production index at ABCD-12345.prod.default.

    When the Acquia Search modules enable read-only mode on a connection, your website can still run searches against an Acquia Search Solr index, even though you can’t change, add, or delete content. Without this protection, the non-production website may delete or otherwise corrupt your production Solr index as you edit and delete content, run indexing, or run cron on your non-production environment. Your visitors will begin to see non-production results on search pages on your production website, for which the only fix is to reindex Solr for the production website.

    Note

    If your website’s Solr connection remains in read-only mode, see Troubleshooting multiple search indexes for tips on resolving the issue.

Reviewing the current Acquia Search connection status

To determine the current connection status of your website’s connection, you can use the Drupal administrative interface and examine the Connection status dialog box.

As a Drupal administrator, use one of the following methods to determine the connection status:

  • Sign in to the Drupal administrative interface for your website.

  • Navigate to Reports > Status report for a summary of your connections.

  • If you are using the Search API module: Navigate to Configuration > Search API, and then click each server name.

  • If you are using the Apache Solr Search module: Navigate to Configuration > Apache Solr search, and then click Edit for each displayed environment.

Your issue may require more troubleshooting if there is a problem connecting to the index. Create a Support ticket for help.

Acquia Help

Filter by product:

Cloud Platform common questions

If you can't find what you're looking for, try refining your search or contact our Support teamfor further assistance.