elasticsearch-integrated -php, (*1)
Installation
elasticsearch-integrated -php is installed via Composer. To install, simply add it
to your composer.json
file:, (*2)
{
"require": {
"sinfini/elastic-search-sql-php": "dev-master"
}
}
And run composer to update your dependencies:, (*3)
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
Basic Usage
It helps to return elastic search result into array format using php, (*4)
include ('vendor/autoload.php');
use Elasticsearch\Php;
$map = new \Elasticsearch\Php\ElasticSearchSqlConverter();
$jsonData = <Query output data from elastic search>;
$handler = $map->create($jsonData, 1, 1, 1);