PHPackages                             silverstripers/elemental-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. silverstripers/elemental-search

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

silverstripers/elemental-search
===============================

Full text search for elemental module

1.0.5(6y ago)612.3k22[7 issues](https://github.com/HelloBetterLTD/elemental-seach/issues)[3 PRs](https://github.com/HelloBetterLTD/elemental-seach/pulls)1BSD-3-ClausePHP

Since Jun 3Pushed 2y ago4 watchersCompare

[ Source](https://github.com/HelloBetterLTD/elemental-seach)[ Packagist](https://packagist.org/packages/silverstripers/elemental-search)[ RSS](/packages/silverstripers-elemental-search/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (12)Used By (1)

SilverStripe - Elemental search
===============================

[](#silverstripe---elemental-search)

Introduction
------------

[](#introduction)

This module integrates [dnadesign/silverstripe-elemental](https://github.com/dnadesign/silverstripe-elemental)into [SilverStripe's Fulltext search](https://docs.silverstripe.org/en/4/developer_guides/search/fulltextsearch/)and provides extensions to create search documents for your Pages or any data objects which you need to work with the full text search. The module comes in handy for systems where you dont want to make use of complex search systems like Solr.

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

[](#requirements)

- SilverStripe ^4.0
- Elemental ^2.0

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

[](#installation)

Install with Composer:

```
composer require silverstripers/elemental-search dev-master

```

Ensure you run `dev/build?flush=1` to build your database and flush your cache.

Usage
-----

[](#usage)

### Enable Full text search

[](#enable-full-text-search)

The module once installed elables Full text search by itself on the SearchDocument dataobject. There are no additional configs you want to use.

### Create a search form

[](#create-a-search-form)

Create a search form with the code below and display on a template

```
use SilverStripe\CMS\Search\SearchForm;

class  MyController extends Controller {

   public function SearchForm()
   {
      return SearchForm::create($this, 'SearchForm');
   }

   public function results($data, $form, $request)
    {
        $data = array(
            'Results' => $form->getResults(),
            'Query' => DBField::create_field('Text', $form->getSearchQuery()),
            'Title' => _t('SilverStripe\\CMS\\Search\\SearchForm.SearchResults', 'Search Results')
        );
        return $this->owner->customise($data)->renderWith(array('Page_results', 'Page'));
    }

}

```

### Include objects to search.

[](#include-objects-to-search)

Any data object you'd like to include in the search has to be decorated with the `SilverStripers\ElementalSearch\Extensions\SearchDocumentGenerator`. After doing this this extension will make a search document each time when the data object is created, updated, and when deleted it will delete the search document. For Versioned data objects it will only create search documents when the object is published.

### Specify which contents needs to be searched.

[](#specify-which-contents-needs-to-be-searched)

For the webpages you have the option to configure which dom elements to include in the search. Eg: You wont need it to cache the whole page and run search on certain info which duplicates over the site like the navigations.

```
SilverStripers\ElementalSearch\Model\SearchDocument:
    search_x_path:
        - main-content

```

In the situation where you have content outside of elemental elements that you want to include in the search.

```
SilverStripers\ElementalSearch\Model\SearchDocument:
    only_use_x_path: true

```

The above settings will render the page and exract content within the `main-content` DOM node, and create the document.

How it works
------------

[](#how-it-works)

The module adds a new DataObject `SearchDocument`. This gets created when each of the search enabled pages. And it is how it creates aggregated search results.

The module overrides the MySQLDatabase and the search result queries.

Reporting Issues
----------------

[](#reporting-issues)

Please [create an issue](https://github.com/SilverStripers/elemental-seach/issues) for any bugs, or submit merge requests.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 82% 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 ~78 days

Recently: every ~96 days

Total

8

Last Release

2356d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a6fa4ab2a74fee1ac574bf15dd3ce1f38f31fee60c186b4b24ee8d7e3090b52?d=identicon)[silverstripers](/maintainers/silverstripers)

---

Top Contributors

[![fonsekaean](https://avatars.githubusercontent.com/u/143939?v=4)](https://github.com/fonsekaean "fonsekaean (50 commits)")[![muskie9](https://avatars.githubusercontent.com/u/870751?v=4)](https://github.com/muskie9 "muskie9 (4 commits)")[![roshansilverstripers](https://avatars.githubusercontent.com/u/53742423?v=4)](https://github.com/roshansilverstripers "roshansilverstripers (4 commits)")[![prameshharshana3](https://avatars.githubusercontent.com/u/17820656?v=4)](https://github.com/prameshharshana3 "prameshharshana3 (1 commits)")[![RobertLeCreux](https://avatars.githubusercontent.com/u/25985906?v=4)](https://github.com/RobertLeCreux "RobertLeCreux (1 commits)")[![sheadawson](https://avatars.githubusercontent.com/u/1166136?v=4)](https://github.com/sheadawson "sheadawson (1 commits)")

---

Tags

elementalfulltext-searchsilverstripesilverstripe-elementalsearchsilverstripeelementalfull-text

### Embed Badge

![Health badge](/badges/silverstripers-elemental-search/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripers-elemental-search/health.svg)](https://phpackages.com/packages/silverstripers-elemental-search)
```

PHPackages © 2026

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