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
explore your data with elasticsearch
Search
Elasticsearch Inc
October 12, 2013
Technology
3
790
explore your data with elasticsearch
A talk given at RuPy 2013
Elasticsearch Inc
October 12, 2013
Tweet
Share
More Decks by Elasticsearch Inc
See All by Elasticsearch Inc
OSCON: Scaling a distributed engineering team from 50-250
elasticsearch
13
1.5k
Stuff a Search Engine Can Do
elasticsearch
17
1.7k
Using Elastic to monitor anything
elasticsearch
3
1.5k
Log all the things!
elasticsearch
4
1.2k
Why Elastic? @ 50th Vinitaly 2016
elasticsearch
5
1.9k
What's New In Elasticland?
elasticsearch
3
940
Kibana, Timelion, Graph Meetup
elasticsearch
3
790
Elastic for Time Series Data and Predictive Analytics
elasticsearch
4
3.1k
Elastic 2.0
elasticsearch
1
750
Other Decks in Technology
See All in Technology
Tokyo_reInforce_2025_recap_iam_access_analyzer
hiashisan
0
180
SmartNewsにおける 1000+ノード規模 K8s基盤 でのコスト最適化 – Spot・Gravitonの大規模導入への挑戦
vsanna2
0
120
論文紹介:LLMDet (CVPR2025 Highlight)
tattaka
0
310
高速なプロダクト開発を実現、創業期から掲げるエンタープライズアーキテクチャ
kawauso
2
8.2k
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.7k
赤煉瓦倉庫勉強会「Databricksを選んだ理由と、絶賛真っ只中のデータ基盤移行体験記」
ivry_presentationmaterials
2
330
モバイル界のMCPを考える
naoto33
0
420
CursorによるPMO業務の代替 / Automating PMO Tasks with Cursor
motoyoshi_kakaku
2
930
第4回Snowflake 金融ユーザー会 Snowflake summit recap
tamaoki
1
240
Beyond Kaniko: Navigating Unprivileged Container Image Creation
f30
0
130
Tech-Verse 2025 Keynote
lycorptech_jp
PRO
0
1.8k
開発生産性を測る前にやるべきこと - 組織改善の実践 / Before Measuring Dev Productivity
kaonavi
3
1.1k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
960
Measuring & Analyzing Core Web Vitals
bluesmoon
7
500
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Faster Mobile Websites
deanohume
307
31k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Transcript
explore your data with elasticsearch Honza Král @honzakral
REST HTTP JSON distributed search analytics real-time scalable open-source Lucene
…
setup # wget elasticsearch.tar.gz # tar xzvf elasticsearch.tar.gz # bin/elasticsearch
# curl localhost:9200
documents # curl -XPUT localhost:9200/stack/question/42 -d '{ “some”: “json” }'
# curl -XGET localhost:9200/stack/question/42 # curl -XDELETE localhost:9200/stack/question/42
search # curl -XGET localhost:9200/_search?q=meetup # curl -XGET localhost:9200/_search -d
'{ “query”: { “query_string”: { “query”: “meetup AND title:python” } } }'
queries & filters # curl -XGET localhost:9200/stack/_search -d '{ “query”:
{ “filtered”: { “query”: { “bool”: { “must”: [ {"multi_match": { "fields": ["title^10", "body"] "query": "python" }}, ], “must_not”: [ {“match”: {“title”: “php”} ] } }, “filter”: { “range”:{"creation_date":{"from":"2013-01-01"}} } } } }'
filter when you can, query if you must
Let us pray to the demo gods!
mix & match curl -XGET http://localhost:9200/dba.stackexchange.com/question/_search -d ' { "query":
{ "custom_score": { "query": { "filtered": { "query": { "bool": { "must": [ {"multi_match": {"fields": ["title^10", "body"], "query": "mysql"}}, { "has_child": { "child_type": "answer", "query": {"match": {"body": "nosql"}} } } ], "must_not": [ {"multi_match": {"fields": ["title", "body"], "query": "nosql"}} ] } }, "filter": { "range": {"creation_date": {"from": "2012-01-01"}} } } }, "script": "(_score + 1) * doc[\"rating\"].value" } }, "fields": ["title", "rating", "creation_date"], "highlight": { "fields": { "title": {"fragment_size" : 50}, "body": {"fragment_size" : 50} } }, "facets": { "tags": { "terms": {"field": "tags"} }, "frequency": { "date_histogram": {"field": "creation_date", "interval": "month"} } } }' Find questions that • Were asked last year • Contain “mysql” in title or body • Don't contain “nosql” • Have answer that has “nosql” in title or body • Include question rating into score calculation • Highlight matches in html • Aggregate over time and tags • ….
percolator # curl -XPUT localhost:9200/_percolator/conf/meet -d '{ "query" : {
"term" : { "tile" : "meetup" } } }' # curl -XPUT localhost:9200/conf/event/_percolate -d '{ “doc”: { “title”: “SF Python Meetup” } }'
suggester – auto-complete # curl -X POST 'localhost:9200/music/_suggest' -d '{
"song-suggest" : { "text" : "n", "completion" : { "field" : "song_suggest" } } }' { "text" : "Nirvana - Nevermind", "score" : 34.0, "payload" : {"artist_id":2321} }
suggester – did you mean? # curl -XPOST 'localhost:9200/_search' -d
{ "suggest" : { "text" : "Johny Walker", "simple_phrase" : { "phrase" : { ... MAGIC HERE ... "direct_generator" : [ { "field" : "body" } ] } } } }' { "text" : "Johnnie Walker", "score" : 0.314295 }
Is it web scale?
YES!
distributed model
Thanks!