PHPackages                             makinacorpus/php-lucene - 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. makinacorpus/php-lucene

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

makinacorpus/php-lucene
=======================

Minimalistic, feature-rich, PHP Lucene syntax query builder

1.2.1(3y ago)105.2M—1.4%6[1 PRs](https://github.com/makinacorpus/php-lucene-query/pulls)GPL-2.0-or-laterPHPPHP &gt;=7.0

Since Jun 29Pushed 3y ago3 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (9)Used By (0)

Minimalistic, feature-rich, PHP Lucene syntax query builder
===========================================================

[](#minimalistic-feature-rich-php-lucene-syntax-query-builder)

This is a very small piece of API that brings a query builder for building Lucene queries; use cases are numerous, the two most obvious ones being Elastic Search and Apache SolR.

Examples
========

[](#examples)

```
use MakinaCorpus\Lucene\Query;

$query = new Query();

$query
    ->createTermCollection(Query::OP_OR)
    ->add("foo")
    ->add("bar")
;

$query
    ->createDateRange()
    ->setInclusive()
    ->setRange('1983-03-22', new \DateTime())
;

$query
    ->matchTerm('some_field', 'some value', null, 0.8)
    ->matchTerm('other_field', 'some_other_value', 1.3)
;
```

Should give you the following query:

```
(
    (foo OR bar)
    AND my_date_field:["1983\-03\-22T00\:00\:00\+0000" TO "2016\-06\-29T13\:10\:20\+0000"]
    AND some_field:"some value"~0.8
    AND other_field:some_other_value^1.3
)

```

Current status
==============

[](#current-status)

This API is in use in various projects for now almost 10 years, although this version being a full refactor (mostly classes being renamed) that now runs in production for 6 months.

It's probably not bug free, and lacks some testing, yet until now it works.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~344 days

Recently: every ~111 days

Total

8

Last Release

1201d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69252826f3a70a19fc5dcefb7ef9d26d465bb300245641abb4dd89d0ec391a66?d=identicon)[pounard](/maintainers/pounard)

![](https://www.gravatar.com/avatar/d21b98752b406528da88850922b1061f39bf72eb2126b413d5c12e275811a40b?d=identicon)[Makina Corpus](/maintainers/Makina%20Corpus)

---

Top Contributors

[![pounard](https://avatars.githubusercontent.com/u/341855?v=4)](https://github.com/pounard "pounard (8 commits)")[![kimpepper](https://avatars.githubusercontent.com/u/6132?v=4)](https://github.com/kimpepper "kimpepper (1 commits)")[![LedzZm](https://avatars.githubusercontent.com/u/24295975?v=4)](https://github.com/LedzZm "LedzZm (1 commits)")[![m4olivei](https://avatars.githubusercontent.com/u/191049?v=4)](https://github.com/m4olivei "m4olivei (1 commits)")[![yookoala](https://avatars.githubusercontent.com/u/91274?v=4)](https://github.com/yookoala "yookoala (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/makinacorpus-php-lucene/health.svg)

```
[![Health](https://phpackages.com/badges/makinacorpus-php-lucene/health.svg)](https://phpackages.com/packages/makinacorpus-php-lucene)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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