get elasticsearch data magento 2

78

 <?php
 //Make sure you have elasticsearch-php package installed before proceeding
 
    use Elasticsearch\ClientBuilder;
    require 'vendor/autoload.php';
    $client = ClientBuilder::create()->build();
    $params = [
    'index' => 'my_index',
    'id'    => 'my_id'
	];
	$response = $client->get($params);
	print_r($response);

Comments

Submit
0 Comments