Elasticsearch Client Update


I am using Elasticsearcj 2.2.0, Kİbana 4.4.2, Shield 2.2.0 and php 5.4.45
Should I update my php client?

For example : I am using this code: $client = new Elasticsearch\Client(); but it should be $client = ClientBuilder::create()->build();

When I write$client = ClientBuilder::create()->build(); it dosen't work true.

Actually my Elasticsearch the is up to date. What can I do?

Try this ---
$client = \Elasticsearch\ClientBuilder::create() ->setHosts([your host name])->build();

or may be your are not loading ur autoload.php file .

I did but:
Class 'Elasticsearch\ClientBuilder' not found

check on 9200 port if ur elastic search even running or not.

e.g. http://localhost:9200/

will be response like
"name" : "Firelord",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.2.1",
"build_hash" : "d045fc29d1932bce18b2e65ab8b297fbf6cd41a1",
"build_timestamp" : "2016-03-09T09:38:54Z",
"build_snapshot" : false,
"lucene_version" : "5.4.1"
"tagline" : "You Know, for Search"

I did:
"name": "Adrian Toomes",
"cluster_name": "elasticsearch",
"number": "2.2.0",
"build_hash": "8ff36d139e16f8720f2947ef62c8167a888992fe",
"build_timestamp": "2016-01-27T13:32:39Z",
"build_snapshot": false,
"lucene_version": "5.4.1"
"tagline": "You Know, for Search"


I dunno If you have seen this.

require 'vendor/autoload.php';
use Elasticsearch\ClientBuilder;
$client = ClientBuilder::create()->build();

I wrote this code but I have same error