PHPackages                             alexschwarz89/easy-mysqli-fulltext - 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. alexschwarz89/easy-mysqli-fulltext

ActiveLibrary[Search &amp; Filtering](/categories/search)

alexschwarz89/easy-mysqli-fulltext
==================================

An easy-to-use Library to perform ranked MYSQLi fulltext searches

2.0.0(7y ago)15602MITPHPPHP &gt;=7.1

Since May 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/alexschwarz89/easy-mysqli-fulltext)[ Packagist](https://packagist.org/packages/alexschwarz89/easy-mysqli-fulltext)[ RSS](/packages/alexschwarz89-easy-mysqli-fulltext/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

EasyMysqliFulltext
==================

[](#easymysqlifulltext)

An easy-to-use Library to perform ranked fulltext searches with MYSQLi.

[![SensioLabsInsight](https://camo.githubusercontent.com/14b350de54d3ecaeef3af11af0013b85a9a3d5f27a5d8fac9fab7c1070638122/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36313534393161382d326166622d343233652d626133362d3864376564383230623865652f6d696e692e706e67)](https://insight.sensiolabs.com/projects/615491a8-2afb-423e-ba36-8d7ed820b8ee)[![Latest Stable Version](https://camo.githubusercontent.com/02a8c16c0ca8656ad05c1a6d77569dba2fae49d592ac9f2cd3c96e95703794da/68747470733a2f2f706f7365722e707567782e6f72672f616c65787363687761727a38392f656173792d6d7973716c692d66756c6c746578742f762f737461626c65)](https://packagist.org/packages/alexschwarz89/easy-mysqli-fulltext)[![License](https://camo.githubusercontent.com/2357a29f6f809dcbcf788463bea8906f515a4128d3be139427f92cb25c017006/68747470733a2f2f706f7365722e707567782e6f72672f616c65787363687761727a38392f656173792d6d7973716c692d66756c6c746578742f6c6963656e7365)](https://packagist.org/packages/alexschwarz89/easy-mysqli-fulltext)[![composer.lock](https://camo.githubusercontent.com/affca8df6caa469029467ff4a9fca1a7e771e373fc35d29112d47cef37e3c1e1/68747470733a2f2f706f7365722e707567782e6f72672f616c65787363687761727a38392f656173792d6d7973716c692d66756c6c746578742f636f6d706f7365726c6f636b)](https://packagist.org/packages/alexschwarz89/easy-mysqli-fulltext)[![GetBadges Game](https://camo.githubusercontent.com/750ecfe19bee21974df6af7fbe21790663af8a9ff445e71ee29a380c7bd3fb70/68747470733a2f2f616c65787363687761727a38392d656173792d6d7973716c692d66756c6c746578742e6765746261646765732e696f2f736869656c642f636f6d70616e792f616c65787363687761727a38392d656173792d6d7973716c692d66756c6c74657874)](https://alexschwarz89-easy-mysqli-fulltext.getbadges.io/?ref=shield-game)

Install
-------

[](#install)

Install via [composer](https://getcomposer.org):

```
{
    "require": {
        "alexschwarz89/EasyMysqliFulltext": "2.0.0"
    }
}
```

Run `composer install`.

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

[](#getting-started)

You will find a example file in examples/index.php to use with the included testdata.sql.

#### Set up search on a existing MYSQLi connection

[](#set-up-search-on-a-existing-mysqli-connection)

```
use \Alexschwarz89\EasyMysqliFulltext\Search;
$search = new Search( $mysqliInstance );
```

#### Simply searching for "example" in our testdata

[](#simply-searching-for-example-in-our-testdata)

```
$query = new SearchQuery($search);
$query->setTable('testdata')
    ->setSearchFields('description')
    ->mustInclude('example');

$search->setSearchQuery( $query );
try {
    $search->execute();
} catch (EmptySearchTermException $e) {
    // Handle invalid search terms
}
```

You can also
------------

[](#you-can-also)

#### Use Search without an existing MYSQLi connection

[](#use-search-without-an-existing-mysqli-connection)

```
$search = Search::createWithMYSQLi('localhost', 'username', 'password', 'dbname');
```

#### You can also pass the connection variables via Environment Variable (.env) and just Use

[](#you-can-also-pass-the-connection-variables-via-environment-variable-env-and-just-use)

```
$search = Search::createWithMYSQLi();
```

#### .env file saved in your root directory

[](#env-file-saved-in-your-root-directory)

```
DATABASE_HOST=localhost
DATABASE_USERNAME=username
DATABASE_PASSWORD=password
DATABASE_NAME=database_name

```

#### Build more complex search queries

[](#build-more-complex-search-queries)

```
$query->setTable('testdata')
    ->setSearchFields('description,title,isbn,author')
    ->mustInclude('example')
    ->canInclude('another')
    ->exclude('again')
    ->preferWithout('this')
    ->orderBy('some_field', 'ASC');
```

Contributing is surely allowed! :-)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 82.2% 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 ~173 days

Recently: every ~219 days

Total

8

Last Release

2797d ago

Major Versions

1.3.0 → 2.0.02018-09-21

PHP version history (3 changes)1.0.0PHP &gt;=5.3.3

1.3.0PHP &gt;=5.3.9

2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e71603707372f4c65e68a640c1c15ef767ecf10c5ea6e597d2d2d403f691595?d=identicon)[alexschwarz89](/maintainers/alexschwarz89)

---

Top Contributors

[![alexschwarz89](https://avatars.githubusercontent.com/u/7203493?v=4)](https://github.com/alexschwarz89 "alexschwarz89 (37 commits)")[![ibonly](https://avatars.githubusercontent.com/u/7251019?v=4)](https://github.com/ibonly "ibonly (6 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")[![bryanagee](https://avatars.githubusercontent.com/u/290124?v=4)](https://github.com/bryanagee "bryanagee (1 commits)")

---

Tags

fulltext-searchmysqliranked-fulltext-searchessearchmysqlifulltextfulltext search

### Embed Badge

![Health badge](/badges/alexschwarz89-easy-mysqli-fulltext/health.svg)

```
[![Health](https://phpackages.com/badges/alexschwarz89-easy-mysqli-fulltext/health.svg)](https://phpackages.com/packages/alexschwarz89-easy-mysqli-fulltext)
```

###  Alternatives

[teamtnt/tntsearch

A fully featured full text search engine written in PHP

3.2k3.0M28](/packages/teamtnt-tntsearch)[blomstra/search

Replaces Flarum search with one powered by an elastic search server.

114.9k](/packages/blomstra-search)

PHPackages © 2026

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