Skip to content

Commit dc40199

Browse files
committed
[DOCS] Updates docs for 8.0.0.pre1
1 parent b253e51 commit dc40199

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
## 8.0.0.pre1
2+
3+
### Client
4+
5+
#### Elastic Transport
6+
7+
The code for the dependency `elasticsearch-transport` has been promoted to [its own repository](https://github.com/elastic/elastic-transport-ruby/) and the project and gem have been renamed to [`elastic-transport`](https://rubygems.org/gems/elastic-transport). This gem now powers [`elasticsearch`](https://rubygems.org/gems/elasticsearch) and [`elastic-enterprise-search`](https://rubygems.org/gems/elastic-enterprise-search). The `elasticsearch-transport` gem won't be maintained after `7.16`, in favour of `elastic-transport`.
8+
9+
### API
10+
11+
#### X-Pack Deprecation
12+
13+
X-Pack has been deprecated. The `elasticsearch-xpack` gem will no longer be maintained after `7.16`. The "X-Pack" integration library codebase was merged into `elasticsearch-api`. All the functionality is available from `elasticsearch-api`. The `xpack` namespace was removed for accessing any APIs other than `_xpack` (`client.xpack.info`) and `_xpack/usage` (`client.xpack.usage`). But APIs which were previously available through the `xpack` namespace e.g.: `client.xpack.machine_learning` are now only available directly: `client.machine_learning`.
14+
15+
#### Parameter checking was removed
16+
17+
The code in `elasticsearch-api` will no longer validate all the parameters sent. It will only validate the required parameters such as those needed to build the path for the request. But other API parameters are going to be validated by Elasticsearch. This provides better forwards and backwards compatibility in the client.
18+
19+
#### Response object
20+
21+
In previous versions of the client, calling an API endpoint would return the JSON body of the response. With `8.0`, we are returning a new Response object `Elasticsearch::API::Response`. It still behaves like a Hash to maintain backwards compatibility, but adds the `status` and `headers` methods from the `Elastic::Transport:Transport::Response` object:
22+
23+
```ruby
24+
elastic_ruby(main)> response = client.info
25+
=> #<Elasticsearch::API::Response:0x000055752b0c50a8
26+
@response=
27+
#<Elastic::Transport::Transport::Response:0x000055752b0c50f8
28+
@body=
29+
{"name"=>"instance",
30+
"cluster_name"=>"elasticsearch-8-0-0-SNAPSHOT-rest-test",
31+
"cluster_uuid"=>"oIfRARuYRGuVYybjxQJ87w",
32+
"version"=>
33+
{"number"=>"8.0.0-SNAPSHOT",
34+
"build_flavor"=>"default",
35+
"build_type"=>"docker",
36+
"build_hash"=>"7e23c54eb31cc101d1a4811b9ab9c4fd33ed6a8d",
37+
"build_date"=>"2021-11-04T00:21:32.464485627Z",
38+
"build_snapshot"=>true,
39+
"lucene_version"=>"9.0.0",
40+
"minimum_wire_compatibility_version"=>"7.16.0",
41+
"minimum_index_compatibility_version"=>"7.0.0"},
42+
"tagline"=>"You Know, for Search"},
43+
@headers={"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"},
44+
@status=200>>
45+
elastic_ruby(main)> response.status
46+
=> 200
47+
elastic_ruby(main)> response.headers
48+
=> {"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"}
49+
elastic_ruby(main)> response['name']
50+
=> "instance"
51+
elastic_ruby(main)> response['tagline']
52+
=> "You Know, for Search"
53+
```
54+
155
## 7.15.0
256

357
### Client

docs/release_notes/80.asciidoc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[[release_notes_80]]
2+
=== 8.0.0 Release notes
3+
4+
[discrete]
5+
[[release_notes_800pre1]]
6+
=== 8.0.0.pre1 Release notes
7+
8+
[discrete]
9+
==== Client
10+
11+
The code for the dependency `elasticsearch-transport` has been promoted to https://github.com/elastic/elastic-transport-ruby/[its own repository] and the project and gem have been renamed to https://rubygems.org/gems/elastic-transport[`elastic-transport`]. This gem now powers https://rubygems.org/gems/elasticsearch[`elasticsearch`] and https://rubygems.org/gems/elastic-enterprise-search[`elastic-enterprise-search`]. The `elasticsearch-transport` gem won't be maintained after `7.16`, in favour of `elastic-transport`.
12+
13+
[discrete]
14+
==== API
15+
16+
[discrete]
17+
===== X-Pack Deprecation
18+
19+
X-Pack has been deprecated. The `elasticsearch-xpack` gem will no longer be maintained after `7.16`. The "X-Pack" integration library codebase was merged into `elasticsearch-api`. All the functionality is available from `elasticsearch-api`. The `xpack` namespace was removed for accessing any APIs other than `_xpack` (`client.xpack.info`) and `_xpack/usage` (`client.xpack.usage`). But APIs which were previously available through the `xpack` namespace e.g.: `client.xpack.machine_learning` are now only available directly: `client.machine_learning`.
20+
21+
[discrete]
22+
===== Parameter checking was removed
23+
24+
The code in `elasticsearch-api` will no longer validate all the parameters sent. It will only validate the required parameters such as those needed to build the path for the request. But other API parameters are going to be validated by Elasticsearch. This provides better forwards and backwards compatibility in the client.
25+
26+
[discrete]
27+
===== Response object
28+
29+
In previous versions of the client, calling an API endpoint would return the JSON body of the response. With `8.0`, we are returning a new Response object `Elasticsearch::API::Response`. It still behaves like a Hash to maintain backwards compatibility, but adds the `status` and `headers` methods from the `Elastic::Transport:Transport::Response` object:
30+
31+
[source,ruby]
32+
------------------------------------
33+
elastic_ruby(main)> response = client.info
34+
=> #<Elasticsearch::API::Response:0x000055752b0c50a8
35+
@response=
36+
#<Elastic::Transport::Transport::Response:0x000055752b0c50f8
37+
@body=
38+
{"name"=>"instance",
39+
"cluster_name"=>"elasticsearch-8-0-0-SNAPSHOT-rest-test",
40+
"cluster_uuid"=>"oIfRARuYRGuVYybjxQJ87w",
41+
"version"=>
42+
{"number"=>"8.0.0-SNAPSHOT",
43+
"build_flavor"=>"default",
44+
"build_type"=>"docker",
45+
"build_hash"=>"7e23c54eb31cc101d1a4811b9ab9c4fd33ed6a8d",
46+
"build_date"=>"2021-11-04T00:21:32.464485627Z",
47+
"build_snapshot"=>true,
48+
"lucene_version"=>"9.0.0",
49+
"minimum_wire_compatibility_version"=>"7.16.0",
50+
"minimum_index_compatibility_version"=>"7.0.0"},
51+
"tagline"=>"You Know, for Search"},
52+
@headers={"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"},
53+
@status=200>>
54+
elastic_ruby(main)> response.status
55+
=> 200
56+
elastic_ruby(main)> response.headers
57+
=> {"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"}
58+
elastic_ruby(main)> response['name']
59+
=> "instance"
60+
elastic_ruby(main)> response['tagline']
61+
=> "You Know, for Search"
62+
------------------------------------

docs/release_notes/index.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[[release_notes]]
22
== Release Notes
33

4+
[discrete]
5+
=== 8.x
6+
* <<release_notes_80, 8.0.0 Release Notes>>
47

58
[discrete]
69
=== 7.x
@@ -17,6 +20,7 @@
1720
* <<release_notes_75, 7.5 Release Notes>>
1821
* <<release_notes_70, 7.0 Release Notes>>
1922

23+
include::80.asciidoc[]
2024
include::715.asciidoc[]
2125
include::714.asciidoc[]
2226
include::713.asciidoc[]

0 commit comments

Comments
 (0)