IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Overview
editOverview
editThe elasticsearch
Rubygem provides a
low-level client for communicating with an Elasticsearch cluster, fully compatible with
other official clients.
More documentation is hosted in Github and RubyDoc.
Features
edit- 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
Transport and API
editThe elasticsearch
gem combines three separate Rubygems:
-
elasticsearch-transport
provides an HTTP Ruby client for connecting to the Elasticsearch cluster, -
elasticsearch-api
provides a Ruby API for the Elasticsearch RESTful API. -
elasticsearch-xpack
provides a Ruby API for the Elasticsearch RESTful API for X-Pack endpoints. Notice that the API endpoints living inelasticsearch-xpack
will be moved intoelasticsearch-api
in version 8.0.0 and forward. You should be able to keep usingelasticsearch-xpack
and thexpack
namespace in7.x
versions. We’re running the same tests inelasticsearch-xpack
, but if you encounter any problems, please let us know 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 Rubydoc.
Keep in mind, that for optimal performance, you should use an HTTP library which supports persistent ("keep-alive") HTTP connections.