]> git.openstreetmap.org Git - nominatim.git/commit
Query the categories column for POI and near search
authorItz-Agasta <rupamgolui69@gmail.com>
Mon, 6 Jul 2026 12:20:40 +0000 (17:50 +0530)
committerItz-Agasta <rupamgolui69@gmail.com>
Thu, 30 Jul 2026 07:19:27 +0000 (12:49 +0530)
commit79afc7ecd0a9e2f644b6b32c0fbd0ec514c6f017
tree43b1d1c4c905f98541a69806157c0b31b656c54e
parent986e4da7dbe8275aa093476accf458b253badc0a
Query the categories column for POI and near search

Replace the place_classtype_* table lookups in PoiSearch and NearSearch with queries against the ltree categories column  (categories <@ 'osm.<class>.<type>'), backed by the GiST index. SQLite, which has no ltree, falls back to class/type equality. Because a merged placex row now carries several categories, both searches report the searched category rather than the row's class/type. get_class_table() is kept with a TODO; the place_classtype_* tables are removed in a follow-up PR.
src/nominatim_api/connection.py
src/nominatim_api/search/db_searches/base.py
src/nominatim_api/search/db_searches/near_search.py
src/nominatim_api/search/db_searches/poi_search.py