|
| 1 | +## 7.14.0.pre |
| 2 | + |
| 3 | +This is a pre-release, but there are some important changes coming in version 7.14.0 of the client: |
| 4 | + |
| 5 | +### Client |
| 6 | + |
| 7 | +This release changes the way in which the transport layer and the client interact. Previously, when using `elasticsearch-transport`, `Elasticsearch::Transport::Client` had a convenient wrapper, so it could be used as `Elasticsearch::Client`. Now, we are decoupling the transport layer from the Elasticsearch client. If you're using the `elasticsearch` gem, not much will change. It will instantiate a new `Elasticsearch::Transport::Client` when you instantiate `Elasticsearch::Client` and the endpoints from `elasticsearch-api` will be available. |
| 8 | + |
| 9 | +`Elasticsearch::Client` has an `attr_accessor` for the transport instance: |
| 10 | + |
| 11 | +```ruby |
| 12 | +> client = Elasticsearch::Client.new |
| 13 | +> client.transport.class |
| 14 | +=> Elasticsearch::Transport::Client |
| 15 | +> client.transport.transport.class |
| 16 | +=> Elasticsearch::Transport::Transport::HTTP::Faraday |
| 17 | +``` |
| 18 | + |
| 19 | +The interaction with `elasticsearch-api` remains unchanged. You can use the API endpoints just like before: |
| 20 | + |
| 21 | +```ruby |
| 22 | +> client.info |
| 23 | +=> {"name"=>"instance", |
| 24 | + "cluster_name"=>"elasticsearch", |
| 25 | + "cluster_uuid"=>"id", |
| 26 | + "version"=> |
| 27 | + {"number"=>"7.14.0", |
| 28 | + ... |
| 29 | +}, |
| 30 | + "tagline"=>"You Know, for Search"} |
| 31 | +``` |
| 32 | + |
| 33 | +Or perform request directly from the client which will return an `Elasticsearch::Transport::Response` object: |
| 34 | + |
| 35 | +```ruby |
| 36 | +> client.perform_request('GET', '/') |
| 37 | +# This is the same as doing client.transport.perform_request('GET', '/') |
| 38 | +=> #<Elasticsearch::Transport::Transport::Response:0x000055c80bf94bc8 |
| 39 | + @body= |
| 40 | + {"name"=>"instance", |
| 41 | + "cluster_name"=>"elasticsearch", |
| 42 | + "cluster_uuid"=>"id", |
| 43 | + "version"=> |
| 44 | + {"number"=>"7.14.0-SNAPSHOT", |
| 45 | + ... |
| 46 | + }, |
| 47 | + "tagline"=>"You Know, for Search"}, |
| 48 | + @headers= |
| 49 | + {"content-type"=>"application/json; charset=UTF-8", |
| 50 | + "content-length"=>"571", |
| 51 | + ... |
| 52 | + }, |
| 53 | + @status=200> |
| 54 | +``` |
| 55 | + |
| 56 | +If you have any problems, please report them in [this issue](https://github.com/elastic/elasticsearch-ruby/issues/1344). |
| 57 | + |
| 58 | +## 7.13.3 |
| 59 | + |
| 60 | +- API Support for Elasticsearch version 7.13.3 |
| 61 | + |
| 62 | +>>>>>>> b6539da3... [DOCS] Adds 7.14 Release Notes about changes in transport |
1 | 63 | ## 7.13.2
|
2 | 64 |
|
3 | 65 | ### Client
|
|
0 commit comments