Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Honza Kral - Explore Your Data with Elasticsearch
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
NewCircle Training
September 20, 2013
Technology
1.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Honza Kral - Explore Your Data with Elasticsearch
NewCircle Training
September 20, 2013
More Decks by NewCircle Training
See All by NewCircle Training
Spark: A Coding Joyride | QCon SF 2015
newcircle
0
900
Intro to Spark Streaming
newcircle
1
2.1k
Artisanal Data on the Web: Using JS and Data to Get Literary 21st Century Style
newcircle
0
720
Java 8 Lambda Expressions & Streams
newcircle
0
650
Macros vs Types
newcircle
0
1.4k
Larry Schiefer - Exploring SDK Add-on for Android Devices
newcircle
0
3.1k
Scala Collections: Why Not? - Paul Phillps
newcircle
2
9.9k
Dave Smith- Mastering the Android Touch System
newcircle
9
17k
Geoff Matrangola- Migrating Your Apps to the New Gradle Build Process
newcircle
1
1.9k
Other Decks in Technology
See All in Technology
あなたのDartコードは丸見えかもしれない ~reFlutterで暴くFlutterアプリの中身と多層防御~
zozotech
PRO
0
580
Vibe-to-Spec開発_実践ガイド
happysamurai294
0
110
cdk deployとcdkd deploy、実際にデプロイして5倍速近くの差を実測した
yama3133
1
110
(swiftc) NonCopyableとライフタイム修飾子
teamhimeh
0
150
スクラム祭り2026福井トラック_閉じたループから価値のスパイラルへ
kc_nakanishi
0
190
AWSDirectConnectの構築の進め方を整理してみた
masa_my
1
210
AI時代のエンジニアの情報発信〜個人の発信を組織の力に変える〜
ryo_kawamata
0
290
ガチで放置できるClaude Code実行環境の作り方.pdf
lamaglama39
5
10k
Vue で書く 空間コンピューティング、TresJS と WebXR を使ったXR デバイスのフロントエンド開発
hiranuma
0
120
外国人エンジニアがVueプロトタイプで仕様を合わせている話 / Vue Fes Japan 2026 LT
eluwing
0
290
Patterns in AI Driven Software Development
akosma
PRO
0
330
AWSセキュリティで活用するAI機能
cmusudakeisuke
1
350
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
How STYLIGHT went responsive
nonsquared
100
6.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Building Adaptive Systems
keathley
44
3.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
950
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Building AI with AI
inesmontani
PRO
1
1.3k
ラッコキーワード サービス紹介資料
rakko
5
5.5M
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
880
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.4k
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
facets # curl -XGET localhost:9200/meetup/_search -d '{ “query”: { ...
}, “facets”: { “monthly_meetups”: { “date_histogram”: { “field”: “event_date”, “interval”: “month” } }, “attendees_per_topic”: { “terms_stats”: { “key_field”: “topic”, “value_script”: “doc['users'].values.length” } } } }'
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 • ….
Let us pray to the demo gods!
percolator # curl -XPUT localhost:9200/_percolator/stack/meet -d '{ "query" : {
"term" : { "tile" : "meetup" } } }' # curl -XPUT localhost:9200/stack/question/_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!