apility/elasticsearch-sql-parser
最新稳定版本:v1.0.7
Composer 安装命令:
composer require apility/elasticsearch-sql-parser
包简介
Library for parsing SQL into the Elasticsearch DSL
关键字:
README 文档
README
Installation
composer require apility/elasticsearch-sql-parser
Usage
<?php use Apility\ElasticSearch\SQLParser; $query = "SELECT * FROM articles WHERE published = 1 ORDER BY updated LIMIT 10"; $parsed = SQLParser::parse($query); // ElasticSearch Query DSL
Example output
{ "index": "articles", "from": 0, "size": 10, "query": { "bool": { "filter": [ { "bool": { "must": [ { "match_phrase": { "published": { "query": "1" } } } ] } } ] } }, "sort": [ { "updated": { "order": "ASC" } } ], "_source": { "include": [ "id", "name", "author" ] } }
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-25