繁体   English   中英

在Windows Xampp上安装和使用elasticsearch php客户端

[英]Installation and using elasticsearch php client on Windows Xampp

我从https://www.elastic.co/downloads/elasticsearch下载了elasticsearch-5.1.1.zip

然后使用此命令通过composer下载用于elasticsearch的Elastica A PHP客户端

作曲家需要ruflin / elastica:dev-master

现在我想打开并进行测试。 当我运行此命令

BIN \\ elasticsearch.bat

我收到此错误: 命令的语法不正确。

另一方面,如果我尝试使用Elastica A PHP客户端,我会遇到如下错误:

致命错误:未捕获Elastica \\ Exception \\ Connection \\ HttpException:无法连接到主机,Elasticsearch下来? 在E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Transport \\ Http.php:180堆栈跟踪:#0 E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Request.php(171):Elastica \\ Transport \\ Http-> exec(Object(Elastica \\ Request),Array)#1 E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Client.php (662):Elastica \\ Request-> send()#2 E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Client.php(673):Elastica \\ Client-> request('twitter / ','DELETE',Array,Array)#3 E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Index.php(531):Elastica \\ Client-> request('twitter /', 'DELETE',Array,Array)#4 E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Index.php(165):Elastica \\ Index->​​ request('twitter /','DELETE ')#5 E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Index.php(258):Elastica \\ Index->​​ delete()#6 E:\\ xampp \\ htdocs \\ el \\ index .php(40):Elastica \\ Index->​​ create(Array,true)#7 {main}抛出E:\\ xampp \\ htdocs \\ el \\ vendor \\ ruflin \\ elastica \\ lib \\ Elastica \\ Transport \\ Http.php on line 18 0

我的问题是我如何使用elasticsearch-5.1? 我哪里做错了?

问候。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM