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
Elasticsearch
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Domingo Suarez Torres
April 27, 2016
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elasticsearch
Elasticsearch introduction at the Mexico City JVM Group.
Domingo Suarez Torres
April 27, 2016
More Decks by Domingo Suarez Torres
See All by Domingo Suarez Torres
Orquestación de contenedores con Kubernetes SGNext
domix
0
120
JVM Reactive Programming
domix
0
51
#SGNext Massive storage in the Mexican banking industry
domix
0
72
Ratpack JVM_MX Meetup February 2016
domix
0
66
Other Decks in Programming
See All in Programming
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
140
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
5.8k
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
360
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
360
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
dotNET_vulnclicker_intro.pdf
deka_morita
0
130
Simple Storage Service(S3) is not simple
iwatsukayura
0
230
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
1
410
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
350
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.1k
カツオ、ご期待ください
suneo3476
0
160
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
170
Featured
See All Featured
Crafting Experiences
bethany
1
380
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
Designing for Timeless Needs
cassininazir
1
520
Code Reviewing Like a Champion
maltzj
529
40k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
700
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
300
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
Transcript
Elasticsearch Mexico City JVM Group April 2016
!Gracias por estar aqui¡
¡El meetup con mas asistencia de la historia!
What is the topic tonight?
Elastic search?
NO
Elastic Search?
NO
ElasticSearch?
NO
@superserch?
NO
Elasticsearch
YES
Search
Do I have to elaborate why search is important?
A little history…
Lucene History • Douglass Read "Doug" Cutting wrote Lucene in
1999 • Doug also is the author of Hadoop • In Lucene other projects came to life • Mahout • Tika • Nutch
Lucene?
• Lucene is an open-source Java full-text search library which
makes it easy to add search functionality to an application or website.
Index
Query
Inverted index • Lucene creates a data structure where it
keeps a list of where each word belongs.
Lucene-Based projects • Solr • Compass • Elasticsearch • Hibernate
search
Elasticsearch You Know, for Search.
Features • Real-Time Data. I (Domingo) say near Real-Time Data.
• Massively Distributed • High Availability • Full-Text Search • Document-Oriented • Schema-Free • Developer-Friendly, RESTful API • Extensible via plugins
Concepts • Cluster • Node • Index • Shard &
Replica • Type • Mapping • Document
How data is organized in Elasticsearch
Nodes & shards
Indexing documents
Sharding is crucial • Shard is a physical Lucene index
• # documents in a Lucent index is 2 billion docs. • When you create a index you have to declare the # shards, you can’t change later. Beware! • Don’t try to over-sharding your index! Beware!
Distributed indexing
URL http://localhost:9200/{index}/{type}/{document_id}
HTTPie for the samples
Creating an index $ http put :9200/my_index/ settings:='{ "index" :
{ "number_of_shards" : 3, "number_of_replicas" : 0 } }' PUT /my_index/ HTTP/1.1 Accept: application/json Accept-Encoding: gzip, deflate Connection: keep-alive Content-Length: 73 Content-Type: application/json Host: localhost:9200 User-Agent: HTTPie/0.9.3 { "settings": { "index": { "number_of_replicas": 0, "number_of_shards": 3 } } } HTTP/1.1 200 OK Content-Length: 21 Content-Type: application/json; charset=UTF-8 { "acknowledged": true }
Creating a type $ http put :9200/my_index/_mapping/my_document properties:='{ "user_name": {
"type": "string" } }' -v PUT /my_index/_mapping/my_document1 HTTP/1.1 Accept: application/json Content-Length: 49 Content-Type: application/json { "properties": { "user_name": { "type": "string" } } } HTTP/1.1 200 OK Content-Length: 21 Content-Type: application/json; charset=UTF-8 { "acknowledged": true }
Indexing $ http :9200/my_index/my_document user_name="Domingo Suarez" -v POST /my_index/my_document1 HTTP/1.1
Content-Length: 31 Content-Type: application/json { "user_name": "Domingo Suarez” } HTTP/1.1 201 Created Content-Length: 149 Content-Type: application/json; charset=UTF-8 { "_id": "AVRaEeBK3Lbw2oDzSIWN", "_index": "my_index", "_shards": { "failed": 0, "successful": 1, "total": 1 }, "_type": "my_document1", "_version": 1, "created": true }
Search $ http :9200/my_index/my_document/_search?q=user_name:Domingo HTTP/1.1 200 OK Content-Length: 657 Content-Type:
application/json; charset=UTF-8 { "_shards": { "failed": 0, "successful": 3, "total": 3 }, "hits": { "hits": [ { "_id": "AVRaEdPJ3Lbw2oDzSIWM", "_index": "my_index", "_score": 0.625, "_source": { "user_name": "Domingo Suarez" }, "_type": "my_document1" } ], "max_score": 0.625, "total": 1 }, "timed_out": false, "took": 5 }