SlideShare a Scribd company logo
ElasticSearch Hands On
ElasticSearch Overview at http://www.slideshare.net/ABCTalks/elastic-search-overview
Datasets: https://github.com/ramky1982/ee-datasets/blob/master/datasets/cars
ElasticSearch vs. RDBMS
ElasticSearch RDBMS
Field Column
Document Row
Mapping Schema
Points
 Shard is a group of Segments
 Default no of Shards = 5
 Once Index is created, the Shards cannot be changed
 Shards is per Index; Replica Set is per Shard
 Kibana is a User Interface for Search
Installation
1. Download ElasticSearch (elasticsearch-1.6.0.zip)
2. Unzip to D:  elasticsearch  (ES_HOME)
3. Install Marvel
ES_HOME bin> plugin -i elasticsearch/marvel/latest
4. Run ElasticSearch
ES_HOME bin> elasticsearch.bat
5. Test ElasticSearch Status
Page 1 of 7
http://localhost:9200/?pretty
6. Marvel Web Browser
http://localhost:9200/_plugin/marvel/
Marvel - Sense
Sample
PUT meetup/test/1
{
"name" : "arvind",
"age" : 38
}
Query Response
GET _search
{
"query": {
"match_all": {}
}
}
PUT meetup/vehicle/1
{
"name" : "figo",
"brand" : "ford",
"type" : "hatchback",
"price" : 600000
}
{
"_index": "meetup",
"_type": "vehicle",
"_id": "1",
"_version": 1,
"created": true
}
GET meetup/vehicle/1 {
"_index": "meetup",
"_type": "vehicle",
"_id": "1",
"_version": 1,
"found": true,
"_source": {
"name": "figo",
"brand": "ford",
"type": "hatchback",
"price": 600000
}
}
POST meetup/vehicle/1/_update
{
"doc" :
{
{
"_index": "meetup",
"_type": "vehicle",
"_id": "1",
Page 2 of 7
"price" : 660000
}
}
"_version": 2
}
POST meetup/vehicle
{
"name" : "santro",
"brand" : "hyundai",
"type" : "hatchback",
"price" : 500000
}
{
"_index": "meetup",
"_type": "vehicle",
"_id": "AU4PxI-36MsC0zl6aXJO",
"_version": 1,
"created": true
}
PUT meetup/vehicle
{
"name" : "verna",
"brand" : "maruti",
"type" : "sedan",
"price" : 850000
}
No handler found for uri [/meetup/vehicle] and
method [PUT]
Using POST
{
"_index": "meetup",
"_type": "vehicle",
"_id": "AU4Pxm5Y6MsC0zl6aXKL",
"_version": 1,
"created": true
}
GET _cat/indices?v
Note: “v” denotes verbose
health status index pri rep docs.count docs.deleted store.size pri.store.size
yellow open meetup 5 1 3 0 9.5kb 9.5kb
yellow open .marvel-2015.06.20 1 1 998 0 4mb 4mb
To get all the documents from the Index
GET meetup/vehicle/_search
{
"query": {
"match_all": {}
}
}
Get the "verna" vehicle details
GET meetup/vehicle/_search
{
"query": {
"match": {
"name": "verna"
}
}
}
GET meetup/vehicle/_mapping {
"meetup": {
"mappings": {
"vehicle": {
"properties": {
"brand": {
"type": "string"
},
"doc": {
"type": "string"
},
"name": {
"type": "string"
},
Page 3 of 7
"price": {
"type": "long"
},
"type": {
"type": "string"
}
}
}
}
}
}
POST meetup/vehicle/1/_update
{
"doc" :
{
"year" : 2000
}
}
{
"_index": "meetup",
"_type": "vehicle",
"_id": "1",
"_version": 3
}
GET meetup/vehicle/_mapping {
"meetup": {
"mappings": {
"vehicle": {
"properties": {
"brand": {
"type": "string"
},
"doc": {
"type": "string"
},
"name": {
"type": "string"
},
"price": {
"type": "long"
},
"type": {
"type": "string"
},
"year": {
"type": "long"
}
}
}
}
}
}
DELETE meetup {
"acknowledged": true
}
PUT meetup {
"acknowledged": true
}
PUT meetup/vehicle/_mapping
{
"vehicle" : {
{
"acknowledged": true
}
Page 4 of 7
"properties" : {
"name": {
"type": "string"
},
"brand": {
"type": "string"
},
"type": {
"type": "string"
},
"price": {
"type": "long"
}
}
}
}
Dynamic Mapping
PUT meetup/vehicle/_mapping
{
"vehicle" : {
"dynamic" : "strict",
"properties" : {
"name": {
"type": "string"
},
"brand": {
"type": "string"
},
"type": {
"type": "string"
},
"price": {
"type": "long"
}
}
}
}
PUT meetup/vehicle/1
{
"name" : "figo",
"brand" : "ford",
"type" : "hatchback",
"price" : "600000",
"year" : 2000
}
{
"error": "StrictDynamicMappingException[mapping
set to strict, dynamic introduction of [year] within
[vehicle] is not allowed]",
"status": 400
}
Bulk Insertion of Data from Datasets
POST /cars/transactions/_bulk
{ "index": {}}
{ "price" : 10000, "color" : "red", "make" : "honda", "sold" : "2015-01-28" }
{ "index": {}}
{ "price" : 20000, "color" : "red", "make" : "honda", "sold" : "2015-02-05" }
{ "index": {}}
{ "price" : 30000, "color" : "green", "make" : "ford", "sold" : "2015-05-18" }
{ "index": {}}
Page 5 of 7
{ "price" : 15000, "color" : "blue", "make" : "toyota", "sold" : "2015-06-02" }
{ "index": {}}
{ "price" : 12000, "color" : "green", "make" : "toyota", "sold" : "2014-08-19" }
{ "index": {}}
{ "price" : 20000, "color" : "red", "make" : "honda", "sold" : "2014-11-05" }
{ "index": {}}
{ "price" : 80000, "color" : "red", "make" : "bmw", "sold" : "2014-01-01" }
{ "index": {}}
{ "price" : 25000, "color" : "blue", "make" : "ford", "sold" : "2014-02-12" }
Retrieve Records
GET cars/transactions/_search
{
"query": {
"match_all": {}
}
}
Term
GET cars/transactions/_search
{
"query": {
"term": {
"color": {
"value": "blue"
}
}
}
}
Get documents from index "cars" with price between 9999 and 19999
GET cars/transactions/_search
{
"query": {
"range": {
"price": {
"gte": 9999,
"lte": 19999
}
}
}
}
Match and Range
GET cars/transactions/_search
{
"query": {
"filtered": {
"query": {"match": {
"make": "honda"
}},
"filter": {"range": {
"price": {
"gte": 9999,
"lte": 19999
}
}}
}
Page 6 of 7
}
}
Aggregation
GET /cars/transactions/_search?search_type=count
{
"aggs": {
"test": {
"terms": {
"field": "make"
}
}
}
}
Analyzers
GET /_analyze?analyzer=whitespace&text=Text to analyze(1)
GET /_analyze?analyzer=standard&text=Text to analyze(1)
GET /_analyze?analyzer=simple&text=Text to analyze(1)
Page 7 of 7

More Related Content

Viewers also liked

Ruta de aprendizaje semana 4
Ruta de aprendizaje semana 4Ruta de aprendizaje semana 4
Ruta de aprendizaje semana 4
Kattia Rodriguez
 
Prezentacja muchowki
Prezentacja muchowkiPrezentacja muchowki
Prezentacja muchowkiDddBogumil
 
Astina Lovina Hostel
Astina Lovina HostelAstina Lovina Hostel
Astina Lovina Hostel
flyingdolphin
 
Tugas mn 3b ebob
Tugas mn 3b ebobTugas mn 3b ebob
Tugas mn 3b ebobdafiq_49
 
H ζωή του Λεονάρντο Ντα Βίντσι
H ζωή του Λεονάρντο Ντα ΒίντσιH ζωή του Λεονάρντο Ντα Βίντσι
H ζωή του Λεονάρντο Ντα ΒίντσιTheodwrh Vasia
 
Сандеро
СандероСандеро
Сандеро
Al Maks
 
Q analysis
Q analysisQ analysis
Q analysisTyrrell
 
Furnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto Valley
Furnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto ValleyFurnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto Valley
Furnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto Valley
Scioto Valley
 
Using the library and referencing in a digital age
Using the library and referencing in a digital ageUsing the library and referencing in a digital age
Using the library and referencing in a digital age
kevinwilsongold
 
Daftar hadir&nilai evaluasi pai 1314
Daftar hadir&nilai evaluasi pai 1314Daftar hadir&nilai evaluasi pai 1314
Daftar hadir&nilai evaluasi pai 1314
MTs Nurul Huda Sukaraja
 
Workshop Production Live
Workshop Production Live Workshop Production Live
Workshop Production Live
Gayané Adourian
 
Clash, cash, and crash, topics
Clash, cash, and crash, topicsClash, cash, and crash, topics
Clash, cash, and crash, topics
welalann
 
Young Investor Times - Summer 2006
Young Investor Times - Summer 2006Young Investor Times - Summer 2006
Young Investor Times - Summer 2006wise1199
 
Drangsholt brain fogr1r
Drangsholt brain fogr1rDrangsholt brain fogr1r
Drangsholt brain fogr1r
Ernesto Ramirez
 

Viewers also liked (17)

Ruta de aprendizaje semana 4
Ruta de aprendizaje semana 4Ruta de aprendizaje semana 4
Ruta de aprendizaje semana 4
 
Prezentacja muchowki
Prezentacja muchowkiPrezentacja muchowki
Prezentacja muchowki
 
Astina Lovina Hostel
Astina Lovina HostelAstina Lovina Hostel
Astina Lovina Hostel
 
Tugas mn 3b ebob
Tugas mn 3b ebobTugas mn 3b ebob
Tugas mn 3b ebob
 
cv@HASSAN
cv@HASSANcv@HASSAN
cv@HASSAN
 
H ζωή του Λεονάρντο Ντα Βίντσι
H ζωή του Λεονάρντο Ντα ΒίντσιH ζωή του Λεονάρντο Ντα Βίντσι
H ζωή του Λεονάρντο Ντα Βίντσι
 
Сандеро
СандероСандеро
Сандеро
 
Q analysis
Q analysisQ analysis
Q analysis
 
Daftarhadir&nilai statistik1112
Daftarhadir&nilai statistik1112Daftarhadir&nilai statistik1112
Daftarhadir&nilai statistik1112
 
Furnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto Valley
Furnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto ValleyFurnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto Valley
Furnish the Flavor: A Thanksgiving Recipe Book brought to you by Scioto Valley
 
Medeniyetler çatışmasından
Medeniyetler çatışmasındanMedeniyetler çatışmasından
Medeniyetler çatışmasından
 
Using the library and referencing in a digital age
Using the library and referencing in a digital ageUsing the library and referencing in a digital age
Using the library and referencing in a digital age
 
Daftar hadir&nilai evaluasi pai 1314
Daftar hadir&nilai evaluasi pai 1314Daftar hadir&nilai evaluasi pai 1314
Daftar hadir&nilai evaluasi pai 1314
 
Workshop Production Live
Workshop Production Live Workshop Production Live
Workshop Production Live
 
Clash, cash, and crash, topics
Clash, cash, and crash, topicsClash, cash, and crash, topics
Clash, cash, and crash, topics
 
Young Investor Times - Summer 2006
Young Investor Times - Summer 2006Young Investor Times - Summer 2006
Young Investor Times - Summer 2006
 
Drangsholt brain fogr1r
Drangsholt brain fogr1rDrangsholt brain fogr1r
Drangsholt brain fogr1r
 

Similar to ElasticSearch Hands On

Elasticsearch intro output
Elasticsearch intro outputElasticsearch intro output
Elasticsearch intro output
Tom Chen
 
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Codemotion
 
Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
Woonsan Ko
 
Ams adapters
Ams adaptersAms adapters
Ams adapters
Bruno Alló Bacarini
 
ElasticSearch Introduction
ElasticSearch IntroductionElasticSearch Introduction
ElasticSearch Introduction
Minh Hoang
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
Anton Babenko
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
James Titcumb
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
James Titcumb
 
Using Stargate APIs for Cassandra-Backed Applications
Using Stargate APIs for Cassandra-Backed ApplicationsUsing Stargate APIs for Cassandra-Backed Applications
Using Stargate APIs for Cassandra-Backed Applications
Nordic APIs
 
Real-time search in Drupal with Elasticsearch @Moldcamp
Real-time search in Drupal with Elasticsearch @MoldcampReal-time search in Drupal with Elasticsearch @Moldcamp
Real-time search in Drupal with Elasticsearch @MoldcampAlexei Gorobets
 
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Codemotion
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
Kon Soulianidis
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
James Titcumb
 
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Big Data Spain
 
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Fwdays
 
Components.js
Components.jsComponents.js
Components.js
Ruben Taelman
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
Alex Zyl
 
Lightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and CassandraLightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and Cassandra
Rustam Aliyev
 
GraphQL in Symfony
GraphQL in SymfonyGraphQL in Symfony
GraphQL in Symfony
Bernd Alter
 
Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
Mykyta Protsenko
 

Similar to ElasticSearch Hands On (20)

Elasticsearch intro output
Elasticsearch intro outputElasticsearch intro output
Elasticsearch intro output
 
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
 
Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
 
Ams adapters
Ams adaptersAms adapters
Ams adapters
 
ElasticSearch Introduction
ElasticSearch IntroductionElasticSearch Introduction
ElasticSearch Introduction
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Using Stargate APIs for Cassandra-Backed Applications
Using Stargate APIs for Cassandra-Backed ApplicationsUsing Stargate APIs for Cassandra-Backed Applications
Using Stargate APIs for Cassandra-Backed Applications
 
Real-time search in Drupal with Elasticsearch @Moldcamp
Real-time search in Drupal with Elasticsearch @MoldcampReal-time search in Drupal with Elasticsearch @Moldcamp
Real-time search in Drupal with Elasticsearch @Moldcamp
 
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
 
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
 
Components.js
Components.jsComponents.js
Components.js
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Lightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and CassandraLightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and Cassandra
 
GraphQL in Symfony
GraphQL in SymfonyGraphQL in Symfony
GraphQL in Symfony
 
Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
 

More from Nag Arvind Gudiseva

Elasticsearch security
Elasticsearch securityElasticsearch security
Elasticsearch security
Nag Arvind Gudiseva
 
Elasticsearch Security Strategy
Elasticsearch Security StrategyElasticsearch Security Strategy
Elasticsearch Security Strategy
Nag Arvind Gudiseva
 
Git as version control for Analytics project
Git as version control for Analytics projectGit as version control for Analytics project
Git as version control for Analytics project
Nag Arvind Gudiseva
 
Exception Handling in Scala
Exception Handling in ScalaException Handling in Scala
Exception Handling in Scala
Nag Arvind Gudiseva
 
Hive performance optimizations
Hive performance optimizationsHive performance optimizations
Hive performance optimizations
Nag Arvind Gudiseva
 
Creating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDECreating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDE
Nag Arvind Gudiseva
 
Adding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version ControlAdding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version Control
Nag Arvind Gudiseva
 
Apache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBaseApache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBase
Nag Arvind Gudiseva
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Nag Arvind Gudiseva
 
Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)
Nag Arvind Gudiseva
 
MSC Temporary Passwords reset tool
MSC Temporary Passwords reset toolMSC Temporary Passwords reset tool
MSC Temporary Passwords reset tool
Nag Arvind Gudiseva
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
Nag Arvind Gudiseva
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
Nag Arvind Gudiseva
 

More from Nag Arvind Gudiseva (13)

Elasticsearch security
Elasticsearch securityElasticsearch security
Elasticsearch security
 
Elasticsearch Security Strategy
Elasticsearch Security StrategyElasticsearch Security Strategy
Elasticsearch Security Strategy
 
Git as version control for Analytics project
Git as version control for Analytics projectGit as version control for Analytics project
Git as version control for Analytics project
 
Exception Handling in Scala
Exception Handling in ScalaException Handling in Scala
Exception Handling in Scala
 
Hive performance optimizations
Hive performance optimizationsHive performance optimizations
Hive performance optimizations
 
Creating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDECreating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDE
 
Adding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version ControlAdding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version Control
 
Apache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBaseApache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBase
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
 
Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)
 
MSC Temporary Passwords reset tool
MSC Temporary Passwords reset toolMSC Temporary Passwords reset tool
MSC Temporary Passwords reset tool
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
 

Recently uploaded

BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 

Recently uploaded (20)

BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 

ElasticSearch Hands On

  • 1. ElasticSearch Hands On ElasticSearch Overview at http://www.slideshare.net/ABCTalks/elastic-search-overview Datasets: https://github.com/ramky1982/ee-datasets/blob/master/datasets/cars ElasticSearch vs. RDBMS ElasticSearch RDBMS Field Column Document Row Mapping Schema Points  Shard is a group of Segments  Default no of Shards = 5  Once Index is created, the Shards cannot be changed  Shards is per Index; Replica Set is per Shard  Kibana is a User Interface for Search Installation 1. Download ElasticSearch (elasticsearch-1.6.0.zip) 2. Unzip to D: elasticsearch (ES_HOME) 3. Install Marvel ES_HOME bin> plugin -i elasticsearch/marvel/latest 4. Run ElasticSearch ES_HOME bin> elasticsearch.bat 5. Test ElasticSearch Status Page 1 of 7
  • 2. http://localhost:9200/?pretty 6. Marvel Web Browser http://localhost:9200/_plugin/marvel/ Marvel - Sense Sample PUT meetup/test/1 { "name" : "arvind", "age" : 38 } Query Response GET _search { "query": { "match_all": {} } } PUT meetup/vehicle/1 { "name" : "figo", "brand" : "ford", "type" : "hatchback", "price" : 600000 } { "_index": "meetup", "_type": "vehicle", "_id": "1", "_version": 1, "created": true } GET meetup/vehicle/1 { "_index": "meetup", "_type": "vehicle", "_id": "1", "_version": 1, "found": true, "_source": { "name": "figo", "brand": "ford", "type": "hatchback", "price": 600000 } } POST meetup/vehicle/1/_update { "doc" : { { "_index": "meetup", "_type": "vehicle", "_id": "1", Page 2 of 7
  • 3. "price" : 660000 } } "_version": 2 } POST meetup/vehicle { "name" : "santro", "brand" : "hyundai", "type" : "hatchback", "price" : 500000 } { "_index": "meetup", "_type": "vehicle", "_id": "AU4PxI-36MsC0zl6aXJO", "_version": 1, "created": true } PUT meetup/vehicle { "name" : "verna", "brand" : "maruti", "type" : "sedan", "price" : 850000 } No handler found for uri [/meetup/vehicle] and method [PUT] Using POST { "_index": "meetup", "_type": "vehicle", "_id": "AU4Pxm5Y6MsC0zl6aXKL", "_version": 1, "created": true } GET _cat/indices?v Note: “v” denotes verbose health status index pri rep docs.count docs.deleted store.size pri.store.size yellow open meetup 5 1 3 0 9.5kb 9.5kb yellow open .marvel-2015.06.20 1 1 998 0 4mb 4mb To get all the documents from the Index GET meetup/vehicle/_search { "query": { "match_all": {} } } Get the "verna" vehicle details GET meetup/vehicle/_search { "query": { "match": { "name": "verna" } } } GET meetup/vehicle/_mapping { "meetup": { "mappings": { "vehicle": { "properties": { "brand": { "type": "string" }, "doc": { "type": "string" }, "name": { "type": "string" }, Page 3 of 7
  • 4. "price": { "type": "long" }, "type": { "type": "string" } } } } } } POST meetup/vehicle/1/_update { "doc" : { "year" : 2000 } } { "_index": "meetup", "_type": "vehicle", "_id": "1", "_version": 3 } GET meetup/vehicle/_mapping { "meetup": { "mappings": { "vehicle": { "properties": { "brand": { "type": "string" }, "doc": { "type": "string" }, "name": { "type": "string" }, "price": { "type": "long" }, "type": { "type": "string" }, "year": { "type": "long" } } } } } } DELETE meetup { "acknowledged": true } PUT meetup { "acknowledged": true } PUT meetup/vehicle/_mapping { "vehicle" : { { "acknowledged": true } Page 4 of 7
  • 5. "properties" : { "name": { "type": "string" }, "brand": { "type": "string" }, "type": { "type": "string" }, "price": { "type": "long" } } } } Dynamic Mapping PUT meetup/vehicle/_mapping { "vehicle" : { "dynamic" : "strict", "properties" : { "name": { "type": "string" }, "brand": { "type": "string" }, "type": { "type": "string" }, "price": { "type": "long" } } } } PUT meetup/vehicle/1 { "name" : "figo", "brand" : "ford", "type" : "hatchback", "price" : "600000", "year" : 2000 } { "error": "StrictDynamicMappingException[mapping set to strict, dynamic introduction of [year] within [vehicle] is not allowed]", "status": 400 } Bulk Insertion of Data from Datasets POST /cars/transactions/_bulk { "index": {}} { "price" : 10000, "color" : "red", "make" : "honda", "sold" : "2015-01-28" } { "index": {}} { "price" : 20000, "color" : "red", "make" : "honda", "sold" : "2015-02-05" } { "index": {}} { "price" : 30000, "color" : "green", "make" : "ford", "sold" : "2015-05-18" } { "index": {}} Page 5 of 7
  • 6. { "price" : 15000, "color" : "blue", "make" : "toyota", "sold" : "2015-06-02" } { "index": {}} { "price" : 12000, "color" : "green", "make" : "toyota", "sold" : "2014-08-19" } { "index": {}} { "price" : 20000, "color" : "red", "make" : "honda", "sold" : "2014-11-05" } { "index": {}} { "price" : 80000, "color" : "red", "make" : "bmw", "sold" : "2014-01-01" } { "index": {}} { "price" : 25000, "color" : "blue", "make" : "ford", "sold" : "2014-02-12" } Retrieve Records GET cars/transactions/_search { "query": { "match_all": {} } } Term GET cars/transactions/_search { "query": { "term": { "color": { "value": "blue" } } } } Get documents from index "cars" with price between 9999 and 19999 GET cars/transactions/_search { "query": { "range": { "price": { "gte": 9999, "lte": 19999 } } } } Match and Range GET cars/transactions/_search { "query": { "filtered": { "query": {"match": { "make": "honda" }}, "filter": {"range": { "price": { "gte": 9999, "lte": 19999 } }} } Page 6 of 7
  • 7. } } Aggregation GET /cars/transactions/_search?search_type=count { "aggs": { "test": { "terms": { "field": "make" } } } } Analyzers GET /_analyze?analyzer=whitespace&text=Text to analyze(1) GET /_analyze?analyzer=standard&text=Text to analyze(1) GET /_analyze?analyzer=simple&text=Text to analyze(1) Page 7 of 7