Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Searching OpenStreetMap with Elasticsearch
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Christoph Lingg
November 24, 2015
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Searching OpenStreetMap with Elasticsearch
Christoph Lingg
November 24, 2015
Other Decks in Programming
See All in Programming
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
540
contenteditable と日本語入力に向き合う
colorful12
0
200
Domain-Driven Transformation
hschwentner
2
2.3k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
AmebaブログはKMPから卒業します
kmars0605
0
180
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
870
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
A Soul's Torment
seathinner
8
3.8k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
BBQ
matthewcrist
90
10k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Transcript
Searching OpenStreetMap with Elasticsearch photon.komoot.de Christoph Lingg –
[email protected]
komoot
OpenStreetMap • free • editable map • worldwide • built
by volunteers • open-content licence
OpenStreetMap
OpenStreetMap
Geocoding „Böcklerpark“ Coordinate(10.1 50.2) Park Kreuzberg, Berlin, Germany
Nominatim • started many years ago • standard solution for
OSM • based on Postgres/Postgis, SQL, PHP, C • powerfull + mature • drawbacks ◦ slow ◦ no typo tolerance ◦ no partial match / search-as-you-type
Closing the Gap • suitable for mobile usage • “built
on the shoulder of a giant” → elasticsearch • open source • free public API • enhance the OSM ecosystem
{ "name": "VIASKO", "housenumber": "33a", "amenity": "restaurant", "coordinate": [10, 52
], "street": "Bahnhofstraße", "postcode": "10403", "city": "Berlin", "state": "Berlin", "country": "Germany", "context": "Kreuzberg", "importance": 0.1 } OSM Entry { "name": "VIASKO", "housenumber": "33a", "amenity": "restaurant", "coordinate": [10, 52] } Photon Document
Photon Importer VIASKO Bahnhofstraße Postcode 10403 City Berlin State Country
Germany Berlin Nominatim DB Postgis Elasticsearch Index Photon Importer
Type-ahead search "filter": { "photonngram": { "min_gram": "1", "type": "edgeNGram",
"max_gram": "100" },... }
Typo Tolerance "query": { "bool": { "must": { "match": {
"collector.default": { "fuzziness": 1, "query": "${query}", "analyzer": "search_ngram", "prefix_length": 2 } } }, "should":{ "match": { "collector.${lang}.raw": { "query": "${query}", "boost": 100, "analyzer": "search_raw" } } } }
Location biased "score_mode": "multiply", "functions": [ { "script_score": { "script":
"1 + doc['importance'].value * 100" } }, { "script_score": { "script": " dist = doc['coordinate'].distanceInKm(lat, lon); 0.5 + ( 1.5 / (1.0 + dist/40.0) )", "params": { "lat": "${lat}", "lon": "${lon}" } } } ]
Photon Project • 100 Mio documents • 60 GB search
index • easy install • photon.komoot.de • github.com/komoot/photon • want be informed for the next sprint? →
[email protected]
komoot.de/hack15