This project is not covered by Drupal’s security advisory policy.

Pantheon Solr API lets multiple Drupal sites share a single Solr search index hosted on Pantheon. One site — the "hub" — owns the Solr server and exposes it as an authenticated HTTP proxy. Any number of other sites — "clients" — connect to that proxy through the companion Search API Solr Proxy module. The result is unified, cross-site search powered by a single managed Solr instance, without each site needing its own Solr server.

This module is not affiliated with or endorsed by Pantheon.

Features

  • Shared Solr index across multiple sites. One hub site exposes its Pantheon-managed Solr 8 server, and any number of client sites index into and query from it. All sites appear in a single search result set.
  • Lightweight SELECT proxy. Search queries bypass Drupal's bootstrap entirely and are handled by a standalone PHP script (pantheon-solr-proxy.php) copied to the hub's web root. Typical query overhead is ~5 ms.
  • Secure API-key authentication. Every request between a client and the hub carries a shared key via the X-Pantheon-Solr-Key HTTP header. The key is stored as a Pantheon Secret (via the Pantheon Secrets module) so it never touches version control.
  • Centralised schema management. The Solr schema is posted once from the hub with drush sapi-pc. Client sites opt out of schema management automatically.
  • Admin UI and Drush integration. A settings page at /admin/config/search/pantheon-solr-api lets you configure the API key. Two Drush commands — pantheon-solr-api:list-clients and pantheon-solr-api:update-index — help you manage registered client sites from the command line.
  • Client self-registration. Client sites call drush pantheon-solr-proxy:register (from the companion connector module) to register themselves with the hub. No manual config-sync step required.

When to use this module: When you run a Pantheon-hosted multisite or a network of related Drupal sites and want a single, unified search experience across all of them without paying for or managing a separate Solr server for each site.

Post-Installation

This module is installed on the hub site only. After enabling it:

  1. Copy pantheon-solr-proxy.php from the module directory to your hub site's web root and commit it.
  2. Create a Pantheon org-level secret (PANTHEON_SOLR_API_KEY) via Terminus, then create a matching Key entity using the Pantheon Secret key provider.
  3. Visit /admin/config/search/pantheon-solr-api and select that Key entity.
  4. Run drush sapi-pc on the hub to post the Solr schema.
  5. On each client site, install Search API Solr Proxy Pantheon Connector, create a Search API server with the "Pantheon Solr Proxy" connector, and run drush pantheon-solr-proxy:register.

Full step-by-step instructions are in the module's README.md.

Additional Requirements

Recommended modules/libraries

  • Search API Solr Proxy — required on every client site; provides the abstract connector framework and the Pantheon-specific submodule.
  • Search API Pantheon — the standard single-site Pantheon Solr integration. Not required here, but a good reference for understanding how Pantheon exposes Solr.

Similar projects

  • Search API Pantheon connects a single Drupal site directly to its own Pantheon-managed Solr server. This module solves the different problem of sharing one Solr server across multiple sites.
  • Search API Solr Multisite (part of Search API Solr) supports federated search across independent Solr cores but requires each site to have its own Solr server. This module uses a single shared server via a proxy instead.

Supporting this Module

This module is developed and maintained by Aten Design Group. If it saves you time, consider hiring us for your next Drupal project.

Community Documentation

  • Full hub setup guide: README.md in the module repository
  • Client site setup: search_api_solr_proxy_pantheon_connector/README.md
Supporting organizations: 
Development

Project information

Releases