SlideShare a Scribd company logo
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
}

More Related Content

PDF
SOA Latam 2015
PDF
SGCE 2015 REST APIs
PDF
Elasitcsearch + Logstash + Kibana 日誌監控
PDF
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
PPTX
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
PPTX
Running MongoDB in the Cloud
PPTX
The Ultimate Logging Architecture - You KNOW you want it!
KEY
Why ruby and rails
SOA Latam 2015
SGCE 2015 REST APIs
Elasitcsearch + Logstash + Kibana 日誌監控
DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matia...
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Running MongoDB in the Cloud
The Ultimate Logging Architecture - You KNOW you want it!
Why ruby and rails

What's hot (20)

PPTX
RavenDB Presentation
PPTX
Log analysis using Logstash,ElasticSearch and Kibana
PPTX
Lessons from the Trenches - Building Enterprise Applications with RavenDB
PPTX
Stack Exchange Infrastructure - LISA 14
PDF
StackStormを1年間データ基盤で使ってみてぶつかったトラブルとその解決策の共有
PDF
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
PPTX
Grafana and MySQL - Benefits and Challenges
PPTX
RavenDB 4.0
PDF
GoSF Summerfest - Why Go at Apcera
PDF
Building Codealike: a journey into the developers analytics world
PPT
Document Databases & RavenDB
PDF
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
PPTX
RavenDB 3.5
PDF
Vagrant for Effective DevOps Culture
PPTX
Scaling with swagger
PPTX
Icinga2 - Apify them all
PDF
WebDev Crash Course
PDF
Voldemortの紹介
PDF
Know thy cost (or where performance problems lurk)
PDF
Icinga Web 2 is more
RavenDB Presentation
Log analysis using Logstash,ElasticSearch and Kibana
Lessons from the Trenches - Building Enterprise Applications with RavenDB
Stack Exchange Infrastructure - LISA 14
StackStormを1年間データ基盤で使ってみてぶつかったトラブルとその解決策の共有
使用 Elasticsearch 及 Kibana 進行巨量資料搜尋及視覺化-曾書庭
Grafana and MySQL - Benefits and Challenges
RavenDB 4.0
GoSF Summerfest - Why Go at Apcera
Building Codealike: a journey into the developers analytics world
Document Databases & RavenDB
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
RavenDB 3.5
Vagrant for Effective DevOps Culture
Scaling with swagger
Icinga2 - Apify them all
WebDev Crash Course
Voldemortの紹介
Know thy cost (or where performance problems lurk)
Icinga Web 2 is more
Ad

Similar to Elasticsearch JVM-MX Meetup April 2016 (20)

PPTX
Elastic search intro-@lamper
PDF
Drupal and Apache Stanbol
PDF
ElasticSearch - index server used as a document database
PPTX
曾勇 Elastic search-intro
PPTX
Why do they call it Linked Data when they want to say...?
PDF
Building APIs in an easy way using API Platform
PDF
Introduction to elasticsearch
PDF
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
PPTX
06 integrate elasticsearch
PDF
Elasticsearch Introduction at BigData meetup
PDF
Full Text Search with Lucene
PPTX
A Presentation on MongoDB Introduction - Habilelabs
PPTX
Elasticsearch Introduction
PPTX
Episerver and search engines
PPTX
Untangling - fall2017 - week 9
PDF
From 0 to syncing
PPT
Produce and consume_linked_data_with_drupal
PPTX
An Introduction to Elastic Search.
ODP
If You Have The Content, Then Apache Has The Technology!
PDF
No sq lv1_0
Elastic search intro-@lamper
Drupal and Apache Stanbol
ElasticSearch - index server used as a document database
曾勇 Elastic search-intro
Why do they call it Linked Data when they want to say...?
Building APIs in an easy way using API Platform
Introduction to elasticsearch
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
06 integrate elasticsearch
Elasticsearch Introduction at BigData meetup
Full Text Search with Lucene
A Presentation on MongoDB Introduction - Habilelabs
Elasticsearch Introduction
Episerver and search engines
Untangling - fall2017 - week 9
From 0 to syncing
Produce and consume_linked_data_with_drupal
An Introduction to Elastic Search.
If You Have The Content, Then Apache Has The Technology!
No sq lv1_0
Ad

More from Domingo Suarez Torres (20)

PDF
Projecto Loom - Structured Concurrency - JavaMexico - Julio 2024
PDF
Cloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
PDF
Java Dev Day 2019 No kuberneteen por convivir
PDF
Contenedores 101 Digital Ocean CDMX
PPTX
Retos en la arquitectura de Microservicios
PDF
Java Cloud Native Hack Nights GDL
PDF
meetup digital ocean kubernetes
PDF
Peru JUG Micronaut & GraalVM
PDF
DevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
PDF
Cloud Native Development in the JVM
PDF
Cloud Native Mexico - Introducción a Kubernetes
PDF
Meetup DigitalOcean Cloud Native architecture
PDF
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
PDF
Cloud Native Mexico Meetup enero 2018 Observability
PDF
Cloud Native Mexico Presentacion
PDF
gRPC: Beyond REST
PDF
Devops Landscape
PDF
Orquestación de contenedores con Kubernetes SGNext
PDF
JVM Reactive Programming
PDF
SGNext Elasticsearch
Projecto Loom - Structured Concurrency - JavaMexico - Julio 2024
Cloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
Java Dev Day 2019 No kuberneteen por convivir
Contenedores 101 Digital Ocean CDMX
Retos en la arquitectura de Microservicios
Java Cloud Native Hack Nights GDL
meetup digital ocean kubernetes
Peru JUG Micronaut & GraalVM
DevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
Cloud Native Development in the JVM
Cloud Native Mexico - Introducción a Kubernetes
Meetup DigitalOcean Cloud Native architecture
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
Cloud Native Mexico Meetup enero 2018 Observability
Cloud Native Mexico Presentacion
gRPC: Beyond REST
Devops Landscape
Orquestación de contenedores con Kubernetes SGNext
JVM Reactive Programming
SGNext Elasticsearch

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
20250228 LYD VKU AI Blended-Learning.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Spectral efficient network and resource selection model in 5G networks
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Cloud computing and distributed systems.
Teaching material agriculture food technology

Elasticsearch JVM-MX Meetup April 2016

  • 1. Elasticsearch Mexico City JVM Group April 2016
  • 3. ¡El meetup con mas asistencia de la historia!
  • 4. What is the topic tonight?
  • 6. NO
  • 8. NO
  • 10. NO
  • 12. NO
  • 14. YES
  • 16. Do I have to elaborate why search is important?
  • 18. 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
  • 20. • Lucene is an open-source Java full-text search library which makes it easy to add search functionality to an application or website.
  • 21. Index
  • 22. Query
  • 23. Inverted index • Lucene creates a data structure where it keeps a list of where each word belongs.
  • 24. Lucene-Based projects • Solr • Compass • Elasticsearch • Hibernate search
  • 26. 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
  • 27. Concepts • Cluster • Node • Index • Shard & Replica • Type • Mapping • Document
  • 28. How data is organized in Elasticsearch
  • 31. 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!
  • 34. HTTPie for the samples
  • 35. 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 }
  • 36. 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 }
  • 37. 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 }
  • 38. 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 }