I enabled error on php and this was the message returned.
Array ( [took] => 1 [timed_out] => [_shards] => Array ( [total] => 10 [successful] => 10 [failed] => 0 ) [hits] => Array ( [total] => 0 [max_score] => [hits] => Array ( ) ) )
this is my code
<?php require 'vendor/autoload.php'; $hosts = [ 'http://localhost:9200/', ]; $client = Elasticsearch\ClientBuilder::create() ->setHosts($hosts) ->build(); $params = [ 'index' => 'test', 'body' => [ 'query' => [ 'match' => [ 'title' => 'fish', ] ] ] ]; $response = $client->search($params); print_r($response);