Bloc Alumni

Gem Review: elasticsearch-rails 

Brittany Martin - Team Newman 

September 25th, 2014

What is Elasticsearch?

  • Tool for querying written words
  • A standalone database server, written in Java, that takes data in and stores it in a sophisticated format optimized for language based searches
  • Implemented with HTTP/JSON for requests
  • Restful API ---> friendly to Ruby

How does Elasticsearch work?

  • Elasticsearch is a piece of infrastructure built around Lucene’s Java libraries
  • A simple API 
  • Interoperation with non-Java/JVM languages
  • Can cluster and replicate

Well, then what is Lucene?

  • Java based
  • Dates to 1999!
  • Is the heart of Elasticsearch 
  • Widely considered best-of-breed in open-source search software but cumbersome to use directly

Where ES is Helpful

Where ES is NOT Helpful

How to Get Elasticsearch Up & Running Locally


  • $ brew update
  • $ brew docter
  • $ brew install elasticsearch
  • $ brew info elasticsearch


  • Download the .zip version and unzip it to a folder. 
  • Open a terminal, and navigate to the bindirectory, and run the executable elasticsearch file within, by typing in ./elasticsearch at the terminal

Open this url: http://localhost:9200 and you’ll see ElasticSearch respond 

elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml

ES working locally:

What's gem got to do with it?

elasticsearch-model elasticsearch-rails

The Retirement of Tire

The Original ES Rails Gem

Implement a blog with Elasticsearch

Let's kick it up a notch!

aka Production setup of Elasticsearch  

Bloc Alumni Gem Review: elasticsearch-rails

By Brittany Martin

Bloc Alumni Gem Review: elasticsearch-rails

Brittany presented to the Bloc Alumni gem review group what she has learned about Elasticsearch (history, implemenation, gems and how you can try it yourself).

  • 859
Loading comments...

More from Brittany Martin