mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
Prepared statements do not work well with the partial indexes that Nominatim uses because all Python constants are replaced with parameters. A query like: placex.select().where(placex.c.rank_address.between(4, 25) gets translated into a prepared query with two parameters: SELECT * FROM placex WHERE rank_address BETWEEN %s and %s And this does not work with a partial index of: CREATE INDEX on placex(geometry) WHERE rank_address between 4 and 25