Ruby on Rails - introduction of elasticsearch in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
Introduction
ElasticSearch has a well-documented JSON API, but you'll probably want to use some libraries that handle that for you:
- Elasticsearch - the official low level wrapper for the HTTP API
- Elasticsearch-rails - the official high level Rails integration that helps you to connect your Rails models with ElasticSearch using either ActiveRecord or Repository pattern
- Chewy - An alternative, non-official high level Rails integration that is very popular and arguably has better documentation
Let's use the first option for testing the connection:
Then fire up the ruby terminal and try it out: