I am using elastica to search in elasticsearch index on windows azure linux virtual machine. I created the index using JAVA API of elastic search:-
IndexResponse response = client.prepareIndex("nod", "rel").setSource(met.xb).execute().actionGet();
This is how I am trying to connect & search:-
$elasticaClient = new Elastica_Client(array(
'host' => 'localhost',
'port' => '9200'
));
$result= $elasticaClient->request("nod/rel/_search", "GET",$dt)
It just prints word "Array" on the output php page.
var_dump($elasticaClient)
prints this:-
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) prints nothing.
Can someone help me out here?