From 62b7670e0c5c6a8aeea5538b1a62c481ae17aaf1 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 27 Feb 2024 16:57:35 +0100 Subject: [PATCH] for postcodes use rank_search as base rank for finding addresses The rank_address reflects the position in the address which is usually lower than what one would expect for a postcode area. --- lib-sql/functions/placex_triggers.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql index 386140f4..0f74336f 100644 --- a/lib-sql/functions/placex_triggers.sql +++ b/lib-sql/functions/placex_triggers.sql @@ -1265,6 +1265,8 @@ BEGIN END IF; ELSEIF NEW.rank_address > 25 THEN max_rank := 25; + ELSEIF NEW.class in ('place','boundary') and NEW.type in ('postcode','postal_code') THEN + max_rank := NEW.rank_search; ELSE max_rank := NEW.rank_address; END IF; -- 2.45.1