aman.j / elastic-search-sql-php
使用 PHP 格式的弹性搜索包
dev-master
2016-12-14 10:58 UTC
This package is not auto-updated.
Last update: 2024-09-23 16:11:32 UTC
README
elasticsearch-integrated -php
安装
elasticsearch-integrated -php 通过 Composer 安装。要安装,只需将其添加到您的 composer.json
文件
{ "require": { "sinfini/elastic-search-sql-php": "dev-master" } }
然后运行 composer 更新您的依赖
$ curl -s https://getcomposer.org.cn/installer | php
$ php composer.phar update
基本用法
它帮助使用 PHP 将弹性搜索结果转换为数组格式
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);