我从https://www.elastic.co/downloads/elasticsearch下载elasticsearch-5.1.1.zip
然后使用此命令通过作曲者下载Elastica PHP客户端进行elasticsearch
composer php需要ruflin / elastica:dev-master
现在我想打开并做一个testing。 当我运行这个命令
BIN \ elasticsearch.bat
我得到这个错误: 该命令的语法是不正确的。
另一方面,如果我尝试使用Elastica 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-> ','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在线18 0
我的问题是我如何使用elasticsearch-5.1? 我在哪里做错了?
问候。