SlideShare a Scribd company logo
1 of 26
Elasticsearch
What Is Elasticsearch?
Search index
Scalable
Distributed
Document-oriented
Built on Apache Lucene
What Isn’t Elasticsearch
Not a database
No security
No ACID compliance
No support for transactions
Near real-time data availability
Eventual consistency
Typical Architecture
Web application
Data access layer
RDBMS Elasticsearch
Who Uses Elasticsearch?
Simple REST API - GET
GET / {
"name": "Murmur",
"cluster_name": "elasticsearch",
"version": {
"number": "2.2.0",
"build_hash": "8ff36d139e16f8720f2947ef62c8167a888992fe",
"build_timestamp": "2016-01-27T13:32:39Z",
"build_snapshot": false,
"lucene_version": "5.4.1"
},
"tagline": "You Know, for Search"
}
Simple REST API - GET
GET /strutt/property/14523 {
"_index": "strutt",
"_type": "property",
"_id": "14523",
"_version": 1,
"found": true,
"_source": {
"name": "Newton Of Drumduan",
"public_date": "2016-03-20 12:31:31",
"property_address": "Newton Of Drumduan, Dess",
"property_town": "Aboyne",
"property_county": "Aberdeenshire",
"property_postcode": "AB34 5BD",
"property_price_min": 975000,
"property_price_display": "£ 975,000",
"property_features": [
"Garden",
"Rural",
"Outbuildings",
"Land/Paddock"
],
...
...
}
}
Simple REST API - POST
POST /strutt/property
{
"name" : "Mark's House",
"property_town" : "Lightwater",
"property_features" : [
"XBox One",
"Big TV",
"Big amp"
]
}
{
"_index": "strutt",
"_type": "property",
"_id": "AVQG5ihvhgvIo9hLVnu2",
"_version": 1,
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"created": true
}
Simple REST API - PUT
PUT /strutt/property/1234
{
"name" : "Mark's House",
"property_town" : "Lightwater",
"property_features" : [
"XBox One",
"Big TV",
"Big amp"
]
}
{
"_index": "strutt",
"_type": "property",
"_id": "1234",
"_version": 1,
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"created": true
}
Clever Things Elasticsearch Can Do
Full text search
Geolocation
Aggregations
Custom scoring
Combining elements
Full Text Search
GET /strutt/property/_search
{
"query" : {
"match": {
"property_long_description":
"underfloor heating"
}
}
}
{
"took": 5,
"hits": {
"total": 413,
"max_score": 0.94447553,
"hits": [
{
"_id": "15825",
"_score": 0.94447553,
"_source": {
"name": "Lower Sandhurst Road (Lot 1)",
"property_long_description": "Underfloor heating throughout
and Ambiente thermostats..."
}
},
{
"_id": "16783",
"_score": 0.92866411,
"_source": {
"name": "Eaton Place, London",
"property_long_description": "... including underfloor
heating, crestron lighting ..."
}
]
}
}
Geolocation - Filter By Distance
GET /strutt/office/_search
{
"query": {
"filtered": {
"filter": {
"bool": {
"filter": [
{
"geo_distance": {
"distance": "10miles",
"distance_type": "sloppy_arc",
"location": {
"lat": "51.41082",
"lon": "-0.67480"
}
}
}
]
}
}
}
}
}
Geolocation - Sort By Distance
GET /strutt/city/_search
{
"sort": [
{
"_geo_distance": {
"location": {
"lat": "45.850677",
"lon": "12.389420"
},
"order": "asc",
"unit": "miles",
"distance_type": "sloppy_arc"
}
}
],
"size": 25
}
Geolocation - Shape Search
GET /strutt/property/_search
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"geo_polygon": {
"location": {
"points": [
{
"lat": 51.381423948522,
"lon": -0.67402839660645
},
{
"lat": 51.379388252364,
"lon": -0.65703392028809
},
{
"lat": 51.370494412739,
"lon": -0.66338539123535
},
...
...
Aggregations
Extract data from Elastic results
Three types of aggregation
Metric
Bucket
Pipeline
Why?
Hugely powerful and FAST
GET /strutt/properties/_search
{
"aggregations": {
"average_price" : {
"avg": {
"field" : "price"
}
}
}
}
Aggregations - Some Examples
Metric Aggregations
Avg
Geo Bounds
Max/Min/Sum
Bucket Aggregations
Terms
Geo Distance
Range
GET /strutt/properties/_search
{
"aggregations": {
"grouped_by_town" : {
"terms" : { "field" : "town" },
"aggregations": {
"average_price" : {
"avg" : { "field" : "price" }
}
}
}
}
}
RESULTS
{
"grouped_by_town": {
"buckets": [{
"key": "Ascot",
"doc_count": 50,
"average_price": { "value": 75 }
}, {
"key": "Windsor",
"doc_count": 20,
"average_price": { "value": 145 }
}]
}
}
Nested Aggregations ?!?!
Custom Scoring
GET /strutt/article/_search
{
"query": {
"function_score": {
"query": {
"filtered": {
"filter": { "bool": { "must": [ { "term": { "parent_id": "3030" } } ] } }
}
},
"functions": [
{
"gauss": {
"public_date": {
"origin": "2016-04-12 09:00:07",
"scale": "150d",
"offset": "30d",
"decay": "0.1"
}
}
}
]
}
}
}
Combining Elements
GET /strutt/property/_search
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"term": {
"property_available": 1
}
},
{
"range": {
"property_price_max": {
"gte": "1000000"
}
}
},
{
"range": {
"property_price_min": {
"lte": "5000000"
}
}
},
Combining Elements
{
"geo_polygon": {
"location": {
"points": [
{
"lat": 51.39963404311,
"lon": -0.68990707397461
},
{
"lat": 51.393636224206,
"lon": -0.64115524291992
},
{
"lat": 51.368351060511,
"lon": -0.63600540161133
},
{
"lat": 51.371351725538,
"lon": -0.68750381469727
}
]
}
}
},
Combining Elements
{
"range": {
"property_bedrooms": {
"gte": "5"
}
}
},
{
"bool": {
"should": [
{
"term": {
"property_class": "Residential sales"
}
}
]
}
},
Combining Elements
{
"bool": {
"should": [
{
"term": {
"property_features": "Swimming Pool"
}
}
]
}
}
],
"filter": [
{
"geo_distance": {
"distance": "10miles",
"distance_type": "sloppy_arc",
"location": {
"lat": "51.41082",
"lon": "-0.67480"
}
}
}
]
}
Combining Elements
"sort": [
{
"_geo_distance": {
"location": {
"lat": "51.41082",
"lon": "-0.67480"
},
"order": "asc",
"unit": "miles",
"distance_type": "sloppy_arc"
}
},
{
"property_price_min": {
"order": "desc"
}
}
],
"from": 0,
"size": 10000
}
Did I Mention It’s Fast?
{
"took": 12,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 3,
"max_score": null,
"hits": [
...
...
And There’s More...
Automatic clustering
Explaining query results
Suggesters
Spelling corrections and fuzzy matching
Match highlighting
Term boosting
Query profiling
Cluster management and monitoring
Learn more about Rawnet

More Related Content

What's hot

MongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDBMongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDBMongoDB
 
MongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialMongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialJason Terpko
 
Real-time Data Analytics mit Elasticsearch
Real-time Data Analytics mit ElasticsearchReal-time Data Analytics mit Elasticsearch
Real-time Data Analytics mit Elasticsearchinovex GmbH
 
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...Kelvin Nicholson
 
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)Dr.-Ing. Thomas Hartmann
 
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2MongoDB
 
PistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for AnalyticsPistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for AnalyticsAndrew Morgan
 
GDG İstanbul Şubat Etkinliği - Sunum
GDG İstanbul Şubat Etkinliği - SunumGDG İstanbul Şubat Etkinliği - Sunum
GDG İstanbul Şubat Etkinliği - SunumCüneyt Yeşilkaya
 

What's hot (10)

MongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDBMongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB World 2016: The Best IoT Analytics with MongoDB
 
Presentation
PresentationPresentation
Presentation
 
MongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialMongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster Tutorial
 
Real-time Data Analytics mit Elasticsearch
Real-time Data Analytics mit ElasticsearchReal-time Data Analytics mit Elasticsearch
Real-time Data Analytics mit Elasticsearch
 
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
Sydney Python Presentation (Feb 2010) - Tracking Large Metallic Objects / Goo...
 
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
 
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
 
PistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for AnalyticsPistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for Analytics
 
Dapper performance
Dapper performanceDapper performance
Dapper performance
 
GDG İstanbul Şubat Etkinliği - Sunum
GDG İstanbul Şubat Etkinliği - SunumGDG İstanbul Şubat Etkinliği - Sunum
GDG İstanbul Şubat Etkinliği - Sunum
 

Viewers also liked

4byte As Number Migration Suggestion
4byte As Number Migration Suggestion4byte As Number Migration Suggestion
4byte As Number Migration SuggestionKae Hsu
 
Noisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networksNoisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networksMichael Stumpf
 
Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'Rawnet
 
Toward The Semantic Deep Web
Toward The Semantic Deep WebToward The Semantic Deep Web
Toward The Semantic Deep WebSamiul Hoque
 
FEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic IntroductionFEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic IntroductionKae Hsu
 
Network and TCP performance relationship workshop
Network and TCP performance relationship workshopNetwork and TCP performance relationship workshop
Network and TCP performance relationship workshopKae Hsu
 
Rawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design InspirationRawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design InspirationRawnet
 
Web 101 by Jennifer Lill
Web 101 by Jennifer LillWeb 101 by Jennifer Lill
Web 101 by Jennifer LillJennifer Lill
 
Botnets & DDoS Introduction
Botnets & DDoS IntroductionBotnets & DDoS Introduction
Botnets & DDoS IntroductionKae Hsu
 
4 byte AS number workshop material
4 byte AS number workshop material4 byte AS number workshop material
4 byte AS number workshop materialKae Hsu
 
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'Rawnet
 
How internet works and how messages are transferred in Internet
How internet works and how messages are transferred in InternetHow internet works and how messages are transferred in Internet
How internet works and how messages are transferred in Internetpagetron
 
A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7Rawnet
 
How To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISPHow To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISPKae Hsu
 
4 Byte As Ns Test Scenarios
4 Byte As Ns Test Scenarios4 Byte As Ns Test Scenarios
4 Byte As Ns Test ScenariosKae Hsu
 
Rawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web ComponentsRawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web ComponentsRawnet
 
Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.Rawnet
 
20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFV20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFVKae Hsu
 
CDN and ISP Operation
CDN and ISP OperationCDN and ISP Operation
CDN and ISP OperationKae Hsu
 
Network Design in Cloud-ready IDC
Network Design in Cloud-ready IDCNetwork Design in Cloud-ready IDC
Network Design in Cloud-ready IDCKae Hsu
 

Viewers also liked (20)

4byte As Number Migration Suggestion
4byte As Number Migration Suggestion4byte As Number Migration Suggestion
4byte As Number Migration Suggestion
 
Noisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networksNoisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networks
 
Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'
 
Toward The Semantic Deep Web
Toward The Semantic Deep WebToward The Semantic Deep Web
Toward The Semantic Deep Web
 
FEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic IntroductionFEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic Introduction
 
Network and TCP performance relationship workshop
Network and TCP performance relationship workshopNetwork and TCP performance relationship workshop
Network and TCP performance relationship workshop
 
Rawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design InspirationRawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design Inspiration
 
Web 101 by Jennifer Lill
Web 101 by Jennifer LillWeb 101 by Jennifer Lill
Web 101 by Jennifer Lill
 
Botnets & DDoS Introduction
Botnets & DDoS IntroductionBotnets & DDoS Introduction
Botnets & DDoS Introduction
 
4 byte AS number workshop material
4 byte AS number workshop material4 byte AS number workshop material
4 byte AS number workshop material
 
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
 
How internet works and how messages are transferred in Internet
How internet works and how messages are transferred in InternetHow internet works and how messages are transferred in Internet
How internet works and how messages are transferred in Internet
 
A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7
 
How To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISPHow To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISP
 
4 Byte As Ns Test Scenarios
4 Byte As Ns Test Scenarios4 Byte As Ns Test Scenarios
4 Byte As Ns Test Scenarios
 
Rawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web ComponentsRawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web Components
 
Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.
 
20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFV20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFV
 
CDN and ISP Operation
CDN and ISP OperationCDN and ISP Operation
CDN and ISP Operation
 
Network Design in Cloud-ready IDC
Network Design in Cloud-ready IDCNetwork Design in Cloud-ready IDC
Network Design in Cloud-ready IDC
 

Similar to Rawnet Lightning Talk - Elasticsearch

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
 
Log Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar SeriesLog Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar SeriesAmazon Web Services
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearchFlorian Hopf
 
Optimizing Elastic for Search at McQueen Solutions
Optimizing Elastic for Search at McQueen SolutionsOptimizing Elastic for Search at McQueen Solutions
Optimizing Elastic for Search at McQueen SolutionsElasticsearch
 
Elasticsearch an overview
Elasticsearch   an overviewElasticsearch   an overview
Elasticsearch an overviewAmit Juneja
 
TechDays 2017 - Creating real life serverless solutions with azure functions
TechDays 2017 - Creating real life serverless solutions with azure functionsTechDays 2017 - Creating real life serverless solutions with azure functions
TechDays 2017 - Creating real life serverless solutions with azure functionsJan de Vries
 
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...In-Memory Computing Summit
 
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...Jan de Vries
 
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
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life琛琳 饶
 
Unify Earth Observation products access with OpenSearch
Unify Earth Observation products access with OpenSearchUnify Earth Observation products access with OpenSearch
Unify Earth Observation products access with OpenSearchGasperi Jerome
 
Odtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for youOdtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for youLuc Bors
 
Real-time search in Drupal. Meet Elasticsearch
Real-time search in Drupal. Meet ElasticsearchReal-time search in Drupal. Meet Elasticsearch
Real-time search in Drupal. Meet ElasticsearchAlexei Gorobets
 
Anwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchAnwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchFlorian Hopf
 
Spark Sql for Training
Spark Sql for TrainingSpark Sql for Training
Spark Sql for TrainingBryan Yang
 
Querying Data Pipeline with AWS Athena
Querying Data Pipeline with AWS AthenaQuerying Data Pipeline with AWS Athena
Querying Data Pipeline with AWS AthenaYaroslav Tkachenko
 
Spark streaming , Spark SQL
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQLYousun Jeong
 
A Serverless Approach to Operational Log Visualisation and Analytics
A Serverless Approach to Operational Log Visualisation and AnalyticsA Serverless Approach to Operational Log Visualisation and Analytics
A Serverless Approach to Operational Log Visualisation and AnalyticsAmazon Web Services
 
Creating real life serverless solutions with Azure Functions
Creating real life serverless solutions with Azure FunctionsCreating real life serverless solutions with Azure Functions
Creating real life serverless solutions with Azure FunctionsJan de Vries
 

Similar to Rawnet Lightning Talk - Elasticsearch (20)

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...
 
Log Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar SeriesLog Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar Series
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearch
 
Optimizing Elastic for Search at McQueen Solutions
Optimizing Elastic for Search at McQueen SolutionsOptimizing Elastic for Search at McQueen Solutions
Optimizing Elastic for Search at McQueen Solutions
 
Elasticsearch an overview
Elasticsearch   an overviewElasticsearch   an overview
Elasticsearch an overview
 
TechDays 2017 - Creating real life serverless solutions with azure functions
TechDays 2017 - Creating real life serverless solutions with azure functionsTechDays 2017 - Creating real life serverless solutions with azure functions
TechDays 2017 - Creating real life serverless solutions with azure functions
 
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
 
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
 
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
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
 
Unify Earth Observation products access with OpenSearch
Unify Earth Observation products access with OpenSearchUnify Earth Observation products access with OpenSearch
Unify Earth Observation products access with OpenSearch
 
Odtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for youOdtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for you
 
Real-time search in Drupal. Meet Elasticsearch
Real-time search in Drupal. Meet ElasticsearchReal-time search in Drupal. Meet Elasticsearch
Real-time search in Drupal. Meet Elasticsearch
 
dfl
dfldfl
dfl
 
Anwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchAnwendungsfaelle für Elasticsearch
Anwendungsfaelle für Elasticsearch
 
Spark Sql for Training
Spark Sql for TrainingSpark Sql for Training
Spark Sql for Training
 
Querying Data Pipeline with AWS Athena
Querying Data Pipeline with AWS AthenaQuerying Data Pipeline with AWS Athena
Querying Data Pipeline with AWS Athena
 
Spark streaming , Spark SQL
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQL
 
A Serverless Approach to Operational Log Visualisation and Analytics
A Serverless Approach to Operational Log Visualisation and AnalyticsA Serverless Approach to Operational Log Visualisation and Analytics
A Serverless Approach to Operational Log Visualisation and Analytics
 
Creating real life serverless solutions with Azure Functions
Creating real life serverless solutions with Azure FunctionsCreating real life serverless solutions with Azure Functions
Creating real life serverless solutions with Azure Functions
 

Recently uploaded

Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 

Rawnet Lightning Talk - Elasticsearch

  • 2. What Is Elasticsearch? Search index Scalable Distributed Document-oriented Built on Apache Lucene
  • 3. What Isn’t Elasticsearch Not a database No security No ACID compliance No support for transactions Near real-time data availability Eventual consistency
  • 4. Typical Architecture Web application Data access layer RDBMS Elasticsearch
  • 6. Simple REST API - GET GET / { "name": "Murmur", "cluster_name": "elasticsearch", "version": { "number": "2.2.0", "build_hash": "8ff36d139e16f8720f2947ef62c8167a888992fe", "build_timestamp": "2016-01-27T13:32:39Z", "build_snapshot": false, "lucene_version": "5.4.1" }, "tagline": "You Know, for Search" }
  • 7. Simple REST API - GET GET /strutt/property/14523 { "_index": "strutt", "_type": "property", "_id": "14523", "_version": 1, "found": true, "_source": { "name": "Newton Of Drumduan", "public_date": "2016-03-20 12:31:31", "property_address": "Newton Of Drumduan, Dess", "property_town": "Aboyne", "property_county": "Aberdeenshire", "property_postcode": "AB34 5BD", "property_price_min": 975000, "property_price_display": "£ 975,000", "property_features": [ "Garden", "Rural", "Outbuildings", "Land/Paddock" ], ... ... } }
  • 8. Simple REST API - POST POST /strutt/property { "name" : "Mark's House", "property_town" : "Lightwater", "property_features" : [ "XBox One", "Big TV", "Big amp" ] } { "_index": "strutt", "_type": "property", "_id": "AVQG5ihvhgvIo9hLVnu2", "_version": 1, "_shards": { "total": 2, "successful": 1, "failed": 0 }, "created": true }
  • 9. Simple REST API - PUT PUT /strutt/property/1234 { "name" : "Mark's House", "property_town" : "Lightwater", "property_features" : [ "XBox One", "Big TV", "Big amp" ] } { "_index": "strutt", "_type": "property", "_id": "1234", "_version": 1, "_shards": { "total": 2, "successful": 1, "failed": 0 }, "created": true }
  • 10. Clever Things Elasticsearch Can Do Full text search Geolocation Aggregations Custom scoring Combining elements
  • 11. Full Text Search GET /strutt/property/_search { "query" : { "match": { "property_long_description": "underfloor heating" } } } { "took": 5, "hits": { "total": 413, "max_score": 0.94447553, "hits": [ { "_id": "15825", "_score": 0.94447553, "_source": { "name": "Lower Sandhurst Road (Lot 1)", "property_long_description": "Underfloor heating throughout and Ambiente thermostats..." } }, { "_id": "16783", "_score": 0.92866411, "_source": { "name": "Eaton Place, London", "property_long_description": "... including underfloor heating, crestron lighting ..." } ] } }
  • 12. Geolocation - Filter By Distance GET /strutt/office/_search { "query": { "filtered": { "filter": { "bool": { "filter": [ { "geo_distance": { "distance": "10miles", "distance_type": "sloppy_arc", "location": { "lat": "51.41082", "lon": "-0.67480" } } } ] } } } } }
  • 13. Geolocation - Sort By Distance GET /strutt/city/_search { "sort": [ { "_geo_distance": { "location": { "lat": "45.850677", "lon": "12.389420" }, "order": "asc", "unit": "miles", "distance_type": "sloppy_arc" } } ], "size": 25 }
  • 14. Geolocation - Shape Search GET /strutt/property/_search { "query": { "filtered": { "filter": { "bool": { "must": [ { "geo_polygon": { "location": { "points": [ { "lat": 51.381423948522, "lon": -0.67402839660645 }, { "lat": 51.379388252364, "lon": -0.65703392028809 }, { "lat": 51.370494412739, "lon": -0.66338539123535 }, ... ...
  • 15. Aggregations Extract data from Elastic results Three types of aggregation Metric Bucket Pipeline Why? Hugely powerful and FAST GET /strutt/properties/_search { "aggregations": { "average_price" : { "avg": { "field" : "price" } } } }
  • 16. Aggregations - Some Examples Metric Aggregations Avg Geo Bounds Max/Min/Sum Bucket Aggregations Terms Geo Distance Range
  • 17. GET /strutt/properties/_search { "aggregations": { "grouped_by_town" : { "terms" : { "field" : "town" }, "aggregations": { "average_price" : { "avg" : { "field" : "price" } } } } } } RESULTS { "grouped_by_town": { "buckets": [{ "key": "Ascot", "doc_count": 50, "average_price": { "value": 75 } }, { "key": "Windsor", "doc_count": 20, "average_price": { "value": 145 } }] } } Nested Aggregations ?!?!
  • 18. Custom Scoring GET /strutt/article/_search { "query": { "function_score": { "query": { "filtered": { "filter": { "bool": { "must": [ { "term": { "parent_id": "3030" } } ] } } } }, "functions": [ { "gauss": { "public_date": { "origin": "2016-04-12 09:00:07", "scale": "150d", "offset": "30d", "decay": "0.1" } } } ] } } }
  • 19. Combining Elements GET /strutt/property/_search { "query": { "filtered": { "filter": { "bool": { "must": [ { "term": { "property_available": 1 } }, { "range": { "property_price_max": { "gte": "1000000" } } }, { "range": { "property_price_min": { "lte": "5000000" } } },
  • 20. Combining Elements { "geo_polygon": { "location": { "points": [ { "lat": 51.39963404311, "lon": -0.68990707397461 }, { "lat": 51.393636224206, "lon": -0.64115524291992 }, { "lat": 51.368351060511, "lon": -0.63600540161133 }, { "lat": 51.371351725538, "lon": -0.68750381469727 } ] } } },
  • 21. Combining Elements { "range": { "property_bedrooms": { "gte": "5" } } }, { "bool": { "should": [ { "term": { "property_class": "Residential sales" } } ] } },
  • 22. Combining Elements { "bool": { "should": [ { "term": { "property_features": "Swimming Pool" } } ] } } ], "filter": [ { "geo_distance": { "distance": "10miles", "distance_type": "sloppy_arc", "location": { "lat": "51.41082", "lon": "-0.67480" } } } ] }
  • 23. Combining Elements "sort": [ { "_geo_distance": { "location": { "lat": "51.41082", "lon": "-0.67480" }, "order": "asc", "unit": "miles", "distance_type": "sloppy_arc" } }, { "property_price_min": { "order": "desc" } } ], "from": 0, "size": 10000 }
  • 24. Did I Mention It’s Fast? { "took": 12, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 3, "max_score": null, "hits": [ ... ...
  • 25. And There’s More... Automatic clustering Explaining query results Suggesters Spelling corrections and fuzzy matching Match highlighting Term boosting Query profiling Cluster management and monitoring

Editor's Notes

  1. Look at how we make decisions Automatic processes evolved over millenia Not always right - optimised for survival Learn to be aware of when they may be wrong