{"id":13462946,"url":"https://github.com/elastic/elasticsearch-ruby","last_synced_at":"2025-05-12T05:33:51.277Z","repository":{"id":8291582,"uuid":"9831101","full_name":"elastic/elasticsearch-ruby","owner":"elastic","description":"Ruby integrations for Elasticsearch","archived":false,"fork":false,"pushed_at":"2025-05-09T14:22:21.000Z","size":16903,"stargazers_count":1974,"open_issues_count":10,"forks_count":610,"subscribers_count":356,"default_branch":"main","last_synced_at":"2025-05-12T04:13:28.489Z","etag":null,"topics":["client","elastic","elasticsearch","ruby","rubynlp","search"],"latest_commit_sha":null,"homepage":"https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elastic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-05-03T07:39:25.000Z","updated_at":"2025-05-11T18:16:31.000Z","dependencies_parsed_at":"2023-01-14T11:45:30.534Z","dependency_job_id":"db18b41d-95a1-4b71-84c8-63be6a062309","html_url":"https://github.com/elastic/elasticsearch-ruby","commit_stats":{"total_commits":3173,"total_committers":167,"mean_commits":19.0,"dds":0.5357705641348881,"last_synced_commit":"66ecf845899dca077721b769216404b1f85bbe8e"},"previous_names":["elasticsearch/elasticsearch-ruby"],"tags_count":222,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Felasticsearch-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Felasticsearch-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Felasticsearch-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Felasticsearch-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elastic","download_url":"https://codeload.github.com/elastic/elasticsearch-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253683752,"owners_count":21947210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","elastic","elasticsearch","ruby","rubynlp","search"],"created_at":"2024-07-31T13:00:41.701Z","updated_at":"2025-05-12T05:33:51.251Z","avatar_url":"https://github.com/elastic.png","language":"Ruby","readme":"# Elasticsearch\n[![8.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml/badge.svg?branch=8.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml) [![8.18](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.18.yml/badge.svg?branch=8.18)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.18.yml) [![9.0](https://github.com/elastic/elasticsearch-ruby/actions/workflows/9.0.yml/badge.svg?branch=9.0)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/9.0.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby)\n\n**[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)**\nor\n**[sign-up](https://cloud.elastic.co/registration?elektra=en-ess-sign-up-page)**\n**for a free trial of Elastic Cloud**.\n\nThis repository contains the official [Elasticsearch](https://www.elastic.co/products/elasticsearch) Ruby client. The [`elasticsearch`](https://github.com/elasticsearch/elasticsearch-ruby/tree/main/elasticsearch) gem is a complete Elasticsearch client which uses two separate libraries:\n\n* [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby) - provides the low-level code for connecting to an Elasticsearch cluster.\n* [`elasticsearch-api`](https://github.com/elasticsearch/elasticsearch-ruby/tree/main/elasticsearch-api) - provides a Ruby API for the Elasticsearch RESTful API.\n\n## Documentation\n\nPlease refer to \n[the full documentation on elastic.co](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html) \nfor comprehensive information.\n\nBoth `elastic-transport` and `elasticsearch-api` are documented. You can check \nthe [`elastic-transport`](https://rubydoc.info/github/elastic/elastic-transport-ruby/) \nand the [`elasticsearch-api`](http://rubydoc.info/gems/elasticsearch-api) \ndocumentation at RubyDocs.\n\n## Installation\n\n```ruby\ngem install elasticsearch\n```\n\nRefer to the [Installation section](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_installation)\nof the getting started documentation.\n\n## Connecting\n\nRefer to the [Connecting section](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_connecting)\nof the getting started documentation.\n\n## Usage\n\n```ruby\nrequire 'elasticsearch'\nclient = Elasticsearch::Client.new(host: 'https://my-elasticsearch-host.example')\nclient.ping\nclient.search(q: 'test')\n```\n\n* [Creating an index](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_creating_an_index)\n* [Indexing a document](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_indexing_documents)\n* [Getting documents](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_getting_documents)\n* [Searching documents](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_searching_documents)\n* [Updating documents](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_updating_documents)\n* [Deleting documents](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_deleting_documents)\n* [Deleting an index](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html#_deleting_an_index)\n\nRefer to [the official documentation](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/examples.html)\nfor examples of how to use the most frequently called APIs and \n[`doc/examples`](https://github.com/elastic/elasticsearch-ruby/blob/main/docs/examples/) \nfor some practical examples.\n\n**For optimal performance, you should use a HTTP library which supports persistent (\"keep-alive\") connections, e.g. [Patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus).** These libraries are not dependencies of the Elasticsearch gems. Ensure you define a dependency for a HTTP library in your own application.\n\nCheck out these other official Ruby libraries for working with Elasticsearch:\n\n* [`elasticsearch-rails`](https://github.com/elasticsearch/elasticsearch-rails) - integration with Ruby models and Rails applications.\n* [`elasticsearch-extensions`](https://github.com/elastic/elasticsearch-ruby/tree/7.17/elasticsearch-extensions), *deprecated*.\n* [`elasticsearch-dsl`](https://github.com/elastic/elasticsearch-dsl-ruby) which provides a Ruby API for the [Elasticsearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html).\n\nPlease see their respective READMEs for information and documentation.\n\n## Compatibility\n\nWe follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/).\n\nLanguage clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch without breaking.\nIt does not mean that the client automatically supports new features of newer Elasticsearch versions; it is only possible after a release of a new client version.\nFor example, a 8.12 client version won't automatically support the new features of the 8.13 version of Elasticsearch, the 8.13 client version is required for that.\nElasticsearch language clients are only backwards compatible with default distributions and without guarantees made.\n\n| Gem Version |   | Elasticsearch  Version | Supported |\n|-------------|---|------------------------|-----------|\n| 8.x         | → | 8.x                    | 8.x       |\n| 9.x         | → | 9.x                    | 9.x       |\n| main        | → | main                   |           |\n\n## Try Elasticsearch and Kibana locally\n\nIf you want to try Elasticsearch and Kibana locally, you can run the following command:\n\n```bash\ncurl -fsSL https://elastic.co/start-local | sh\n```\n\nThis will run Elasticsearch at http://localhost:9200 and Kibana at http://localhost:5601 using Docker.\n\nMore information is available [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/run-elasticsearch-locally.html).\n\n## Development\n\nSee [CONTRIBUTING](https://github.com/elastic/elasticsearch-ruby/blob/main/CONTRIBUTING.md).\n\n## License\n\nThis software is licensed under the [Apache 2 license](./LICENSE). See [NOTICE](./NOTICE).\n","funding_links":[],"categories":["Active Record Plugins","Ruby","Elasticsearch developer tools and utilities","Search","Clients \u0026 SDKs"],"sub_categories":["Rails Search","Clients"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Felasticsearch-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felastic%2Felasticsearch-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Felasticsearch-ruby/lists"}