1 <?php
2 //Make sure you have elasticsearch-php package installed before proceeding
3
4 use Elasticsearch\ClientBuilder;
5 require 'vendor/autoload.php';
6 $client = ClientBuilder::create()->build();
7 $params = [
8 'index' => 'my_index',
9 'id' => 'my_id'
10 ];
11 $response = $client->get($params);
12 print_r($response);