首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Elastica搜索结果未得到处理

Elastica搜索结果未得到处理
EN

Stack Overflow用户
提问于 2012-11-28 15:07:13
回答 2查看 315关注 0票数 0

我正在使用elastica在windows azure linux虚拟机上搜索elasticsearch索引。我使用elastic search的JAVA API创建了索引:

代码语言:javascript
复制
IndexResponse response = client.prepareIndex("nod", "rel").setSource(met.xb).execute().actionGet();

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

代码语言:javascript
复制
$elasticaClient = new Elastica_Client(array(
                    'host' => 'localhost',
                    'port' => '9200'
                ));
$result= $elasticaClient->request("nod/rel/_search", "GET",$dt)

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

var_dump($elasticaClient)打印以下内容:-

代码语言:javascript
复制
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)不打印任何内容。

有人能帮帮我吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-12-07 21:08:28

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

票数 0
EN

Stack Overflow用户

发布于 2012-12-09 05:58:40

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13599625

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档