{"repo":"doximity/es-elasticity","free":true,"listed":false,"github":"https://github.com/doximity/es-elasticity","clone":"git clone https://github.com/doximity/es-elasticity.git","description":"Elasticsearch Library for Ruby","language":"Ruby","stars":26,"topics":["elasticsearch"],"license":null,"category":"databases-storage","readme_excerpt":"--- Elasticity is a model oriented approach to Elasticsearch. In simple words, a Document is represented by it's own class, similar to what ActiveRecord does for database rows. In Elasticsearch terminology, a document is an entity stored in Elasticsearch and associated to an index. Whenever a search is performed, a collection of documents is returned. Elasticity maps those documents into objects, providing a rich object representation of a document. Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yourself as: $ gem install es-elasticity Usage Version Support This gem has elasticsearch-ruby as a dependency. In order to use different versions of elasticsearch you will need to match your version of elasticsearch-ruby to the version of elasticsearch you want to use (see here. Elasticity should work across all versions of elastisearch-ruby, although they have not all been tested so there are likely edge cases. Currently tests are run on CirlceCI against elasticsearch 7.17.3 with elasticsearch-ruby 7.17.1. Configuration It is recommended you use Typhoeus for HTTP connections to Elasticsearch. Document model definition The first thing to do, is setup a model representing your documents. The class level represents the index, while the instance level represents each Document stored in the index. This is similar to how ActiveRecord maps tables vs rows. Indexing An instance of the model is an in-memory representation of a Document. The ","default_branch":null,"files":null,"tree":[],"storefront":"/r/doximity","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/doximity/es-elasticity/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}