PHPackages                             nyeholt/silverstripe-extensible-elastic - 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. nyeholt/silverstripe-extensible-elastic

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

nyeholt/silverstripe-extensible-elastic
=======================================

An elastic search adapter for extensible search

3.0.1(3y ago)114.6k10[3 issues](https://github.com/nyeholt/silverstripe-extensible-elastic/issues)[2 PRs](https://github.com/nyeholt/silverstripe-extensible-elastic/pulls)1BSD-3-ClausePHP

Since Feb 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nyeholt/silverstripe-extensible-elastic)[ Packagist](https://packagist.org/packages/nyeholt/silverstripe-extensible-elastic)[ Docs](https://github.com/nyeholt/silverstripe-extensible-elastic)[ RSS](/packages/nyeholt-silverstripe-extensible-elastic/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (4)Versions (36)Used By (1)

Elastic Extensible Search
=========================

[](#elastic-extensible-search)

An extensible search implementation for Elastic Search.

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

[](#installation)

`composer require nyeholt/silverstripe-extensible-elastic`

NOTE: if using filters on your search page, or outputting the Score in results, you'll need the following patch

Configuration
-------------

[](#configuration)

Add the following to your project's config

```
---
Name: elastic_config
---
nglasl\extensible\ExtensibleSearchPage:
  custom_search_engines:
    Symbiote\ElasticSearch\ElasticaSearchEngine: 'Elastic'

PageController:
  extensions:
    - 'nglasl\extensible\ExtensibleSearchExtension'
    - 'Symbiote\ElasticSearch\ElasticaSearchController'

Page:
  extensions:
    - 'Symbiote\ElasticSearch\ElasticaSearchable'

SilverStripe\Core\Injector\Injector:
  ElasticClient:
    class: Elastica\Client
    constructor:
      host_details:
        host: elastic
        port: 9200
        # transport: AwsAuthV4 - this is needed for AWS search service compatibility; it adds credentials support
  Symbiote\ElasticSearch\ElasticaSearch:
    properties:
      searchService: %$Heyday\Elastica\ElasticaService
  Heyday\Elastica\ElasticaService:
    class: Symbiote\ElasticSearch\ExtensibleElasticService
    constructor:
      client: %$ElasticClient
      index: my-index

```

To add additional types for selection in an extensible search page config; note namespaces are supported.

```
---
Name: search_page_config
---
Symbiote\ElasticSearch\ElasticaSearch:
  additional_search_types:
    My\Namespaced\Class: Friendly Label

```

Run /dev/tasks/Symbiote-ElasticSearch-VersionedReindexTask

Note: Reindex will *ONLY* reindex items that have the Searchable extension applied. There's also a DataDiscovery extension that will grab taxonomy terms if available.

```
---
Name: elastic_data_config
---
SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Symbiote\ElasticSearch\ElasticaSearchable
    # for extra boosting options - Symbiote\ElasticSearch\DataDiscovery

```

API
---

[](#api)

To define your own custom field structures in the elastic index, you need to

- define your field mappings for the 'rebuild' phase
- add data for those fields during the indexing phase

```
public function updateElasticMappings($mappings = []) {
    $mappings['Identifier'] = ['type' => 'keyword'];
    $mappings['ContentType'] = ['type' => 'keyword'];
}

```

```
public function updateElasticDoc(Document $document)
{
    $document->set('Identifier', $this->Identifier);
    $document->set('ContentType', $this->ContentType);
}

```

Details
-------

[](#details)

**How do I use the BoostTerms field?**

BoostTerms are used for subsequent querying, either direct through the builder or by the "Boost values" and "Boost fields with field/value matches" options on the Extensible Search Page.

The field hint states to use the word "important" in this field to boost the record super high in result sets. This requires you to set the "Boost fields with field/value matches" to have an entry of

`BoostTerms:important` : `10`

in the search page to boost records with that set. Additionally, set the "Boost values" for BoostTerms to be higher than all other fields for any match to contribute highly.

**Why the separate ElasticaSearchable extension?**

The base Heyday Elastic module doesn't handle indexing of Versioned content directly; ElasticaSearchable provides a few overrides that take into account versioned content.

**Can I get rid of stale results?**

You can prune old results by creating the PruneStaleResultsJob ; this takes as parameters

- The field:value filter to use; typically something like ClassName:MyDataClass. If you don't want a filter applied, pass the string 'null'
- How old something should be until it's considered 'old' in strtotime format
- How frequently to run the job in seconds, ie 86400 for every day
- How many to delete in each batch, typically around 1000

```
ClassName:My\Data\Class
-1 month
86400
1000

```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance8

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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 ~59 days

Recently: every ~217 days

Total

32

Last Release

1209d ago

Major Versions

1.1.0 → 2.0.02018-02-27

1.2.0 → 2.8.02020-01-20

1.2.1 → 2.9.02020-03-30

2.11.4 → 3.0.02022-01-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/25cb1c56a7ab949d1e6b28a2a04862ce1cffe1799a291e1797f8dfd33cd83716?d=identicon)[nyeholt](/maintainers/nyeholt)

---

Top Contributors

[![nyeholt](https://avatars.githubusercontent.com/u/161730?v=4)](https://github.com/nyeholt "nyeholt (104 commits)")[![derdiggn](https://avatars.githubusercontent.com/u/5464282?v=4)](https://github.com/derdiggn "derdiggn (2 commits)")[![jason-symbiote](https://avatars.githubusercontent.com/u/35711440?v=4)](https://github.com/jason-symbiote "jason-symbiote (2 commits)")

---

Tags

searchsilverstripeelastic searchfull-text

### Embed Badge

![Health badge](/badges/nyeholt-silverstripe-extensible-elastic/health.svg)

```
[![Health](https://phpackages.com/badges/nyeholt-silverstripe-extensible-elastic/health.svg)](https://phpackages.com/packages/nyeholt-silverstripe-extensible-elastic)
```

###  Alternatives

[quinninteractive/silverstripe-seo

An all-in-one SEO module for SilverStripe

3328.5k](/packages/quinninteractive-silverstripe-seo)[silverstripe/solr

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

1914.0k](/packages/silverstripe-solr)[g4b0/searchable-dataobjects

This module adds DataObjects to frontend search

254.9k](/packages/g4b0-searchable-dataobjects)

PHPackages © 2026

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