PHPackages                             homersimpsons/es-qb - 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. homersimpsons/es-qb

ActiveLibrary

homersimpsons/es-qb
===================

A query Builder for Elasticsearch

00PHP

Since Nov 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/homersimpsons/es-qb)[ Packagist](https://packagist.org/packages/homersimpsons/es-qb)[ RSS](/packages/homersimpsons-es-qb/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

EsQb
====

[](#esqb)

An Elasticsearch Query Builder.

You should choose EsQb if you need the following requirements:

- **Strong typing**: Ensure your code will work thanks to static analysis
- **Fearless upgrades**: Upgrading to a future Elasticsearch version will just require a `composer update`

Contributing
============

[](#contributing)

How to contribute
-----------------

[](#how-to-contribute)

The current goal is to map every query to specific classes.

When adding a query you need to add its unit test(s) and integration test.

Tests
-----

[](#tests)

### Unit tests

[](#unit-tests)

Unit tests do not need any connection, they are located under `tests/Unit` directory.

To run this tests please use `composer test`.

### Integration tests

[](#integration-tests)

Integration tests do need an active Elasticsearch instance, they are located under `tests/Integration` directory.

You can create an instance with the following [docker](https://www.docker.com/) command:

```
docker run -d --name elasticsearch -p 9200:9200 -e "discovery.type=single-node" elasticsearch:7.9.0
```

Once the instance is running you can run the tests against it with `composer test:integration`

Inspiration
===========

[](#inspiration)

As a base inspiration there is [The official Elasticsearch query builder](https://github.com/elastic/elasticsearch/tree/master/server/src/main/java/org/elasticsearch/index/query).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9613f397410f9baa7bc9832214b38b8200b9444a2e08f924d87d782930adf5e4?d=identicon)[homersimpsons](/maintainers/homersimpsons)

---

Top Contributors

[![homersimpsons](https://avatars.githubusercontent.com/u/16977446?v=4)](https://github.com/homersimpsons "homersimpsons (9 commits)")

### Embed Badge

![Health badge](/badges/homersimpsons-es-qb/health.svg)

```
[![Health](https://phpackages.com/badges/homersimpsons-es-qb/health.svg)](https://phpackages.com/packages/homersimpsons-es-qb)
```

PHPackages © 2026

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