Places index: drop buildings and land use, search without apostrophes and by brand
Named buildings and land-use areas are skipped unless they're also a shop/amenity/etc. A second, unshown FTS column holds the name without apostrophes and the brand tag, so "mcdonalds" finds McDonald's and "lidl" finds "Lidl Petržalka". The index records a schema version; rake places:index rebuilds older ones by itself.
This commit is contained in:
1 parent
8e4c466829
commit
f3dd37dd4e
5 files changed
+67
-12
No files matched your search
@@ -63,7 +63,7 @@ independence from connectivity.
|
||||
|
||||
* [x] Unified search box — one query across every data source, not just what's currently on the map. `GET /api/search` (`lib/maptool/search.rb`) for local sources, online ones queried from the browser (`public/js/search.js`)
|
||||
** [x] Every layer under Tracks & Points (GPX, FIT, GeoJSON, notes, plugin output) and offline hiking trails — shown *and* hidden ones. Matches name + description, case/diacritics-insensitive ("kosice" finds "Košice"); parsed features cached in memory per file by mtime
|
||||
** [x] Offline vector data — every named OSM object in each country's Geofabrik `.osm.pbf` (`osmium tags-filter nwr/name` + `osmium export -f geojsonseq`) into a SQLite FTS5 index, `data/places/<CODE>.sqlite` (`lib/maptool/places.rb`), built as the last offline-build step ("indexing places") and cached by mtime like hiking trails. Prefix + diacritics-insensitive matching, street segments merged per ~2 km cell
|
||||
** [x] Offline vector data — every named OSM object in each country's Geofabrik `.osm.pbf` (`osmium tags-filter nwr/name` + `osmium export -f geojsonseq`) into a SQLite FTS5 index, `data/places/<CODE>.sqlite` (`lib/maptool/places.rb`), built as the last offline-build step ("indexing places") and cached by mtime like hiking trails. Prefix + diacritics-insensitive matching, street segments merged per ~2 km cell; named buildings and land-use areas dropped (unless they're also a shop/amenity/…), names searchable without their apostrophes ("mcdonalds") and by `brand`. `Places::SCHEMA_VERSION` makes `rake places:index` rebuild older indexes by itself
|
||||
** [x] Every result shows where it was found (layer file / "Hiking trails SK" / "Online · Nominatim"); clicking one zooms to it (fitBounds for a track) and switches its layer on if it was off
|
||||
** [x] Source checklist in the search panel (all on by default), re-runs the search on change
|
||||
** [x] Online sources pluggable — one more entry in search.js's `SOURCES`; Nominatim already in, its failure only adds a "no connection" line under the local results
|
||||
|
||||
Reference in new issue
Block a user