Elasticsearch new client builder was created but not working on search, index and all other queries

i am working on aws elasticsearch 6.2 and laravel framework

my code

$hosts=[
'host' => 'localhost(here i am using aws end point)'
// Only host is required
];

 $client = ClientBuilder::create()           // Instantiate a new ClientBuilder
            ->setHosts($hosts)      // Set the hosts
            ->build();        
 dump($client);

$json = '{
"query" : {
"match" : {
"title" : "phone"
}
}
}';

$params['index'] = 'sainikad';
$params['type'] = 'ads';
$params['body'] = $json;

$results=$client->search($params);

the error i was getting is

Symfony\Component\Debug\Exception\FatalErrorException: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\sainik\vendor\guzzlehttp\ringphp\src\Client\CurlHandler.php:90

and dump clientbuilder was getting response as

Client {#419
+transport: Transport {#417 :arrow_forward:}
#params: null
#indices: IndicesNamespace {#420 :arrow_forward:}
#cluster: ClusterNamespace {#421 :arrow_forward:}
#nodes: NodesNamespace {#422 :arrow_forward:}
#snapshot: SnapshotNamespace {#423 :arrow_forward:}
#cat: CatNamespace {#424 :arrow_forward:}
#ingest: IngestNamespace {#425 :arrow_forward:}
#tasks: TasksNamespace {#426 :arrow_forward:}
#remote: RemoteNamespace {#427 :arrow_forward:}
#endpoints: Closure {#418 :arrow_forward:}
#registeredNamespaces: []
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.