Information for: DEVELOPERS   PARTNERS

Using multiple search cores

Multiple Acquia Search cores

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

Note

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 core. You can override this default.

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

  • 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 core is found

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

  • No valid core is found

    If you do not define a valid Solr core for an environment, the connection will switch to read-only mode on the production core. 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 core in your subscription, the modules will connect in read-only mode to the production core 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 core, even though you cannot change, add, or delete content. Without this protection, the non-production website may delete or otherwise corrupt your production Solr core 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 cores 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 Integration 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 core. Contact Acquia Support for help.