PHPackages                             vikram0460/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. [API Development](/categories/api)
4. /
5. vikram0460/sql-elasticsearch-query-converter

ActiveLibrary[API Development](/categories/api)

vikram0460/sql-elasticsearch-query-converter
============================================

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

02↓100%PHP

Since May 27Pushed 1w agoCompare

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

READMEChangelogDependenciesVersions (2)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 vikram0460/sql-elasticsearch-query-converter:"dev-master"
```

Usage
=====

[](#usage)

Look at examples/example1.php

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance64

Regular maintenance activity

Popularity3

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 52.9% 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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[facebook/php-business-sdk

PHP SDK for Facebook Business

90923.5M35](/packages/facebook-php-business-sdk)[exsyst/swagger

A php library to manipulate Swagger specifications

35916.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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