Our places.
Our priorities.
One search.
Pelias turns several place datasets into one searchable index. LiveMap controls which collections get extra attention—and how they appear.
The ingredients
Addresses, places & landmarks
Swiss PBF → regional polygon extract. Named landmarks use their own layer.
openstreetmapGeographic context
Swiss administrative places and postcodes. Lookup services help attach place hierarchy.
whosonfirstStreet names & geometry
Prepared from OSM for the Pelias polyline importer.
streetPoints of interest
Places download → regional filtering → Pelias CSV.
overtureStops & stations
Official service points → normalized nationwide CSV.
ptA scoop. A pretzel.
Overture ice cream shops + the official Valora Brezelkönig location feed.
icecreambrezelkoenigFrom source to searchable place
Ice cream collection
Select ice_cream_shop from the existing Overture CSV. Add address and locality from the original place records.
Brezelkönig collection
Fetch Swiss stores from Valora. Keep stable store IDs, names, coordinates, address and regular weekly hours.
Normalize & validate
Require ID + name + valid Swiss bounding-box coordinates. Give each collection its own Pelias source.
scripts/build-demo-collections.pySearch records → Elasticsearch
demo-collections.csv → Pelias CSV importer → refresh index → restart API.
scripts/45-import-demo.shCollection catalog → browser
frontend/demo-collections.json enriches returned API features by their IDs with addresses, hours and card type.
For category browsing, this small catalog also selects IDs by distance. Pelias /place must return each indexed record before it appears. Named search candidates come from Pelias.
Priority has two controls
Source and layer boosts
These weights influence the API's score. They are not guaranteed positions.
templates/pelias.json → api.customBoostsExplicit collection placement
After ranking and deduplication, collections lead category searches. Exact name matches lead named searches:
frontend/demo-search.js → merge()What happens when you search
Type a query
Normal Pelias search or autocomplete uses the map center and the radius slider. An explicit recognized category locality supplies its own center.
Ask the collections
A category request selects all collection IDs within the radius and retrieves indexed records through /place in batches of 40. Named collection requests use autocomplete.
Merge & dress
Enrich metadata, remove duplicates and order the groups. Show 12 initially, with “Show more” revealing another 12 cards and pins.
Ice cream vocabulary
ice cream · icecream · gelato · gelati · glace · glaces · eis · eiscreme
Pretzel vocabulary
pretzel · pretzels · brezel · brezeln · brezelkönig · brezelkoenig
Category recognition requires a listed term, optionally followed by a locality in the catalog, ignoring accents and case. The center is the map center, or the first catalog record in that locality—not a municipal centroid. Results from collection queries are ordered by distance to their search center. The live radius slider (1–100 km; default 25 km) bounds ordinary and collection queries; reverse search is unchanged.
Ordinary matches stay in the list. Pretzel categories also query pretzel, brezel and bretzel in OSM/Overture. Ordinary and named requests fetch up to 100 results per query; “Show more” pages the loaded set, not the entire database.
Add a source. Give it a voice.
Map the source
Extend scripts/build-demo-collections.py with a stable source ID, record ID, name, coordinates and category. Emit CSV search records and JSON display metadata.
Register it with Pelias
In templates/pelias.json, add the source/layer pair under api.targets.layers_by_source. Set its weight in api.customBoosts.source.
Define its search behavior
Extend frontend/demo-search.js for source mapping, category vocabulary and placement. Add the source and toggle to collection query selection in frontend/index.html.
Make the card belong
Add the new kind to frontend/demo-cards.js and its visual treatment to frontend/demo-cards.css. Keep paid/demo placement clearly disclosed.
Regenerate, import, verify
From the livemap-search repository, with the local index and existing Switzerland extract available:
scripts/45-import-demo.sh switzerlandThe script renders configuration, rebuilds collection files, imports the demo CSV, refreshes Elasticsearch and restarts the API.
Check both layers
Query the API with the new sources value. Then search by name and category in the UI, toggle the collection, and verify card, pin and ranking.
For a weight-only change, render config with scripts/10-render-config.sh switzerland and restart the API with bash -c 'source scripts/common.sh switzerland; compose restart api'. No reimport is needed for a score change.
The demo boundary
Runs in this local app
Local data generation, Elasticsearch import, API configuration and browser presentation are separate pieces. Changing this checkout does not deploy a shared environment.
“Sponsored · Demo” means exactly that
Real locations and official brand artwork; illustrative placement. No commercial partnership is implied. Public feed access is not an open-data license; reuse rights need review before deployment.
Displayed hours are regular weekly hours. Special-day schedules can differ.