$_config = array(
'host' =>'192.168.1.60', // host
'port' => 39200,
);
$client = new Elastica\Client($_config);
//$client = new Elastica\Client();
$elastica_query = new Elastica\Query();
$elastica_search = new Elastica\Search($client);
$elastica_search->setQuery($elastica_query);
try {
$b = $elastica_search->search();
} catch (Exception $e) {
var_dump($e->getMessage());
}
$res = ($b->getResults());
foreach ($res as $key => $rs) {
var_dump($rs->getParam('_source'));
//var_dump($rs) ;
}
echo 'all the end';