PHP code example of zwen-lab / sql-dsl
1. Go to this page and download the library: Download zwen-lab/sql-dsl library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zwen-lab / sql-dsl example snippets
$sql = 'SELECT sum(a) from testindex-20200914/testtype where a="xxxxx" and create_time>=1600048800 and create_time <1600056000 group by create_time,b'
$dslBody = \Zwen\SqlDsl\EsParser::sql2dsl($sql);
var_dump(json_encode($dslBody));