SlideShare a Scribd company logo
1 of 23
Download to read offline
Internalizing	
  loca.on	
  services	
  with	
  GeoNames
John Marc Imbrescia
Senior Software Engineer - Etsy
Wednesday, May 1, 13
Internalizing
location services
with GeoNames
May 2 2013
Wednesday, May 1, 13
The world’s online handmade marketplace.
What is Etsy.com?
Wednesday, May 1, 13
What is Etsy.com?
•20 million unique items
•18 million daily item searches
•800,000 sellers
•28 million unique views per month
•Developer blog: codeascraft.etsy.com
•450 worldwide employees
Wednesday, May 1, 13
Our Problem
Location names were only in English
•Search based on English names
•Display and search needed to be
i18n friendly.
•API limits and speed concerns
meant we needed a new solution.
Wednesday, May 1, 13
What do we use Location for?
More than just search
•Display
•Local Search
•No Mapping
•No Bounding boxes
Wednesday, May 1, 13
What do we use Location for?
Item Search
Wednesday, May 1, 13
What do we use Location for?
Item Search
Wednesday, May 1, 13
What do we use Location for?
Item Search
Wednesday, May 1, 13
What do we use Location for?
Location Display
Wednesday, May 1, 13
How did this use to work?
•Yahoo API
•Every lookup was an API call
•Stored user input and API response
•Searched based on text match of API response
•Not radius using lat/lon
•No way to Internationalize
Wednesday, May 1, 13
What Services did Etsy need to
Internalize location services?
•Lookup - Autosuggest
•Update - Scripts to refresh data
•Display - Built into the php stack
•Search - Existing, modified for new pattern
Wednesday, May 1, 13
What we have now
•GeoNames as a data source
•Feeds “geonamessuggest” Solr Core
•Sqlite database for place name lookup
•GeoName IDs used for local search
•Leverages GeoName hierarchy data
•Built in Internationalization
Wednesday, May 1, 13
How did we get here?
•Mapped old locations to GeoNames
•Added Geoname ID hierarchy to listing search
•Pushed out Sqlite database to webservers
•Slowly transitioned lookup and search services
•Did side by side testing to look for anomalies
Wednesday, May 1, 13
What are the data types?
GeoNames
Wednesday, May 1, 13
Schemas
GeoNames
•775k Entries
•1.4m alternate spellings
Wednesday, May 1, 13
Schemas
GeoNames
Wednesday, May 1, 13
Geonamessuggest
Our autosuggest for place names
•Localized
•GeoIP
•Population
Wednesday, May 1, 13
Geonamessuggest
Schema
Wednesday, May 1, 13
Distance and population come first
Sort function
Wednesday, May 1, 13
GeonameId Hierarachy
Local listing search
•Each listing gets a hierarchy of geonameids
•Local search is a filter on this ID
•Fast & Reliable
•Enables powerful functionality
•Kept old data fields
Wednesday, May 1, 13
GeonameId Collection
Local listing search
•Each listing gets a hierarchy of geonameids
•Local search is a filter query on this ID
•Fast & Reliable
•Enables powerful functionality
•Kept old data fields
Wednesday, May 1, 13
CONFERENCE PARTY
The Tipsy Crow: 770 5th Ave
Starts after Stump The Chump
Your conference badge gets you in the
door
TOMORROW
Breakfast starts at 7:30
Keynotes start at 8:30
CONTACT
John Marc Imbrescia
@thejohnmarc
johnmarc@etsy.com
Wednesday, May 1, 13

More Related Content

More from lucenerevolution

Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic search
lucenerevolution
 
Shrinking the haystack wes caldwell - final
Shrinking the haystack   wes caldwell - finalShrinking the haystack   wes caldwell - final
Shrinking the haystack wes caldwell - final
lucenerevolution
 

More from lucenerevolution (20)

Building Client-side Search Applications with Solr
Building Client-side Search Applications with SolrBuilding Client-side Search Applications with Solr
Building Client-side Search Applications with Solr
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Scaling Solr with SolrCloud
Scaling Solr with SolrCloudScaling Solr with SolrCloud
Scaling Solr with SolrCloud
 
Administering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud ClustersAdministering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud Clusters
 
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and ParboiledImplementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
 
Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic search
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Storm
 
Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST API
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucene
 
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMText Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenal
 
Turning search upside down
Turning search upside downTurning search upside down
Turning search upside down
 
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
 
Shrinking the haystack wes caldwell - final
Shrinking the haystack   wes caldwell - finalShrinking the haystack   wes caldwell - final
Shrinking the haystack wes caldwell - final
 
The First Class Integration of Solr with Hadoop
The First Class Integration of Solr with HadoopThe First Class Integration of Solr with Hadoop
The First Class Integration of Solr with Hadoop
 
A Novel methodology for handling Document Level Security in Search Based Appl...
A Novel methodology for handling Document Level Security in Search Based Appl...A Novel methodology for handling Document Level Security in Search Based Appl...
A Novel methodology for handling Document Level Security in Search Based Appl...
 
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHow Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

Internalizing location services with geo names

  • 1. Internalizing  loca.on  services  with  GeoNames John Marc Imbrescia Senior Software Engineer - Etsy Wednesday, May 1, 13
  • 3. The world’s online handmade marketplace. What is Etsy.com? Wednesday, May 1, 13
  • 4. What is Etsy.com? •20 million unique items •18 million daily item searches •800,000 sellers •28 million unique views per month •Developer blog: codeascraft.etsy.com •450 worldwide employees Wednesday, May 1, 13
  • 5. Our Problem Location names were only in English •Search based on English names •Display and search needed to be i18n friendly. •API limits and speed concerns meant we needed a new solution. Wednesday, May 1, 13
  • 6. What do we use Location for? More than just search •Display •Local Search •No Mapping •No Bounding boxes Wednesday, May 1, 13
  • 7. What do we use Location for? Item Search Wednesday, May 1, 13
  • 8. What do we use Location for? Item Search Wednesday, May 1, 13
  • 9. What do we use Location for? Item Search Wednesday, May 1, 13
  • 10. What do we use Location for? Location Display Wednesday, May 1, 13
  • 11. How did this use to work? •Yahoo API •Every lookup was an API call •Stored user input and API response •Searched based on text match of API response •Not radius using lat/lon •No way to Internationalize Wednesday, May 1, 13
  • 12. What Services did Etsy need to Internalize location services? •Lookup - Autosuggest •Update - Scripts to refresh data •Display - Built into the php stack •Search - Existing, modified for new pattern Wednesday, May 1, 13
  • 13. What we have now •GeoNames as a data source •Feeds “geonamessuggest” Solr Core •Sqlite database for place name lookup •GeoName IDs used for local search •Leverages GeoName hierarchy data •Built in Internationalization Wednesday, May 1, 13
  • 14. How did we get here? •Mapped old locations to GeoNames •Added Geoname ID hierarchy to listing search •Pushed out Sqlite database to webservers •Slowly transitioned lookup and search services •Did side by side testing to look for anomalies Wednesday, May 1, 13
  • 15. What are the data types? GeoNames Wednesday, May 1, 13
  • 16. Schemas GeoNames •775k Entries •1.4m alternate spellings Wednesday, May 1, 13
  • 18. Geonamessuggest Our autosuggest for place names •Localized •GeoIP •Population Wednesday, May 1, 13
  • 20. Distance and population come first Sort function Wednesday, May 1, 13
  • 21. GeonameId Hierarachy Local listing search •Each listing gets a hierarchy of geonameids •Local search is a filter on this ID •Fast & Reliable •Enables powerful functionality •Kept old data fields Wednesday, May 1, 13
  • 22. GeonameId Collection Local listing search •Each listing gets a hierarchy of geonameids •Local search is a filter query on this ID •Fast & Reliable •Enables powerful functionality •Kept old data fields Wednesday, May 1, 13
  • 23. CONFERENCE PARTY The Tipsy Crow: 770 5th Ave Starts after Stump The Chump Your conference badge gets you in the door TOMORROW Breakfast starts at 7:30 Keynotes start at 8:30 CONTACT John Marc Imbrescia @thejohnmarc johnmarc@etsy.com Wednesday, May 1, 13