Pantheon Solr API
This project allows multiple Drupal sites hosted on Pantheon to share a single Solr search index. One site acts as a central "hub" that manages the Solr server and exposes it through a proxy, allowing other "client" sites to connect and index or query data, resulting in unified search results across all connected sites.
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-KeyHTTP 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-apilets you configure the API key. Two Drush commands —pantheon-solr-api:list-clientsandpantheon-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:
- Copy
pantheon-solr-proxy.phpfrom the module directory to your hub site's web root and commit it. - Create a Pantheon org-level secret (
PANTHEON_SOLR_API_KEY) via Terminus, then create a matching Key entity using the Pantheon Secret key provider. - Visit
/admin/config/search/pantheon-solr-apiand select that Key entity. - Run
drush sapi-pcon the hub to post the Solr schema. - 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
- Drupal 10.2 or 11
- Solr 8 enabled in
pantheon.ymlon the hub site - Search API
- Search API Solr
- Key
- Pantheon Secrets
- Terminus with the Secrets Manager Plugin (for provisioning the API key)
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.mdin the module repository - Client site setup:
search_api_solr_proxy_pantheon_connector/README.md
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | Mar 26, 2026 |