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
Honza Kral - Explore Your Data with Elasticsearch
Search
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
880
Intro to Spark Streaming
newcircle
1
2k
Artisanal Data on the Web: Using JS and Data to Get Literary 21st Century Style
newcircle
0
700
Java 8 Lambda Expressions & Streams
newcircle
0
640
Macros vs Types
newcircle
0
1.3k
Larry Schiefer - Exploring SDK Add-on for Android Devices
newcircle
0
3k
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.8k
Other Decks in Technology
See All in Technology
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
610
Jitera Company Deck
jitera
0
270
設計レビューとAIハーネスで向き合う AIが生み出した新しいボトルネックの対処法 / Design Reviews and AI Harnesses Against New Bottlenecks Created by AI
nstock
4
430
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
170
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
530
発表と総括 / Presentations and Summary
ks91
PRO
0
190
10年目を迎えた「ABEMA」がどのように AI 活用を推進して、AI 駆動開発にシフトしているのか / How ABEMA, entering its 10th year, is promoting the use of AI and shifting toward AI-driven development
miyukki
0
370
データエンジニアリングとドメイン駆動設計
masuda220
PRO
14
2.5k
なぜ、あなたのAPIは使われないのか? AX時代の設計原則、ガードレール、運用体制
yokawasa
1
210
Multicaで30個のミニプロジェクトをAIエージェント運用して見えてきたこと
eiei114
1
630
2026年のソフトウェア開発を考える(2026/07版) / Agentic Software Engineering 2026-07 Findy Edition
twada
PRO
25
11k
Playwright × AI Agent でE2Eテストはどう変わるか AI駆動テストの可能性と実用検証の結果
taiga7543
2
800
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
330
WCS-LA-2024
lcolladotor
0
750
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Prompt Engineering for Job Search
mfonobong
0
380
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
340
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Rails Girls Zürich Keynote
gr2m
96
14k
Un-Boring Meetings
codingconduct
0
350
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!