PHPackages                             smallhomelab/lucene-query-parser - 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. smallhomelab/lucene-query-parser

ActiveLibrary

smallhomelab/lucene-query-parser
================================

Basic Lucene Query Parser for Search and Filter

v0.1(7y ago)71.2k1PHPPHP ^7.1.3

Since Jul 30Pushed 1y agoCompare

[ Source](https://github.com/smallhomelab/lucene-query-parser)[ Packagist](https://packagist.org/packages/smallhomelab/lucene-query-parser)[ RSS](/packages/smallhomelab-lucene-query-parser/feed)WikiDiscussions master Synced 1mo ago

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

Lucene Query Parser
===================

[](#lucene-query-parser)

Lucene query string parser to be used as web api query or filter string. Base code is come from

Example queries in this language:

- `name: apple`
- `price: > 100`
- `price: > 100 AND active: = 1`
- `product.price: > 100 AND category.id: = 7`
- `name:=~ "Foo%"`
- `created_at: > "2017-01-01" and created_at: < "2017-01-31"`
- `status:= 1 AND (name:= "PHP Rocks" || name:= "I ♥ API's")`

Install
-------

[](#install)

```
composer require "smallhomelab/lucene-query-parser"

```

Usage
-----

[](#usage)

```
$parseTree = (new LucenenQueryParser\Parser)->parse($filter);

// Getting String
$str = $parseTree->toString();

// Getting Array
$arr = $parseTree->toArray();

// Getting Simple Array
$arrSimple = $parseTree->toSimpleArray();
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

2840d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da9d971965cb00b3da6526317ec9576ddf158c92ed27b4f08ff3798022ee5c95?d=identicon)[smallhomelab](/maintainers/smallhomelab)

---

Top Contributors

[![goget-steven](https://avatars.githubusercontent.com/u/56941531?v=4)](https://github.com/goget-steven "goget-steven (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smallhomelab-lucene-query-parser/health.svg)

```
[![Health](https://phpackages.com/badges/smallhomelab-lucene-query-parser/health.svg)](https://phpackages.com/packages/smallhomelab-lucene-query-parser)
```

PHPackages © 2026

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