Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ElasticSearch with Ruby
Search
Oriol Gual
March 22, 2013
Programming
10
3.2k
ElasticSearch with Ruby
An introductory talk about using ElasticSearch with Ruby (and Rails).
Oriol Gual
March 22, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
Realtime API 入門
riofujimon
0
160
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
750
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
15
2.3k
RubyLSPのマルチバイト文字対応
notfounds
0
120
CSC509 Lecture 13
javiergs
PRO
0
110
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
200
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.5k
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Quine, Polyglot, 良いコード
qnighy
4
650
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
280
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
610
subpath importsで始めるモック生活
10tera
0
340
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Code Review Best Practice
trishagee
64
17k
Being A Developer After 40
akosma
87
590k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Why Our Code Smells
bkeepers
PRO
334
57k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Writing Fast Ruby
sferik
627
61k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
ElasticSearch with Ruby
Oriol Hi, I ‘m
Me • github.com/oriolgual • twitter.com/oriolgual • codegram.com
None
None
ElasticSearch • OpenSource search engine • Speaks JSON over HTTP
• RESTFul • WebScaleReady™
Basics • Indexs • Types • Documents • Mapping •
Analyzing • Boosting
Examples curl -XPUT 'http://localhost:9200/twitter/' curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{ "user"
: "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elastic Search" }' curl -XGET 'http://localhost:9200/twitter/tweet/1' curl -XGET 'http://localhost:9200/twitter/tweet/_search?q=user:kimchy'
+ Ruby ElasticSearch
Clients • Tire • Elastictastic • Rubberband • Net::HTTP (nah,
just kidding)
Tire
None
Tire • ActiveRecord/ActiveModel integration • Custom DSL • Indexing, mapping,
analyzing, auto-loading • Searching
Elastictastic • Object Document Mapper • Define fields at the
model • has_many and belongs_to support • Better search DSL (than Tire)
Rubberband • Lightweight Ruby client • Different transports • Index
admin, indexing and searching.
None
Our approach • Rubberband • Indexer objects triggered by an
observer • ElasticSearch only as search engine • Custom service objects to search
Examples • Observer • Indexer • Service object
• filters • custom_score • custom_filter_score • boosting • geo-stuff
ElasticSearch goodies
• Elastomer.com • Bonsai.io • Found.no • Searchbox.io ElasticSearch SaaS
Further reading • http://www.elasticsearch.org/ • http://lucene.apache.org/ • https://github.com/karmi/tire • https://github.com/grantr/rubberband
• https://github.com/brewster/elastictastic • https://github.com/sonian/elasticsearch-jetty • http://getelastomer.com/blog/ • http://jontai.me/blog/
Thanks!