{"id":15797980,"url":"https://github.com/grokify/elastirad-ruby","last_synced_at":"2026-05-01T09:32:11.999Z","repository":{"id":142759181,"uuid":"62989167","full_name":"grokify/elastirad-ruby","owner":"grokify","description":"Elasticsearch client with JSON API interface in Ruby.","archived":false,"fork":false,"pushed_at":"2016-11-14T09:18:29.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T00:46:37.425Z","etag":null,"topics":["elasticsearch","ruby","ruby-gem","search-engine"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grokify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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}},"created_at":"2016-07-10T08:21:38.000Z","updated_at":"2017-07-20T18:05:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"a301de9a-c243-423d-af61-9959f79cfb86","html_url":"https://github.com/grokify/elastirad-ruby","commit_stats":{"total_commits":48,"total_committers":1,"mean_commits":48.0,"dds":0.0,"last_synced_commit":"e7ad65eb8838db2675788dc498b45fde2232f25d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/grokify/elastirad-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Felastirad-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Felastirad-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Felastirad-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Felastirad-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grokify","download_url":"https://codeload.github.com/grokify/elastirad-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Felastirad-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["elasticsearch","ruby","ruby-gem","search-engine"],"created_at":"2024-10-05T00:22:39.588Z","updated_at":"2026-05-01T09:32:11.983Z","avatar_url":"https://github.com/grokify.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Elastirad: A Ruby SDK Wrapper for Elasticsearch\n===============================================\n\n[![Gem Version][gem-version-svg]][gem-version-link]\n[![Build Status][build-status-svg]][build-status-link]\n[![Dependency Status][dependency-status-svg]][dependency-status-link]\n[![Code Climate][codeclimate-status-svg]][codeclimate-status-link]\n[![Scrutinizer Code Quality][scrutinizer-status-svg]][scrutinizer-status-link]\n[![Downloads][downloads-svg]][downloads-link]\n[![Docs][docs-rubydoc-svg]][docs-rubydoc-link]\n[![License][license-svg]][license-link]\n\n## Synopsis\n\nElastirad is a simple wrapper for Elasticsearch's `Elasticsearch::API` that makes requests using Elasticsearch's online cURL-based documentation without needing to understand the syntax of the [Elasticsearch Ruby SDK](https://github.com/elastic/elasticsearch-ruby).\n\n`Elastirad::Client` includes `Elasticsearch::API` and thus supports `Elasticsearch::API` methods.\n\nBenefits include:\n\n* Direct use of documentation URLs, e.g. `_search`\n* [URI search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html), e.g. `tweet/_search?q=user:kimchy`\n\n## Installation\n\nDownload and install elastirad with the following:\n\n```\n$ gem install elastirad\n```\n\n## Usage\n\n```ruby\nrequire 'elastirad'\n\n# Defaults to http://localhost:9200\n\nrad = Elastirad::Client.new\n\n# All of the following arguments are optional\n# Setting :index will enable request code to not include the index\n# for greater flexibility when switching between deployments, e.g.\n# dev, staging, production, etc.\n\nrad = Elastirad::Client.new(\n  scheme:   'https',      # defaults to 'http'\n  hostname: 'localhost',  # defaults to 'localhost'\n  port:     9200,         # defaults to 9200\n  index:    'twitter'\n)\n\n# path can be a simple string. Leading slash will over ride default :index\nresult_hash = rad.request path: '/twitter/_count'\n\n# path can also be an array\nresult_hash = rad.request path: ['/twitter/tweet', 1 ]\n\n# default index can be used without leading slash\nresult_hash = rad.request path: ['tweet', 1 ]\n\n# retreive all responses for :get requests only\nresult_hash = rad.request_all path: 'tweet/_search'\n\n# optional :verb can be used for non-GET requests, :get is used by default\n\n# :body can be a hash or JSON string\ntweet = { user: 'kimchy', message: 'trying out Elasticsearch' }\n\nresult_hash = rad.request(\n  verb: 'put',\n  path: ['tweet', 1 ],\n  body: tweet\n)\n\nresult_hash = rad.request(\n  verb: 'put',\n  path: ['tweet', 1 ],\n  body: JSON.dump( tweet )\n)\n\n# Can be used with ES URI Search\nresult_hash = rad.request(\n  path: 'tweet/_search?q=user:kimchy'\n)\n\n# :put verb can automatically be added using #rad_index method\nresult_hash = rad.rad_index(\n  path: ['tweet', 1 ],\n  body: tweet\n)\n\n# Use with Hashie\nrequire 'hashie'\nmash = Hashie::Mash.new result_hash\nputs mash.hits.total\n\n# Supports Elasticsearch::API methods\np rad.cluster.health\n# --\u003e GET _cluster/health {}\n# =\u003e \"{\"cluster_name\":\"elasticsearch\" ... }\"\n```\n\n## Documentation\n\nThis gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:\n\n```bash\n$ gem install yard\n$ yard server -g\n```\n\n## Change Log\n\nSee [CHANGELOG.md](CHANGELOG.md).\n\n## Links\n\nElasticseach Reference Guide\n\n* https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html\n\nElasticsearch::API for Ruby\n\n* https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-api\n\n## License\n\nElastirad is available under an MIT-style license. See [LICENSE.md](LICENSE.md) for details.\n\nElastirad \u0026copy; 2014-2016 by John Wang\n\n [gem-version-svg]: https://badge.fury.io/rb/elastirad.svg\n [gem-version-link]: http://badge.fury.io/rb/elastirad\n [downloads-svg]: http://ruby-gem-downloads-badge.herokuapp.com/elastirad\n [downloads-link]: https://rubygems.org/gems/elastirad\n [build-status-svg]: https://api.travis-ci.org/grokify/elastirad-ruby.svg?branch=master\n [build-status-link]: https://travis-ci.org/grokify/elastirad-ruby\n [coverage-status-svg]: https://coveralls.io/repos/grokify/elastirad-ruby/badge.svg?branch=master\n [coverage-status-link]: https://coveralls.io/r/grokify/elastirad-ruby?branch=master\n [dependency-status-svg]: https://gemnasium.com/grokify/elastirad-ruby.svg\n [dependency-status-link]: https://gemnasium.com/grokify/elastirad-ruby\n [codeclimate-status-svg]: https://codeclimate.com/github/grokify/elastirad-ruby/badges/gpa.svg\n [codeclimate-status-link]: https://codeclimate.com/github/grokify/elastirad-ruby\n [scrutinizer-status-svg]: https://scrutinizer-ci.com/g/grokify/elastirad-ruby/badges/quality-score.png?b=master\n [scrutinizer-status-link]: https://scrutinizer-ci.com/g/grokify/elastirad-ruby/?branch=master\n [docs-rubydoc-svg]: https://img.shields.io/badge/docs-rubydoc-blue.svg\n [docs-rubydoc-link]: http://www.rubydoc.info/gems/elastirad/\n [license-svg]: https://img.shields.io/badge/license-MIT-blue.svg\n [license-link]: https://github.com/grokify/elastirad-ruby/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokify%2Felastirad-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrokify%2Felastirad-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokify%2Felastirad-ruby/lists"}