PHPackages                             santik/sql-elasticsearch-query-converter - 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. [Database &amp; ORM](/categories/database)
4. /
5. santik/sql-elasticsearch-query-converter

ActiveLibrary[Database &amp; ORM](/categories/database)

santik/sql-elasticsearch-query-converter
========================================

Library for converting AND OR SQL like query to Elastic Search query

0.1.5(8y ago)2802proprietaryPHPPHP ^7.0

Since Aug 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/santik/SqlElasticSearchQueryConverter)[ Packagist](https://packagist.org/packages/santik/sql-elasticsearch-query-converter)[ RSS](/packages/santik-sql-elasticsearch-query-converter/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

SqlElasticSearchQueryConverter
==============================

[](#sqlelasticsearchqueryconverter)

Converts AND OR SQL like query to Elastic Search query

`((("query1 query 2" OR query3) OR query4) AND (query5 OR query6)) AND query7`

TO

`{"bool":{"must":[{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"match_phrase":{"field":"query1 query 2"}},{"match":{"field":"query3"}}]}},{"match":{"field":"query4"}}]}},{"bool":{"should":[{"match":{"field":"query5"}},{"match":{"field":"query6"}}]}}]}},{"match":{"field":"query7"}}]}}`

Installation
============

[](#installation)

```
$ composer require santik/sql-elasticsearch-query-converter
```

Usage
=====

[](#usage)

Look at examples/example1.php

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Every ~20 days

Total

6

Last Release

3135d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4608b54fe463d41e072e1b3c3e4459b07631f2031f07aaf15baf354ea6d75604?d=identicon)[santik](/maintainers/santik)

---

Top Contributors

[![santik](https://avatars.githubusercontent.com/u/220593?v=4)](https://github.com/santik "santik (8 commits)")

---

Tags

andorelasticsearchphpqueryquery-builderquery-parserquerystringsql

### Embed Badge

![Health badge](/badges/santik-sql-elasticsearch-query-converter/health.svg)

```
[![Health](https://phpackages.com/badges/santik-sql-elasticsearch-query-converter/health.svg)](https://phpackages.com/packages/santik-sql-elasticsearch-query-converter)
```

###  Alternatives

[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.2M19](/packages/bavix-laravel-wallet)[google/cloud-bigquery

BigQuery Client for PHP

8918.5M50](/packages/google-cloud-bigquery)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4833.0M9](/packages/dyrynda-laravel-model-uuid)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.1k3.4k](/packages/leantime-leantime)[google/cloud-firestore

Cloud Firestore Client for PHP

1814.3M32](/packages/google-cloud-firestore)[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

125.1k1](/packages/markocupic-calendar-event-booking-bundle)

PHPackages © 2026

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