Slide 1

Slide 1 text

Elasticsearch on Rails

Slide 2

Slide 2 text

ANDREW NESBITT

Slide 3

Slide 3 text

Distributed full text search Based on Lucene RESTful web interface JSON NoSQL document store Scalable multi-tenancy What is Elasticsearch?

Slide 4

Slide 4 text

Web Application Framework Model View Controller Active Record ORM Convention over Configuration Extracted from Basecamp What is Ruby on Rails?

Slide 5

Slide 5 text

Full Text Search Sorting Filtering Faceting Pagination What can we do with it? Boosting Stemming Highlighting Document storage Analytics

Slide 6

Slide 6 text

github.com/elastic/elasticsearch-rails

Slide 7

Slide 7 text

elasticsearch-model elasticsearch-rails elasticsearch-persistence elasticsearch gems

Slide 8

Slide 8 text

ActiveRecord and Mongoid integration ActiveRecord::Relation-based Search Kaminari and WillPaginate pagination Model Serialization to JSON Automatic indexing updating callbacks elasticsearch-model

Slide 9

Slide 9 text

Rake tasks for importing data to ES ActiveSupport Instrumentation Example application Templates generation elasticsearch-rails

Slide 10

Slide 10 text

Use elasticsearch as a NoSQL database to store and retrieve documents using an ActiveModel interface. elasticsearch-persistence

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

LIVE CODING

Slide 13

Slide 13 text

http://libraries.io

Slide 14

Slide 14 text

"If I have seen further it is by standing on the shoulders of giants” Sir Isaac Newton

Slide 15

Slide 15 text

Popular? Active? License? Documented? Contributor friendly? Follows SemVer? High bus factor? Is it dependable? How do you know if a library is worth using?

Slide 16

Slide 16 text

It works by counting the number and quality of links to a page to determine a rough estimate of how important the website is. ! The underlying assumption is that more important websites are likely to receive more links from other websites.

Slide 17

Slide 17 text

It works by counting the number and quality of dependencies to a library to determine a rough estimate of how important the library is. ! The underlying assumption is that more dependable libraries are likely to be more dependent on by other libraries.

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

activesupport rails memcached devise waffleiron activemerchant

Slide 20

Slide 20 text

760,425 projects from 24 package managers in 152 different languages

Slide 21

Slide 21 text

LIVE DEMOING

Slide 22

Slide 22 text

github.com/ankane/searchkick

Slide 23

Slide 23 text

Good defaults SQL-like query interface Zero-downtime reindexing Autocomplete Lots of nice little touches searchkick

Slide 24

Slide 24 text

github.com/toptal/chewy

Slide 25

Slide 25 text

Multi-model indexes Atomic bulk imports Powerful query DSL Every index is observable by all related models chewy

Slide 26

Slide 26 text

Deployment Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['ELASTICSEARCH_URL']

Slide 27

Slide 27 text

found.no qbox.io bonsai.io compose.io/elasticsearch indexisto.com Hosted Services

Slide 28

Slide 28 text

github.com/Asquera/elasticsearch-http-basic

Slide 29

Slide 29 text

Thanks! @teabass http://nesbitt.io github.com/andrew