在php上使用需要安装Elasticsearch-php
安装需求:
PHP 7.0.0或更高版本.
需要安装: Composer.
ext-curl : PHP的Libcurl扩展 (我也不知道是啥php的一个扩展)
反正我没安装过 Libcurl 是可替代的...不知道.
原生 JSON 扩展 (ext-json) 1.3.7或更高版本(也没安装过).
Elasticsearch-php的版本需要和Elasticsearch版本适配(这个自己百度,安装6.0应该就可以了)
好了可以上面都是废话可以来安装了
在你的composer.json文件中增加这个
{
"require": {
"elasticsearch/elasticsearch": "~6.0"
}
</