Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
220
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
Oxcを導入して開発体験が向上した話
yug1224
4
330
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
270
さぁV100、メモリをお食べ・・・
nilpe
0
150
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
Lessons from Spec-Driven Development
simas
PRO
0
220
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.5k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
320
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
What's in a price? How to price your products and services
michaelherold
247
13k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
750
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