PHPackages                             vulcandigital/silverstripe-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. vulcandigital/silverstripe-search

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

vulcandigital/silverstripe-search
=================================

A full text search replacement concept for SilverStripe that enables the use of tanks

1.0.0(8y ago)76721[1 issues](https://github.com/vulcandigital/silverstripe-search/issues)BSD-3-ClausePHP

Since Feb 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/vulcandigital/silverstripe-search)[ Packagist](https://packagist.org/packages/vulcandigital/silverstripe-search)[ Docs](https://github.com/vulcandigital/silverstripe-search)[ RSS](/packages/vulcandigital-silverstripe-search/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (1)Used By (0)

silverstripe-search
-------------------

[](#silverstripe-search)

This module is a single-line search replacement concept for SilverStripe that enables the use of tanks

[![Preview](docs/images/example.jpg)](docs/images/example.jpg)

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

[](#requirements)

- silverstripe/framework: ^4.0

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

[](#installation)

```
composer require vulcandigital/silverstripe-search
```

Getting Started
---------------

[](#getting-started)

"What becomes searchable" would be the biggest question, and the answer is:

> Any `DataObject` or subclass that has the `SearchIndexExtension` enabled

### 1. Apply the extension

[](#1-apply-the-extension)

To apply the extension to the DataObject add the following configuration properties:

```
class Recipe extends DataObject
{
    // Apply the extension
    private static $extensions = [
        \Vulcan\Search\Extensions\SearchIndexExtension::class
    ];

    // the search tank that records from the class are indexed under
    // this is optional and will default to "Main" if not provided
    private static $search_tank = 'Recipes'

    private static $db = [
        'Title' => 'Varchar(255)',
        'Content' => 'HTMLText',
        'SomeRandomFieldWithContent' => 'Text',
        'UselessField' => 'Boolean'
    ];

    // Showing the use of Dot Notation in searchableColumns()
    private static $has_one = [
        'User' => Member::class
    ];

    // This will conslidate the content from all columns into a single searchable line of text
    public function searchableColumns()
    {
        return [
            'Title',
            'Content',
            'SomeRandomFieldWithContent',
            'User.FirstName'
        ]
    }
}
```

> Note: Currently does not support Dot Notation on has\_many or many\_many relationships

Afterwards, make sure you **dev/build and ?flush**.

#### 2. Build the index

[](#2-build-the-index)

If you have just applied the extension to a DataObject or Page *with* existing records, you should then run the [Build Search Index Manifest](src/Tasks/BuildIndex.php) task from dev/tasks to index existing records

As new records are added to a `DataObject` they will also be indexed. When a record is deleted, the index entry will be deleted also

If the `DataObject` is `Page`, new records will only be indexed if the page is published, and unindexed when the page is unpublished or deleted

### 3. Create the search page

[](#3-create-the-search-page)

Open up the CMS, and create a new **SearchPage**. This can be a root item or a child of any other page

1. Switch to the "Search" tab
2. Select the appropriate tank for the page (default is "Main")
3. Save &amp; Publish the page
4. Begin searching for results within that tank

If you would like to have multiple search pages where the records being searched differ, then you need to specify a unique index tank name for that DataObject (by default, the `Main` tank will be used):

```
private static $search_tank = 'MyCustomTank';
```

This would ensure all records within that DataObject are stored under a custom tank identifier where that tank can be assigned to a particular `SearchPage`.

This module ships within a default [SearchPage](src/Pages/SearchPage.php) page type. The provided template is for example only and you should create your own override for it.

Renaming the filter title
-------------------------

[](#renaming-the-filter-title)

If you want to change the name that appears for the search filter you will need to add the following to your DataObject/Page:

```
private static $singular_name = 'Instruction';
private static $plural_name = 'Instructions';

```

Result item rendering
---------------------

[](#result-item-rendering)

You may want to render your results differently based on what classes they represent (as in the preview image above).

In order to do this for the above `Recipe` class you must create the following folder structure in your theme directory:

```
- themes/
  - mytheme/
    - templates/
      - Vulcan/
        - Search/
          - Render/

```

Then within that folder you can create a new template called `RenderRecipe.ss`. That template is passed (at a top level) complete access to everything in a single result:

```

    $Title$Title
    $Content
    Uploaded by: $User.FirstName

```

FAQ
---

[](#faq)

**I cannot see existing records for my class in the search**
Solution 1. `?flush=1`
Solution 2. If you have applied the extension to a class that already has existing records, you should then run the [Build Search Index Manifest](src/Tasks/BuildIndex.php) task from dev/tasks

**I'm seeing results for records that no longer exist**
This should not occur, however if it does. You can run the [Search Index Maintenance](src/Tasks/IndexMaintenance.php) task from dev/tasks

License
-------

[](#license)

[BSD 3-Clause](LICENSE.md) © Vulcan Digital Ltd

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3010d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79352f13e05702b6ba2a9e27508d7cbd72e902342ff4e6608861b40a7cab5644?d=identicon)[vulcandigital](/maintainers/vulcandigital)

---

Top Contributors

[![zanderwar](https://avatars.githubusercontent.com/u/13566916?v=4)](https://github.com/zanderwar "zanderwar (3 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/vulcandigital-silverstripe-search/health.svg)

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

###  Alternatives

[wilr/silverstripe-googlesitemaps

SilverStripe support for the Google Sitemaps XML, enabling Google and other search engines to see all urls on your site. This helps your SilverStripe website rank well in search engines, and to encourage the information on your site to be discovered quickly.

75626.0k28](/packages/wilr-silverstripe-googlesitemaps)[silverstripe/fulltextsearch

Adds support for Fulltext Search engines like Sphinx and Solr to SilverStripe CMS

44298.1k12](/packages/silverstripe-fulltextsearch)[heyday/silverstripe-elastica

Provides Elastic Search integration for SilverStripe DataObjects using Elastica

1136.8k2](/packages/heyday-silverstripe-elastica)[silverstripe-terraformers/gridfield-rich-filter-header

Rich filter header component for GridField

1325.7k1](/packages/silverstripe-terraformers-gridfield-rich-filter-header)[wilr/silverstripe-algolia

Algolia Indexer and Search Functionality

1325.5k](/packages/wilr-silverstripe-algolia)

PHPackages © 2026

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