clientbuilder example php (ok)

Ví dụ 1:

C:\Users\Administrator\AppData\Local\Temp\scp55598\home\admin\domains\yp.vn\public_html\apiyp.php

use Elasticsearch\ClientBuilder;
require 'vendor/autoload.php';
$client = ClientBuilder::create()->build();
$params = [
  'index' => 'my_index',
  'id'    => 'my_id',
  'body'  => ['testField' => 'abc']
];
$response = $client->index($params);
print_r($response);

Ví dụ 2:

Last updated

Was this helpful?