PHPackages                             onstage2426/fuzor - 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. onstage2426/fuzor

ActiveLibrary[Database &amp; ORM](/categories/database)

onstage2426/fuzor
=================

Dependency-free full-text search for PHP. BM25 ranking, fuzzy and boolean modes, search-as-you-type prefix matching, stopword filtering and Snowball stemming for 62 languages, snippet extraction and result highlighting — one SQLite file, zero infrastructure.

1.x-dev(3w ago)15MITPHPPHP &gt;=8.5CI passing

Since May 30Pushed 2w ago1 watchersCompare

[ Source](https://github.com/onstage2426/fuzor)[ Packagist](https://packagist.org/packages/onstage2426/fuzor)[ Docs](https://github.com/onstage2426/fuzor)[ RSS](/packages/onstage2426-fuzor/feed)WikiDiscussions 1.x Synced 3w ago

READMEChangelog (10)Dependencies (23)Versions (19)Used By (0)

[![Fuzor Logo](https://raw.githubusercontent.com/onstage2426/fuzor/refs/heads/assets/logos//logo.svg)](https://github.com/onstage2426/fuzor)

[![PHP 8.5+](https://camo.githubusercontent.com/7c0d3f0931b4e620c6c642a58a60d9a346a7de7d6ac275e62a9552c41821f7b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/7c0d3f0931b4e620c6c642a58a60d9a346a7de7d6ac275e62a9552c41821f7b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e) [![Packagist Version](https://camo.githubusercontent.com/3c6d97dd8efbf87a94ae5e2a4a641bbea1c48253209090e8e80e68b96c7aaee3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6e7374616765323432362f66757a6f72)](https://camo.githubusercontent.com/3c6d97dd8efbf87a94ae5e2a4a641bbea1c48253209090e8e80e68b96c7aaee3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6e7374616765323432362f66757a6f72) [![CI](https://github.com/onstage2426/fuzor/actions/workflows/ci.yml/badge.svg)](https://github.com/onstage2426/fuzor/actions/workflows/ci.yml/badge.svg)

About
-----

[](#about)

Fuzor is a dependency-free full-text search library for PHP. It tokenises your documents, stores an inverted index in a single SQLite file, and scores results with Okapi BM25 — no external services required.

- BM25 ranked search with automatic typo tolerance
- Boolean search with AND / OR / NOT operators
- Faceted filtering and per-value counts
- Search-as-you-type prefix matching and phrase search
- Stopword filtering and Snowball stemming for 62 languages
- Result highlighting and snippet extraction
- One SQLite file per index — zero infrastructure

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

[](#installation)

```
composer require onstage2426/fuzor
```

**Requirements:** PHP 8.5+, SQLite 3.46.0+

Usage
-----

[](#usage)

```
use Fuzor\Index;
use Fuzor\SchemaConfig;
use Fuzor\SearchOptions;
use Fuzor\FacetRange;

// Create an index — declare facetable fields at creation time
$index = new Index('/path/to/products.db', schema: new SchemaConfig(
    language:    'en',
    facetFields: ['type', 'price'],
));

$index->insert([
    ['id' => 1, 'title' => 'Fast sedan',     'body' => 'City car with great fuel economy.',    'type' => 'sedan', 'price' => 24900],
    ['id' => 2, 'title' => 'Off-road SUV',   'body' => 'Built for adventure and any terrain.', 'type' => 'suv',   'price' => 41500],
    ['id' => 3, 'title' => 'Electric coupe', 'body' => 'Zero emissions and instant torque.',   'type' => 'coupe', 'price' => 58000],
]);

// BM25 ranked search — typo tolerance fires automatically on words ≥ 5 chars
$result = $index->search('economi');

// Boolean search
$result = $index->searchBoolean('sedan or coupe -electric');

// Faceted search — filter by attribute, count values
$result = $index->search('car', new SearchOptions(
    filter: ['type' => ['sedan', 'suv'], 'price' => FacetRange::max(45000)],
    facets: ['type'],
));

$result->hits;               // documents in relevance order
$result->facetDistribution;  // ['type' => ['sedan' => 1, 'suv' => 1]]
```

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

[](#documentation)

- [Indexing](docs/indexing.md) — creating indexes, inserting, updating, facet fields, rebuild, snapshots
- [Search](docs/search.md) — BM25, boolean, phrases, typo tolerance, synonyms, facets, sorting, distinct
- [Language](docs/language.md) — stopwords, stemming, CJK/Thai n-grams
- [Formatting](docs/formatting.md) — result highlighting and snippet extraction
- [Document store](docs/document-store.md) — storing and retrieving raw documents
- [Tuning](docs/tuning.md) — BM25 parameters, typo tolerance, field boosting
- [Performance](docs/performance.md) — read/write index split, snapshots
- [Inspect query](docs/inspect-query.md) — debug the query pipeline

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.5% 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 ~4 days

Total

19

Last Release

27d ago

Major Versions

1.0.x-dev → 2.0.02026-04-19

2.0.x-dev → 3.0.02026-05-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/72b4747f6622546df06e3852dd72016ecc728bd4c408f451f5ed8e67b796928b?d=identicon)[onstage2426](/maintainers/onstage2426)

---

Top Contributors

[![onstage2426](https://avatars.githubusercontent.com/u/70956213?v=4)](https://github.com/onstage2426 "onstage2426 (157 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

boolean-searchfull-text-searchfuzzy-searchphpsearchsqlitestemmingstopwordstokenizersearchsqlitemultilingualtokenizerfuzzy-searchstemmingbm25stopwordsfull text searchsnippethighlightinginverted-indexboolean-searchsearch-as-you-type

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/onstage2426-fuzor/health.svg)

```
[![Health](https://phpackages.com/badges/onstage2426-fuzor/health.svg)](https://phpackages.com/packages/onstage2426-fuzor)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k595.8M6.5k](/packages/doctrine-dbal)[teamtnt/tntsearch

A fully featured full text search engine written in PHP

3.2k3.1M29](/packages/teamtnt-tntsearch)[spatie/laravel-translatable

A trait to make an Eloquent model hold translations

2.4k25.2M497](/packages/spatie-laravel-translatable)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58725.2M48](/packages/scienta-doctrine-json-functions)[pmatseykanets/laravel-scout-postgres

PostgreSQL Full Text Search Driver for Laravel Scout

165217.3k2](/packages/pmatseykanets-laravel-scout-postgres)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

816.0k](/packages/tommyknocker-pdo-database-class)

PHPackages © 2026

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