PHPackages                             signify-nz/silverstripe-solr-search - 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. signify-nz/silverstripe-solr-search

ActiveSilverstripe-vendormodule[Search &amp; Filtering](/categories/search)

signify-nz/silverstripe-solr-search
===================================

Search a SilverStripe site with Solr

4.2.1(2mo ago)0709[1 issues](https://github.com/signify-nz/silverstripe-solr-search/issues)[3 PRs](https://github.com/signify-nz/silverstripe-solr-search/pulls)LGPL-3.0-or-laterPHPPHP &gt;=7.3

Since Nov 9Pushed 2mo ago10 watchersCompare

[ Source](https://github.com/signify-nz/silverstripe-solr-search)[ Packagist](https://packagist.org/packages/signify-nz/silverstripe-solr-search)[ RSS](/packages/signify-nz-silverstripe-solr-search/feed)WikiDiscussions 4.x Synced 1w ago

READMEChangelog (4)Dependencies (24)Versions (40)Used By (0)

SilverStripe Solr Search
========================

[](#silverstripe-solr-search)

Advanced, Solr-powered search for SilverStripe 4 and 5, built on [Solarium](https://solarium.readthedocs.io). Define what to index in PHP, configure connections in YAML, and query Solr with a fluent API.

> Based on [firesphere/solr-search](https://codeberg.org/Firesphere/silverstripe-solr). This is the `signify-nz` maintained fork.

Features
--------

[](#features)

- **Code-defined indexes** — declare indexed classes and fields in a PHP index class.
- **Rich field types** — full-text, filter, facet, sort, stored and copy fields.
- **Faceting, boosting, fuzzy search, elevation** and advanced filters/excludes.
- **Spellcheck &amp; suggestions** for "did you mean" experiences.
- **View-permission aware** — results are filtered by each member's `canView` rights.
- **`ShowInSearch` handled automatically** — hidden pages/files are removed from the core.
- **Queued indexing** via `silverstripe/queuedjobs`, indexing live content only.
- **Subsites, Fluent, Elemental and Fulltext-Search compatibility** submodule support.
- **Pluggable config stores** — file-based or HTTP POST to a remote Solr.
- Works with **Solr 4 (backward compatible), 8 (default) and 9**.

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

[](#requirements)

- PHP 7.3+
- SilverStripe Framework 4 or 5
- [symbiote/silverstripe-queuedjobs](https://github.com/symbiote/silverstripe-queuedjobs)
- A running Solr instance (4 / 8 / 9) reachable from the application
- [Solarium](https://solarium.readthedocs.io) (installed automatically via Composer)

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

[](#installation)

```
composer require signify-nz/silverstripe-solr-search
```

See [docs/01-Installation.md](docs/01-Installation.md) for details.

Quick start
-----------

[](#quick-start)

### 1. Configure the Solr connection

[](#1-configure-the-solr-connection)

Connection details are set in YAML. Defaults assume a Solr instance on `localhost:8983`, so this step can be skipped for local development.

```
# app/_config/search.yml
Firesphere\SolrSearch\Services\SolrCoreService:
  config:
    endpoint:
      myhostname:
        host: solr.example.com
        port: 8983
        timeout: 10
  store:
    path: '.solr'
```

See [docs/03-Set-up-and-Configuration.md](docs/03-Set-up-and-Configuration.md)for authentication, config stores and all available options.

### 2. Define an index

[](#2-define-an-index)

Create an index extending `Firesphere\SolrSearch\Indexes\BaseIndex`. The `init()` method declares what is indexed; `getIndexName()` names the Solr core.

```
use Firesphere\SolrSearch\Indexes\BaseIndex;
use SilverStripe\Assets\File;
use SilverStripe\CMS\Model\SiteTree;

class MyIndex extends BaseIndex
{
    public function init()
    {
        $this->addClass(SiteTree::class);
        $this->addClass(File::class);

        $this->addFulltextField('Title');
        $this->addFulltextField('Content');

        $this->addFilterField('ClassName');
    }

    public function getIndexName()
    {
        return 'mysite-search';
    }
}
```

### 3. Configure the core and index your content

[](#3-configure-the-core-and-index-your-content)

```
# Push the generated schema/config to Solr and (re)create the core
vendor/bin/sake dev/tasks/SolrConfigureTask

# Queue a job to index your content
vendor/bin/sake dev/tasks/SolrIndexTask
```

Make sure the queued-jobs runner is processing jobs (and restart long-running workers after deploying code changes, so they pick up the new classes).

### 4. Run a search

[](#4-run-a-search)

```
use Firesphere\SolrSearch\Indexes\BaseIndex;
use Firesphere\SolrSearch\Queries\BaseQuery;
use SilverStripe\Core\Injector\Injector;

class SearchPageController extends PageController
{
    public function getResults()
    {
        $term = $this->getRequest()->getVar('Search');
        if (!$term) {
            return null;
        }

        /** @var BaseIndex $index */
        $index = Injector::inst()->get(MyIndex::class);

        $query = Injector::inst()->get(BaseQuery::class);
        $query->addTerm($term);
        $query->setStart((int) $this->getRequest()->getVar('start'));

        return $index->doSearch($query); // returns a SearchResult
    }
}
```

### 5. Render the results

[](#5-render-the-results)

```

        $TotalItems results

            $Title
            $Excerpt

        No results found.

```

A fuller example (facets, sorting, spellcheck) is in [docs/04-Searching.md](docs/04-Searching.md).

Tasks
-----

[](#tasks)

TaskPurpose`SolrConfigureTask`Generate and upload the core configuration/schema to Solr.`SolrIndexTask`Queue a job to (re)index content into existing cores.`FullSolrIndexTask`Queue a full reindex of all indexes and classes.`ClearDirtyClassesTask`Re-process records that previously failed to index (see Dirty classes).`ClearErrorsTask`Clear recorded indexing errors.> Indexing reads from the **live** stage, so only published content is added to the search index. A standard `SolrIndexTask` adds/updates documents but does not clear the core, so after changing index definitions run `SolrConfigureTask`(or a clearing reindex) to drop stale documents.

Key concepts
------------

[](#key-concepts)

- **`ShowInSearch`** is managed by the module. Setting it to `0`/false removes the page or file from the core via `onAfterPublish`/`onAfterWrite` or the next index run — do **not** add it as a custom indexed field, as that causes unexpected behaviour. See [docs/03-Set-up-and-Configuration.md](docs/03-Set-up-and-Configuration.md).
- **View permissions** — each document stores a view-status field so results are filtered to what the current member may `canView`. See [docs/11-View-Permissions.md](docs/11-View-Permissions.md).
- **Dirty classes** — records that fail to push to Solr are tracked so they can be retried rather than silently lost. See [docs/12-Dirty-classes.md](docs/12-Dirty-classes.md).
- **Config stores** — `FileConfigStore` (local path) or `PostConfigStore` (HTTP POST to a remote Solr). See [docs/06-Advanced-Options/06-Stores.md](docs/06-Advanced-Options/06-Stores.md).

Documentation
-------------

[](#documentation)

Full documentation lives in the [docs folder](docs/index.md):

- [Installation](docs/01-Installation.md) · [Solr](docs/02-Solr.md) · [Setup &amp; configuration](docs/03-Set-up-and-Configuration.md)
- [Searching](docs/04-Searching.md) · [Spellcheck](docs/05-Spellcheck.md) · [Customisation](docs/07-Customisation.md)
- Advanced options: [Faceting](docs/06-Advanced-Options/01-Faceting.md), [Boosting](docs/06-Advanced-Options/02-Boosting.md), [Fuzzy search](docs/06-Advanced-Options/03-Fuzzy-search.md), [Elevation](docs/06-Advanced-Options/04-Elevation.md), [Filters / Excludes](docs/06-Advanced-Options/05-Filters-excludes.md), [Stores](docs/06-Advanced-Options/06-Stores.md)
- [CMS usage](docs/08-CMS-Usage.md) · [Debugging](docs/09-Debugging.md) · [Suggestions](docs/10-Suggestions.md) · [View permissions](docs/11-View-Permissions.md) · [Dirty classes](docs/12-Dirty-classes.md) · [Subsites](docs/13-Subsites.md)
- Submodules: [Fulltext Search compatibility](docs/14-Submodules/01-Fulltext-Search-Compatibility.md), [Fluent](docs/14-Submodules/03-Fluent.md), [Member-based permissions](docs/14-Submodules/04-Member-based-permissions.md), [Elemental](docs/14-Submodules/05-Elemental.md)

Please read the documentation before raising questions — most are answered there.

Solr version support
--------------------

[](#solr-version-support)

Solr versionStatus4Backward compatible8Default / recommended9SupportedSolarium
--------

[](#solarium)

This module is built on [Solarium](https://solarium.readthedocs.io); its documentation is a useful reference for lower-level query behaviour.

Contributing
------------

[](#contributing)

Contributions are welcome — please raise an issue and, ideally, an accompanying pull request. See the [code of conduct](docs/15-Contributing/01-Code-of-Conduct.md)and [contributing guide](docs/15-Contributing/02-Contributing.md).

Security
--------

[](#security)

Please report security issues responsibly as described in our [security policy](SECURITY.md).

License
-------

[](#license)

[LGPL v3](LICENSE.md).

Disclaimer
----------

[](#disclaimer)

If this module breaks your website, you get to keep all the pieces.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance84

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.8% of commits — single point of failure

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 ~30 days

Recently: every ~23 days

Total

32

Last Release

54d ago

Major Versions

2.1.0 → 3.0.02024-12-09

3.2.0-alpha.1 → 4.0.0-alpha2025-07-09

3.x-dev → 4.0.02025-08-11

2.2.0-alpha → 4.2.0-alpha2026-03-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5234013?v=4)[Signify Limited](/maintainers/signify-nz)[@signify-nz](https://github.com/signify-nz)

---

Top Contributors

[![Firesphere](https://avatars.githubusercontent.com/u/680570?v=4)](https://github.com/Firesphere "Firesphere (1206 commits)")[![sig-shadae](https://avatars.githubusercontent.com/u/144086372?v=4)](https://github.com/sig-shadae "sig-shadae (59 commits)")[![sig-mmiddleton](https://avatars.githubusercontent.com/u/104043875?v=4)](https://github.com/sig-mmiddleton "sig-mmiddleton (59 commits)")[![sig-peggy](https://avatars.githubusercontent.com/u/82991689?v=4)](https://github.com/sig-peggy "sig-peggy (42 commits)")[![marczhermo](https://avatars.githubusercontent.com/u/1578316?v=4)](https://github.com/marczhermo "marczhermo (10 commits)")[![andrewandante](https://avatars.githubusercontent.com/u/9702648?v=4)](https://github.com/andrewandante "andrewandante (8 commits)")[![sig-critchie](https://avatars.githubusercontent.com/u/11035951?v=4)](https://github.com/sig-critchie "sig-critchie (8 commits)")[![elliot-sawyer](https://avatars.githubusercontent.com/u/354793?v=4)](https://github.com/elliot-sawyer "elliot-sawyer (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![Saibamen](https://avatars.githubusercontent.com/u/905878?v=4)](https://github.com/Saibamen "Saibamen (1 commits)")[![phptek](https://avatars.githubusercontent.com/u/478440?v=4)](https://github.com/phptek "phptek (1 commits)")[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (1 commits)")[![RVXD](https://avatars.githubusercontent.com/u/1586761?v=4)](https://github.com/RVXD "RVXD (1 commits)")[![Petro-Ivvysoft](https://avatars.githubusercontent.com/u/11421312?v=4)](https://github.com/Petro-Ivvysoft "Petro-Ivvysoft (1 commits)")

---

Tags

searchconfigurationsilverstripesolrsolarium

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/signify-nz-silverstripe-solr-search/health.svg)

```
[![Health](https://phpackages.com/badges/signify-nz-silverstripe-solr-search/health.svg)](https://phpackages.com/packages/signify-nz-silverstripe-solr-search)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k6.0M774](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M534](/packages/pimcore-pimcore)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k51](/packages/civicrm-civicrm-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9626.1k68](/packages/open-dxp-opendxp)

PHPackages © 2026

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