Skip to content

Commit 3d9cfed

Browse files
committed
[DOCS] Updates xpack and api READMEs
1 parent 6485dae commit 3d9cfed

File tree

2 files changed

+28
-52
lines changed

2 files changed

+28
-52
lines changed

elasticsearch-api/README.md

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,36 @@
11
# Elasticsearch::API
22

3-
**This library is part of the [`elasticsearch-ruby`](https://github.com/elasticsearch/elasticsearch-ruby/) package;
4-
please refer to it, unless you want to use this library standalone.**
3+
**This library is part of the [`elasticsearch-ruby`](https://github.com/elasticsearch/elasticsearch-ruby/) package; please refer to it, unless you want to use this library standalone.**
54

65
----
76

8-
The `elasticsearch-api` library provides a Ruby implementation of
9-
the [Elasticsearch](http://elasticsearch.com) REST API.
7+
The `elasticsearch-api` library provides a Ruby implementation of the [Elasticsearch](http://elasticsearch.com) REST API.
108

11-
It does not provide an Elasticsearch client; see the
12-
[`elasticsearch-transport`](https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-transport) library.
9+
It does not provide an Elasticsearch client; see the [`elasticsearch-transport`](https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-transport) library.
1310

14-
The library is compatible with Ruby 1.9 and higher.
15-
16-
It is compatible with Elasticsearch's API versions from 0.90 till current, just use a release matching major version of Elasticsearch.
17-
18-
| Ruby | | Elasticsearch |
19-
|:-------------:|:-:| :-----------: |
20-
| 0.90 || 0.90 |
21-
| 1.x || 1.x |
22-
| 2.x || 2.x |
23-
| 5.x || 5.x |
24-
| 6.x || 6.x |
25-
| 7.x || 7.x |
26-
| master || master |
11+
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
2712

2813
## Installation
2914

3015
Install the package from [Rubygems](https://rubygems.org):
3116

32-
gem install elasticsearch-api
33-
34-
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://gembundler.com):
35-
36-
gem 'elasticsearch-api', git: 'git://github.com/elasticsearch/elasticsearch-ruby.git'
17+
```
18+
gem install elasticsearch-api
19+
```
3720

38-
or install it from a source code checkout:
21+
Or add it to your Gemfile:
3922

40-
git clone https://github.com/elasticsearch/elasticsearch-ruby.git
41-
cd elasticsearch-ruby/elasticsearch-api
42-
bundle install
43-
rake install
23+
```
24+
gem 'elasticsearch-api'
25+
```
4426

4527
## Usage
4628

47-
The library is designed as a group of standalone Ruby modules, which can be mixed into a class
48-
providing connection to Elasticsearch -- an Elasticsearch client.
29+
The library is designed as a group of standalone Ruby modules, which can be mixed into a class providing connection to Elasticsearch -- an Elasticsearch client. It's possible to mix it into any client, and the methods will be available in the top namespace.
4930

5031
### Usage with the `elasticsearch` gem
5132

52-
**When you use the client from the [`elasticsearch-ruby`](https://github.com/elasticsearch/elasticsearch-ruby/) package,
53-
the library modules have been already included**, so you just call the API methods:
33+
**When you use the client from the [`elasticsearch-ruby`](https://github.com/elasticsearch/elasticsearch-ruby/) package, the library modules have been already included**, so you just call the API methods:
5434

5535
```ruby
5636
require 'elasticsearch'
@@ -64,8 +44,7 @@ client.search(index: 'myindex', body: { query: { match: { title: 'test' } } })
6444
# => {"took"=>2, ..., "hits"=>{"total":5, ...}}
6545
```
6646

67-
Full documentation and examples are included as RDoc annotations in the source code
68-
and available online at <http://rubydoc.info/gems/elasticsearch-api>.
47+
Full documentation is included as RDoc annotations in the source code and available online at <http://rubydoc.info/gems/elasticsearch-api>.
6948

7049
### Usage with a custom client
7150

elasticsearch-xpack/README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
# Elasticsearch::XPack
22

3-
A Ruby integration for the [X-Pack extension](https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html) for Elasticsearch.
3+
----
4+
**This library is deprecated**
45

6+
The API endpoints currently living in `elasticsearch-xpack` will be moved into `elasticsearch-api` in version 8.0.0 and forward. You should be able to keep using `elasticsearch-xpack` and the `xpack` namespace in `7.x`. We're running the same tests in `elasticsearch-xpack`, but if you encounter any problems, please let us know [in this issue](https://github.com/elastic/elasticsearch-ruby/issues/1274).
57

6-
## Installation
8+
However, be aware in `8.0`, the xpack library and namespace won't be available anymore.
79

8-
Install the package from [Rubygems](https://rubygems.org):
10+
----
911

10-
gem install elasticsearch-xpack
12+
A Ruby integration for the [X-Pack extension](https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html) for Elasticsearch.
1113

12-
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://gembundler.com):
14+
## Installation
1315

14-
gem 'elasticsearch-xpack', git: 'https://github.com/elastic/elasticsearch-ruby.git'
16+
Install the package from [Rubygems](https://rubygems.org):
1517

18+
gem install elasticsearch-api
1619

1720
## Usage
1821

19-
If you use the official [Ruby client for Elasticsearch](https://github.com/elastic/elasticsearch-ruby),
20-
require the library in your code, and all the methods will be automatically available in the `xpack` namespace:
22+
If you use the official [Ruby client for Elasticsearch](https://github.com/elastic/elasticsearch-ruby), all the methods will be automatically available:
2123

2224
```ruby
2325
require 'elasticsearch'
24-
require 'elasticsearch/xpack'
2526

26-
client = Elasticsearch::Client.new url: 'http://elastic:changeme@localhost:9200'
27+
client = Elasticsearch::Client.new(url: 'http://elastic:changeme@localhost:9200')
2728

2829
client.xpack.info
2930
# => {"build"=> ..., "features"=> ...}
3031
```
3132

32-
The integration is designed as a standalone `Elasticsearch::XPack::API` module, so it's easy
33-
to mix it into a different client, and the methods will be available in the top namespace.
33+
The integration is designed as a standalone `Elasticsearch::XPack::API` module, so it's easy to mix it into a different client, and the methods will be available in the top namespace.
3434

35-
For documentation, look into the RDoc annotations in the source files, which contain links to the
36-
official [X-Pack for the Elastic Stack](https://www.elastic.co/guide/en/x-pack/current/index.html) documentation.
35+
For documentation, look into the RDoc annotations in the source files, which contain links to the official [X-Pack for the Elastic Stack](https://www.elastic.co/guide/en/x-pack/current/index.html) documentation.
3736

3837
For examples, look into the [`examples`](examples) folder in this repository.
3938

40-
You can use the provided `test:elasticsearch` Rake task to launch
41-
a [Docker-based](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)
42-
Elasticsearch node with the full X-Pack license preinstalled.
39+
You can use the provided `test:elasticsearch` Rake task to launch a [Docker-based](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) Elasticsearch node with the full X-Pack license preinstalled.
4340

4441
## License
4542

0 commit comments

Comments
 (0)