File: overview.asciidoc

package info (click to toggle)
ruby-elasticsearch 7.17.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,820 kB
  • sloc: ruby: 44,308; sh: 16; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 2,217 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[[ruby_client]]
== Overview

The `elasticsearch` http://rubygems.org/gems/elasticsearch[Rubygem] provides a 
low-level client for communicating with an {es} cluster, fully compatible with 
other official clients.

More documentation is hosted in https://github.com/elastic/elasticsearch-ruby[Github] and http://rubydoc.info/gems/elasticsearch[RubyDoc].

[discrete]
=== Features

* Pluggable logging and tracing
* Pluggable connection selection strategies (round-robin, random, custom)
* Pluggable transport implementation, customizable and extendable
* Pluggable serializer implementation
* Request retries and dead connections handling
* Node reloading (based on cluster state) on errors or on demand
* Modular API implementation
* 100% REST API coverage


[discrete]
[[transport-api]]
=== Transport and API

The `elasticsearch` gem combines three separate Rubygems:

* https://github.com/elastic/elasticsearch-ruby/tree/7.16/elasticsearch-transport[`elasticsearch-transport`]
provides an HTTP Ruby client for connecting to the {es} cluster,

* https://github.com/elastic/elasticsearch-ruby/tree/7.16/elasticsearch-api[`elasticsearch-api`]
provides a Ruby API for the {es} RESTful API.

* https://github.com/elastic/elasticsearch-ruby/tree/7.16/elasticsearch-xpack/[`elasticsearch-xpack`]
provides a Ruby API for the {es} RESTful API for X-Pack endpoints. Notice that the API endpoints 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` versions. We're running the same tests in `elasticsearch-xpack`, but if you encounter any problems, please let us know https://github.com/elastic/elasticsearch-ruby/issues/1274[in this issue].

Please consult their respective documentation for configuration options and 
technical details.

Notably, the documentation and comprehensive examples for all the API methods 
are contained in the source, and available online at 
http://rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Actions[Rubydoc].

Keep in mind, that for optimal performance, you should use an HTTP library which 
supports persistent ("keep-alive") HTTP connections.