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
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
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
460
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
業務時間外もAIに働いてもらう話
colorful12
3
10k
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
170
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
420
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
2
500
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
260
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
The Language of Interfaces
destraynor
162
27k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
770
Google's AI Overviews - The New Search
badams
0
1.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
400
Balancing Empowerment & Direction
lara
6
1.3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
470
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
The SEO Collaboration Effect
kristinabergwall1
1
550
The Spectacular Lies of Maps
axbom
PRO
1
980
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
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