onstage2426/fuzor
最新稳定版本:3.4.0
Composer 安装命令:
composer require 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.
关键字:
README 文档
README
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 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 per index — zero infrastructure
Installation
composer require onstage2426/fuzor
Requirements: PHP 8.5+, SQLite 3.37.0+
Usage
use Fuzor\Index; // Create an index and add documents $index = new Index('/path/to/articles.db', language: 'en'); $index->insertMany([ ['id' => 1, 'title' => 'Fast sedan', 'body' => 'Comfortable city car with great fuel economy.'], ['id' => 2, 'title' => 'Off-road SUV', 'body' => 'Built for adventure. Handles any terrain.'], ['id' => 3, 'title' => 'Electric coupe', 'body' => 'Zero emissions, instant torque, sporty design.'], ]); // Search $results = $index->search('economi', fuzzy: true); $results = $index->searchBoolean('sedan or coupe -electric');
Documentation
- Indexing — bulk loading, upsert, rebuild, snapshots
- Search — BM25 tuning, fuzzy, boolean, prefix
- Language — stopwords, stemming, CJK/Thai n-grams
- Configuration — all tuning parameters
- Snippeting and Highlighting
License
MIT — see LICENSE.
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-21