PHPackages                             pantheon-systems/search\_api\_pantheon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. pantheon-systems/search\_api\_pantheon

ActiveDrupal-module[Search &amp; Filtering](/categories/search)

pantheon-systems/search\_api\_pantheon
======================================

Connection module for Pantheon Search

8.5.0(1mo ago)11840.5k↓72.5%27[6 issues](https://github.com/pantheon-systems/search_api_pantheon/issues)[4 PRs](https://github.com/pantheon-systems/search_api_pantheon/pulls)GPL-2.0-or-laterPHPPHP &gt;=8.1CI passing

Since Jan 23Pushed 2w ago7 watchersCompare

[ Source](https://github.com/pantheon-systems/search_api_pantheon)[ Packagist](https://packagist.org/packages/pantheon-systems/search_api_pantheon)[ RSS](/packages/pantheon-systems-search-api-pantheon/feed)WikiDiscussions 8.x Synced 2w ago

READMEChangelog (10)Dependencies (9)Versions (149)Used By (0)

Search API Pantheon: Solr 8/9 &amp; Drupal 10+ Integration
==========================================================

[](#search-api-pantheon-solr-89--drupal-10-integration)

[![Search API Pantheon](https://github.com/pantheon-systems/search_api_pantheon/actions/workflows/ci.yml/badge.svg?branch=8.x)](https://github.com/pantheon-systems/search_api_pantheon/actions/workflows/ci.yml)[![Actively Maintained](https://camo.githubusercontent.com/2ae5ff81f271fb028d720adee6b3595770166f3707a4705a4a2a3b71c332b249/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50616e7468656f6e2d4163746976656c795f4d61696e7461696e65642d79656c6c6f773f6c6f676f3d70616e7468656f6e26636f6c6f723d464644433238)](https://pantheon.io/docs/oss-support-levels#actively-maintained-support)

Table of Contents
-----------------

[](#table-of-contents)

- [Overview](#overview)
- [Requirements](#requirements)
- [Installation](#installation)
- [Upgrading](#upgrading)
- [Setup](#setup)
- [Schema Updates](#schema-updates)
- [Core Reloading](#core-reloading)
- [Pantheon Environments](#pantheon-environments)
- [Diagnostic Commands](#diagnostic-commands)
- [Troubleshooting](#troubleshooting)
- [Solr Jargon](#solr-jargon)
- [Feedback and Collaboration](#feedback-and-collaboration)

Overview
--------

[](#overview)

This module provides [Drupal 10+](https://drupal.org) integration with [Apache Solr](https://solr.apache.org/) (versions 8 and 9) on [Pantheon](https://pantheon.io)'s Platform, simplifying the usage of [Search API](https://www.drupal.org/project/search_api) and [Search API Solr](https://www.drupal.org/project/search_api_solr).

Search API Solr provides the ability to connect to any Solr server by providing numerous configuration options. This module automatically sets the Solr connection options by extending the plugin from Search API Solr. The module also changes its connection information based on different Pantheon environments and each Pantheon Environment has its own [Solr Core](#solr-jargon). Doing so eliminates the need to do extra work setting up Solr servers for each environment.

### Solr Versions on Pantheon

[](#solr-versions-on-pantheon)

- Solr 8: [Apache Solr 8.11.4](https://solr.apache.org/docs/8_11_4/)
- Solr 9: [Apache Solr 9.10.1](https://solr.apache.org/docs/9_10_1/)

Requirements
------------

[](#requirements)

- Drupal 10 or 11
- PHP 8.1 or later (tested through PHP 8.5)
- [Search API Solr](https://www.drupal.org/project/search_api_solr) 4.3.x
- Hosting on Pantheon's platform
- Composer-based workflow using one of the following:
    - Pantheon's integrated composer (`build step: true` in your pantheon.yml)
    - A CI/CD service (e.g., GitHub Actions, CircleCI)
- Dashboard access to the platform (necessary to deploy code changes)

Installation
------------

[](#installation)

### Stable Release

[](#stable-release)

```
composer require 'drupal/search_api_pantheon:^8'
```

### Development Version

[](#development-version)

```
composer require 'drupal/search_api_pantheon:8.5.x-dev@dev'
```

Upgrading
---------

[](#upgrading)

Upgrading from an earlier version? See [UPGRADE.md](UPGRADE.md) for detailed migration guides:

- [Upgrading from 8.4.x to 8.5.x](UPGRADE.md#upgrading-from-84x-to-85x)
- [Upgrading from Solr 8 to Solr 9](UPGRADE.md#upgrading-from-solr-8-to-solr-9)
- [Schema incompatibility with Search API Solr 4.3.x](UPGRADE.md#schema-incompatibility-with-search-api-solr-43x)

Setup
-----

[](#setup)

### Enable Solr on Pantheon

[](#enable-solr-on-pantheon)

Under "Settings" in your Pantheon site dashboard, enable Solr as an add on. This feature is available for sandbox sites as well as paid plans at the Professional level and above.

### Configure pantheon.yml

[](#configure-pantheonyml)

Add or update the following in your `pantheon.yml` file:

```
search:
  version: 9
```

Or, to use Solr 8:

```
search:
  version: 8
```

As you deploy code, the `pantheon.yml` file will follow the code through environments enabling the Solr server. However you will need to create an index for each environment and ensure the content is indexed after creation. Solr indices are environment-specific and cannot be exported or moved once created.

### Enable the Modules

[](#enable-the-modules)

- Go to `admin/modules` and enable "Search API Pantheon."
- Doing so will also enable Search API and Search API Solr if they are not already enabled.

#### OPTIONAL: Disable Drupal Core's search module

[](#optional-disable-drupal-cores-search-module)

If you are using Search API, you probably will not be using Drupal Core's Search module. Uninstall it to save some confusion in the further configuration steps: `admin/modules/uninstall`.

### Verify Installation

[](#verify-installation)

- Navigate in the Drupal interface to `CONFIG` =&gt; `SEARCH & METADATA` =&gt; `SEARCH API`
- Validate that the `PANTHEON SEARCH` server and Primary Index exist and are "enabled".

### Use the Server with an Index

[](#use-the-server-with-an-index)

When you enable the Search API Pantheon module, a **Primary** index is automatically created and linked to the Pantheon search server. You can use this default index or create your own custom index.

**To use the default 'Primary' index:**

- Go to `admin/config/search/search-api` and select the "Primary" index
- Configure fields to be indexed by selecting the "Fields" tab
- Add fields you want to search (e.g., "Title", "Body", etc.)
- Click "Save" to save your field configuration
- Post the schema (see [Schema Updates](#schema-updates) below)
- Click "Index now" to populate the index with your content. Alternatively, content will be indexed automatically when cron runs.

**To create a custom index:**

- Go to `admin/config/search/search-api/add-index`
- Name your index and choose a data source. If this is your first time using Search API, start by selecting "Content" as a data source. That option will index the articles, basic pages, and other node types you have configured.
- Select "Pantheon Search" as the server
- Save the index
- Configure fields to be searched by selecting the "Fields" tab. You may want to index many fields. "Title" is a good field to start with.
- Click "Save" to save your field configuration
- Post the schema (see [Schema Updates](#schema-updates) below)
- Click "Index now" to populate the index with your content. Alternatively, content will be indexed automatically when cron runs.

### Search the Index

[](#search-the-index)

- Create a new view using the search index of type 'Index'.
- Add fields to be included in the search results. Include the 'relevance' field to enable sorting by relevance.
- Expose the search keywords filter to allow users to enter search terms.
- Sort results by the "relevance" field. Solr assigns higher relevance ratings to documents that better match the search terms.

### Export Your Changes

[](#export-your-changes)

It is a best practice in Drupal to export your changes to `yml` files. Using Terminus while in SFTP mode, you can run `terminus drush . -- "config:export -y"` to export the configuration changes you have made. Once committed, these changes can be deployed out to Test and Live environments.

Schema Updates
--------------

[](#schema-updates)

The default schema Pantheon provisions with a new Solr container depends on the Solr version:

- **Solr 9:** The 4.3.10 version of the Solr 9 jump-start config-set from Search API Solr module
- **Solr 8:** The 4.2.1 version of the Solr 8 jump-start config-set from Search API Solr module

**When you first create your index or alter it significantly, you will need to update the schema on the Solr server.**

Running with an outdated schema can cause broken search, indexing errors, and missing features such as highlighting or autocomplete. Specifically, you should update the schema:

- After initial module installation
- After adding new Solr field types (e.g., custom analyzers or tokenizers) that are not already defined in the schema
- After upgrading `search_api_solr` to a version that changes the generated schema (e.g., 4.2.x → 4.3.x)
- After switching Solr versions (8 ↔ 9) — see [UPGRADE.md](UPGRADE.md)
- After enabling or disabling Search API Solr sub-modules (e.g., multilingual, autocomplete)

Schema updates can be performed using:

```
terminus drush . -- search-api-pantheon:postSchema [path]
```

The `[path]` argument is optional. Provide it only if you want to use a custom config-set directory. If omitted, the module uses Search API Solr to generate config files that match your installed module version and Solr version.

Once you have enabled the Search API Pantheon module, when you reload the schema the module will use the config-set for the version of the Search API Solr module installed in your codebase. See the [Search API Solr 4.3.0 release notes](https://www.drupal.org/project/search_api_solr/releases/4.3.0) for more information about upgrading to a 4.3.0+ compatible schema.

### Examples

[](#examples)

**Auto-generated config:** Generates schema files based on your Solr version, Search API Solr version, and index configuration.

```
terminus drush . -- search-api-pantheon:postSchema
```

**Jump-start config-set from Search API Solr:** Uses the pre-built config-set bundled with the Search API Solr module. Useful if you want a known baseline without any site-specific customizations.

```
terminus drush . -- search-api-pantheon:postSchema /code/web/modules/contrib/search_api_solr/jump-start/solr9/config-set/
terminus drush . -- search-api-pantheon:postSchema /code/web/modules/contrib/search_api_solr/jump-start/solr8/config-set/
```

**Custom config-set directory:** Uses your own schema files. For advanced use cases where you need custom analyzers, tokenizers, or field types beyond what the module generates.

```
terminus drush . -- search-api-pantheon:postSchema /code/solr/config
```

For more details on using custom Solr configurations, see [Pantheon's custom config guide](https://docs.pantheon.io/guides/pantheon-search/solr-drupal/custom-config).

Core Reloading
--------------

[](#core-reloading)

### Automatic Core Reload

[](#automatic-core-reload)

Search API Pantheon automatically reloads the Solr core after schema updates to prevent schema reversions and maintain index integrity.

### Manual Core Reload

[](#manual-core-reload)

If needed, manually reload the core using:

```
terminus drush . -- search-api-solr:reload
```

Pantheon Environments
---------------------

[](#pantheon-environments)

Each Pantheon environment (Dev, Test, Live, and Multidevs) has its own Solr server. Indexing and searching in one environment does not impact any other environment.

When you enable the Search API Pantheon module, 'Pantheon Search' server is automatically installed by default. The Pantheon connector supports only a single Search API server per environment. Creating additional servers using the Pantheon connector will cause all servers to point to the same Solr core, which may result in schema conflicts or unexpected indexing behavior.

Diagnostic Commands
-------------------

[](#diagnostic-commands)

Diagnostic commands automatically use the first server connected via Pantheon connector. The server\_id argument is no longer needed or accepted.

CommandAliasArgumentsDescription`drush search-api-pantheon:diagnose``sapd`NoneChecks the various pieces of the Search API install and throws errors on pieces that are not working.`drush search-api-pantheon:select``saps``` (required)Runs the given query against Solr server. Use `?debug=true` in any Solr page to get a good query to pass to this command.`drush search-api-pantheon:force-cleanup``sapfc`NoneDeletes all of the contents for the Solr server (no matter if hash or index\_id have changed).`drush search-api-pantheon:postSchema``sapps``[path]` (optional)Uploads schema files to the solr server. Can reset a schema to default, upgrade a schema, or use a custom config set.`drush search-api-pantheon:test-index-and-query``sap-tiq`NoneConnects to the search server, indexes a single item, and immediately queries it.Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

IssueSolutionSchema reverts unexpectedlyEnsure core reload is happening after updatesSearch index corruptionTry reposting schema and reindexing contentCore reload failuresCheck Solr logs and connection statusError after Search API Solr upgradeSchema incompatibility from 4.2.x → 4.3.x. See [UPGRADE.md](UPGRADE.md#schema-incompatibility-with-search-api-solr-43x)Solr Jargon
-----------

[](#solr-jargon)

TermDefinitionCommitTo make document changes permanent in the index.CoreAn instance of the Solr server suitable for creating zero or more indices.CollectionSolr Cloud's version of a "CORE". Not currently used at Pantheon.DocumentA group of fields and their values. The basic unit of data in a collection.FacetThe arrangement of search results into categories based on indexed terms.FieldThe content to be indexed/searched along with metadata.IndexA group of metadata entries gathered by Solr into a searchable catalog.SchemaA series of plain text and XML files that describe the data Solr will be indexing.Feedback and Collaboration
--------------------------

[](#feedback-and-collaboration)

Bug reports, feature requests, and feedback should be posted in [the drupal.org issue queue.](https://www.drupal.org/project/issues/search_api_pantheon?categories=All) For code changes, please submit pull requests against the [GitHub repository](https://github.com/pantheon-systems/search_api_pantheon).

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Total

54

Last Release

19d ago

Major Versions

3.0.1 → 8.0.0-beta52021-11-16

3.0.2 → 8.1.32023-03-29

3.x-dev → 8.1.52024-01-24

8.3.3 → 9.x-dev2025-07-25

4.x-dev → 8.3.x-dev2025-07-26

PHP version history (2 changes)8.0.0-alpha1PHP &gt;=7.4

8.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b34cc6bd882277b6c6dda19bf6631ae5c3a909fd667c826a15121642cdc051b2?d=identicon)[greg.1.anderson](/maintainers/greg.1.anderson)

![](https://www.gravatar.com/avatar/5a89f5f15357797cbd6ec7833a28626478ae3c0ceb5fa1faa8a26d0960584c65?d=identicon)[pantheon-systems](/maintainers/pantheon-systems)

![](https://www.gravatar.com/avatar/967cac5df61d5cd726a747e55bafcb6cc6b6b88e6eafd7f03934d50a23861d55?d=identicon)[stovak](/maintainers/stovak)

---

Top Contributors

[![stevector](https://avatars.githubusercontent.com/u/211029?v=4)](https://github.com/stevector "stevector (221 commits)")[![stovak](https://avatars.githubusercontent.com/u/119924?v=4)](https://github.com/stovak "stovak (149 commits)")[![kporras07](https://avatars.githubusercontent.com/u/2217820?v=4)](https://github.com/kporras07 "kporras07 (115 commits)")[![jazzsequence](https://avatars.githubusercontent.com/u/991511?v=4)](https://github.com/jazzsequence "jazzsequence (75 commits)")[![rkunjappan](https://avatars.githubusercontent.com/u/210441229?v=4)](https://github.com/rkunjappan "rkunjappan (15 commits)")[![rwagner00](https://avatars.githubusercontent.com/u/1789035?v=4)](https://github.com/rwagner00 "rwagner00 (8 commits)")[![namespacebrian](https://avatars.githubusercontent.com/u/87093053?v=4)](https://github.com/namespacebrian "namespacebrian (4 commits)")[![laura-johnson](https://avatars.githubusercontent.com/u/1652730?v=4)](https://github.com/laura-johnson "laura-johnson (3 commits)")[![jeffm2001](https://avatars.githubusercontent.com/u/18371709?v=4)](https://github.com/jeffm2001 "jeffm2001 (2 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (2 commits)")[![lowlostrong](https://avatars.githubusercontent.com/u/239265111?v=4)](https://github.com/lowlostrong "lowlostrong (1 commits)")[![iamsumit](https://avatars.githubusercontent.com/u/1046307?v=4)](https://github.com/iamsumit "iamsumit (1 commits)")[![pirog](https://avatars.githubusercontent.com/u/713424?v=4)](https://github.com/pirog "pirog (1 commits)")[![coderkakarrot](https://avatars.githubusercontent.com/u/20449027?v=4)](https://github.com/coderkakarrot "coderkakarrot (1 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (1 commits)")[![davidstrauss](https://avatars.githubusercontent.com/u/113350?v=4)](https://github.com/davidstrauss "davidstrauss (1 commits)")[![scottbuscemi](https://avatars.githubusercontent.com/u/4336848?v=4)](https://github.com/scottbuscemi "scottbuscemi (1 commits)")[![damienmckenna](https://avatars.githubusercontent.com/u/429?v=4)](https://github.com/damienmckenna "damienmckenna (1 commits)")[![ander-murane](https://avatars.githubusercontent.com/u/97995234?v=4)](https://github.com/ander-murane "ander-murane (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/pantheon-systems-search-api-pantheon/health.svg)

```
[![Health](https://phpackages.com/badges/pantheon-systems-search-api-pantheon/health.svg)](https://phpackages.com/packages/pantheon-systems-search-api-pantheon)
```

###  Alternatives

[az-digital/az_quickstart

Arizona Quickstart

52296.5k4](/packages/az-digital-az-quickstart)[govcms/govcms

GovCMS Drupal Distribution

200103.6k3](/packages/govcms-govcms)[dialekt/dialekt

A boolean expression DSL.

173.8k](/packages/dialekt-dialekt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
