【问题标题】:Elastica search results not getting processedElastica 搜索结果未得到处理
【发布时间】:2012-11-28 07:07:12
【问题描述】:

我正在使用 elastica 在 windows azure linux 虚拟机上的 elasticsearch 索引中进行搜索。 我使用弹性搜索的 JAVA API 创建了索引:-

IndexResponse response = client.prepareIndex("nod", "rel").setSource(met.xb).execute().actionGet();

这就是我尝试连接和搜索的方式:-

$elasticaClient = new Elastica_Client(array(
                    'host' => 'localhost',
                    'port' => '9200'
                ));
$result= $elasticaClient->request("nod/rel/_search", "GET",$dt)

它只是在输出 php 页面上打印单词“Array”。

var_dump($elasticaClient) 打印这个:-

object(Elastica_Client)#2 (1) { ["_config":protected]=> array(13) { ["host"]=> string(9) "localhost" ["port"]=> string(4) "9200" ["path"]=> string(0) "" ["url"]=> NULL ["transport"]=> string(4) "Http" ["persistent"]=> bool(true) ["timeout"]=> int(300) ["headers"]=> array(0) { } ["servers"]=> array(0) { } ["curl"]=> array(0) { } ["roundRobin"]=> bool(false) ["log"]=> bool(false) ["retryOnConflict"]=> int(0) } }

var_dump($result) 什么也不打印。

有人可以帮我吗?

【问题讨论】:

    标签: azure elasticsearch elastica


    【解决方案1】:

    @ferhat....谢谢链接。但是,我得到的错误是因为 php5-curl 没有安装在系统中。

    【讨论】:

      【解决方案2】:

      在此处查看示例 PHP-Elastica 应用程序; https://github.com/searchbox-io/php-elastica-sample

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-05-11
        • 1970-01-01
        • 2013-12-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-14
        • 1970-01-01
        相关资源
        最近更新 更多