2012-11-28 51 views
0

我正在使用elastica在windows azure linux虛擬機上搜索elasticsearch索引。 我創建使用彈性搜索的JAVA API指數: -Elastica搜索結果未得到處理

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單詞「陣列」頁。

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($結果)打印什麼。

有人可以幫我嗎?

回答

1

@ferhat .... Thnx的鏈接。但是,我得到的錯誤是因爲php5-curl未安裝在系統中。