SlideShare uma empresa Scribd logo
1 de 12
Baixar para ler offline
Elasticsearch
(not just for text search)
Aleck Landgraf
@aleck_landgraf
buildingenergy.com
Buildings use a LOT of energy
• Buildings use more energy than any other sector in the US!
• 23% wasted energy*
• $1.2 Trillion wasted
• 40% of GHG wasted(1.1 gigatons annually)**
• What’s the miles per gallon of your office building?
• So how are buildings like mine performing?
• How are my peers’ buildings performing?
*McKinsey & Co: “Unlocking energy efficiency in the US economy”
**equivalent to the entire US fleet of passenger vehicles and lights trucks
The Buildings Performance
Database
• With the US DOE, LBNL, we make one of the largest
datasets of building data available (by statistical methods)
• Developer API which enables people to build their own
visualizations and develop fully customized applications
• Expose the DOE Building Energy Performance Taxonomy
through “filters”, the standard for describing buildings
• Provide a decision support tool
• 755k buildings +
A Histogram Illustration
/analyze/peers/
Why Elasticseach?
• We were choking on data with our previous solution
• It’s not just for text search
• Fast access to a denormalized set of data
• django-haystack integration into our Django stack
• It’s built to scale!
• Aggs!
Elasticsearch Aggregations
• stats aggregation
• percentile aggregation
• histogram aggregation
• facet counts
stats aggregation
• min, max, std dev, determines bin width
{
"aggs" : {
"eui_stats" : { "stats" : { "field" : "eui" } }
}
}
{
...
!
"aggregations": {
"eui_stats": {
"count": 2194,
"min": 0,
"max": 120,
"avg": 55.8,
"sum": 122425.2
}
}
}
percentile aggregation
• quartiles, median (the 0th and 100th quartiles from stats)
{
"aggs" : {
"eui_quartiles" : {
"percentiles" : {
"field" : "eui",
"percents" : [25, 50, 75]
}
}
}
}
{
...
!
"aggregations": {
"eui_quartiles": {
"values" : {
"25.0": 40,
"50.0": 60,
"75.0": 85
}
}
}
}
histogram aggregation
• EUI histogram
{
"aggs" : {
“eui_histogram" : {
"histogram" : {
"field" : "eui",
"interval" : 10
}
}
}
}
{
"aggregations": {
“eui_histogram" : {
"buckets": [
{
"key": 0,
"doc_count": 57
},
{
"key": 10,
"doc_count": 93
},
...
Elasticsearch Aggregations
• stats aggregation (min, max, std dev, determines bin width)
• percentile aggregation (quartiles, median)
• histogram aggregation (counts per EUI range)
Learning curve
• Custom ES backend for django-haystack to add the new ES
features, hope these make it to haystack someday
• Three queries per search to get stats, percentiles, and
histogram. Room for improvement/ES scripts
• Easy to set up in dev and prod, django-haystack keeps ES
and postgres in sync.
• An order of magnitude speed improvement :-)
Thanks!
buildingenergy.com
Questions/Comments?
@aleck_landgraf

Mais conteúdo relacionado

Destaque

Destaque (13)

Kts c3-he to hop
Kts c3-he to hopKts c3-he to hop
Kts c3-he to hop
 
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
46/2015/NĐ-CP về quản lý chất lượng công trình xây dựng
 
trabajo de ingenieria
trabajo de ingenieriatrabajo de ingenieria
trabajo de ingenieria
 
Kts c1-he thong so
Kts c1-he thong soKts c1-he thong so
Kts c1-he thong so
 
Intertextuality
IntertextualityIntertextuality
Intertextuality
 
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
Better Goals for Better Outcomes: Best Practices for Writing Measurable, Effe...
 
Het leven samenvouwen (Vastenwerking 2015)
Het leven samenvouwen (Vastenwerking 2015)Het leven samenvouwen (Vastenwerking 2015)
Het leven samenvouwen (Vastenwerking 2015)
 
抄,是最好的獲利模式(全)
抄,是最好的獲利模式(全)抄,是最好的獲利模式(全)
抄,是最好的獲利模式(全)
 
Indian Economy: The Curious Case of Household Savings-Investment Gap
Indian Economy: The Curious Case of Household Savings-Investment GapIndian Economy: The Curious Case of Household Savings-Investment Gap
Indian Economy: The Curious Case of Household Savings-Investment Gap
 
ADME And Toxicity Optimization Services
ADME And Toxicity Optimization ServicesADME And Toxicity Optimization Services
ADME And Toxicity Optimization Services
 
Omnibus database machine
Omnibus database machineOmnibus database machine
Omnibus database machine
 
ESSA Overview
ESSA OverviewESSA Overview
ESSA Overview
 
Operation Theatre LED Light
Operation Theatre  LED LightOperation Theatre  LED Light
Operation Theatre LED Light
 

Último

Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
gajnagarg
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
HyderabadDolls
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
gajnagarg
 

Último (20)

Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptx
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 

Elasticsearch (not just for text search)

  • 1. Elasticsearch (not just for text search) Aleck Landgraf @aleck_landgraf buildingenergy.com
  • 2. Buildings use a LOT of energy • Buildings use more energy than any other sector in the US! • 23% wasted energy* • $1.2 Trillion wasted • 40% of GHG wasted(1.1 gigatons annually)** • What’s the miles per gallon of your office building? • So how are buildings like mine performing? • How are my peers’ buildings performing? *McKinsey & Co: “Unlocking energy efficiency in the US economy” **equivalent to the entire US fleet of passenger vehicles and lights trucks
  • 3. The Buildings Performance Database • With the US DOE, LBNL, we make one of the largest datasets of building data available (by statistical methods) • Developer API which enables people to build their own visualizations and develop fully customized applications • Expose the DOE Building Energy Performance Taxonomy through “filters”, the standard for describing buildings • Provide a decision support tool • 755k buildings +
  • 5. Why Elasticseach? • We were choking on data with our previous solution • It’s not just for text search • Fast access to a denormalized set of data • django-haystack integration into our Django stack • It’s built to scale! • Aggs!
  • 6. Elasticsearch Aggregations • stats aggregation • percentile aggregation • histogram aggregation • facet counts
  • 7. stats aggregation • min, max, std dev, determines bin width { "aggs" : { "eui_stats" : { "stats" : { "field" : "eui" } } } } { ... ! "aggregations": { "eui_stats": { "count": 2194, "min": 0, "max": 120, "avg": 55.8, "sum": 122425.2 } } }
  • 8. percentile aggregation • quartiles, median (the 0th and 100th quartiles from stats) { "aggs" : { "eui_quartiles" : { "percentiles" : { "field" : "eui", "percents" : [25, 50, 75] } } } } { ... ! "aggregations": { "eui_quartiles": { "values" : { "25.0": 40, "50.0": 60, "75.0": 85 } } } }
  • 9. histogram aggregation • EUI histogram { "aggs" : { “eui_histogram" : { "histogram" : { "field" : "eui", "interval" : 10 } } } } { "aggregations": { “eui_histogram" : { "buckets": [ { "key": 0, "doc_count": 57 }, { "key": 10, "doc_count": 93 }, ...
  • 10. Elasticsearch Aggregations • stats aggregation (min, max, std dev, determines bin width) • percentile aggregation (quartiles, median) • histogram aggregation (counts per EUI range)
  • 11. Learning curve • Custom ES backend for django-haystack to add the new ES features, hope these make it to haystack someday • Three queries per search to get stats, percentiles, and histogram. Room for improvement/ES scripts • Easy to set up in dev and prod, django-haystack keeps ES and postgres in sync. • An order of magnitude speed improvement :-)