PHPackages                             fromholdio/silverstripe-fulltext-filters - 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. [Database &amp; ORM](/categories/database)
4. /
5. fromholdio/silverstripe-fulltext-filters

ActiveSilverstripe-vendormodule[Database &amp; ORM](/categories/database)

fromholdio/silverstripe-fulltext-filters
========================================

This module adds three fulltext SearchFilters to your SilverStripe project.

3.0.0(2y ago)12.6k1[1 issues](https://github.com/fromholdio/silverstripe-fulltext-filters/issues)BSD-3-ClausePHP

Since Apr 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fromholdio/silverstripe-fulltext-filters)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-fulltext-filters)[ Docs](https://github.com/fromholdio/silverstripe-fulltext-filters)[ RSS](/packages/fromholdio-silverstripe-fulltext-filters/feed)WikiDiscussions master Synced 1mo ago

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

silverstripe-fulltext-filters
=============================

[](#silverstripe-fulltext-filters)

This module adds three fulltext `SearchFilter`s to your SilverStripe project.

- `FulltextBoolean` - similar to the existing `Fulltext` filter, but uses `IN BOOLEAN MODE`, and transforms the search phrase to take full advantage of this. [See characteristics of Boolean full-text searches here.](https://dev.mysql.com/doc/refman/8.0/en/fulltext-boolean.html)
- `FulltextRelevance` - adds relevance to the select query, accepts a 'Weight' argument which is applied to the relevance score, and provides hooks to sort results by the sum of all weighted indexes within the query
- `FulltextBooleanRelevance` - same as `FulltextRelevance` but uses the `FulltextBoolean` filter as its base and basis for matching. Uses the Boolean mode relevance calculation (which can differ from Fulltext in Natural Language Mode)

N.b. - Full-text relevance scores are binary (1 or 0) in Boolean Mode, unless the table engine is InnoDB. By default SilverStripe enforces MyISAM for tables containing a fulltext index. Use [fromholdio-silverstripe-fulltext-innodb](https://github.com/fromholdio/silverstripe-fulltext-innodb) to overcome this.

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

[](#requirements)

- [silverstripe-framework](https://github.com/silverstripe/silverstripe-framework) ^4 &amp; ^5

Recommended
-----------

[](#recommended)

- [fromholdio/silverstripe-fulltext-innodb](https://github.com/fromholdio/silverstripe-fulltext-innodb) ^1.0 (for Silverstripe ^4)

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

[](#installation)

`composer require fromholdio/silverstripe-fulltext-filters`

Details &amp; Usage
-------------------

[](#details--usage)

In short, use this like any other set of `SearchFilters`:

```
// Define your fulltext indexes:
private static $indexes = [
    'TitleFields' => [
        'type' => DBIndexable::TYPE_FULLTEXT,
        'columns' => [
            'Title',
            'MenuTitle'
        ]
    ],
    'ContentFields' => [
        'type' => DBIndexable::TYPE_FULLTEXT,
        'columns' => [
            'Content',
            'MetaDescription'
        ]
    ]
];

// Use in ORM filters:

// We're using BOOLEAN MODE matching
// Matches to the TitleFields index are weighted as five times more significant than ContentFields matches
// We're calculating the sum of relevance scores per matched record, and ordering the results by descending relevance score

public function getResults($value)
{
    $objects = ObjectClass::get()
        ->filterAny([
            'TitleFields:FulltextBooleanRelevance(5)' => $value,
            'ContentFields:FulltextBooleanRelevance' => $value
        ])
        ->sort('@TitleFieldsScore + @ContentFieldsScore DESC');
}
```

More documentation to come. Look at the source code in the meantime, or submit an issue.

Two key hooks:

- You can access the relevance value the database assigns per index and per record using `->{IndexName}Relevance`
- Per the example above, these relevance values are made available within the query for `sort` but also available for additional `where`/etc, using variable names `@{IndexName}Score`

To Do
-----

[](#to-do)

- Documentation 😅

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Every ~303 days

Recently: every ~120 days

Total

6

Last Release

1057d ago

Major Versions

1.0.0 → 2.0.02022-02-25

2.x-dev → 3.0.02023-06-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/40e135ad117686bee39707c1d9286cc5e915e219c26a10d13858ca44d14f1eb0?d=identicon)[dizzystuff](/maintainers/dizzystuff)

---

Top Contributors

[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (9 commits)")

---

Tags

searchmysqlmariadbsilverstripefulltextInnoDBsearch filters

### Embed Badge

![Health badge](/badges/fromholdio-silverstripe-fulltext-filters/health.svg)

```
[![Health](https://phpackages.com/badges/fromholdio-silverstripe-fulltext-filters/health.svg)](https://phpackages.com/packages/fromholdio-silverstripe-fulltext-filters)
```

###  Alternatives

[baril/sqlout

MySQL fulltext driver for Laravel Scout.

4512.9k](/packages/baril-sqlout)[stefanfroemken/mysqlreport

Analyze and profile your TYPO3 databases queries

1314.9k](/packages/stefanfroemken-mysqlreport)

PHPackages © 2026

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