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.
This commit is contained in:
Sarah Hoffmann 2024-02-27 16:57:35 +01:00
parent 247065ff6f
commit 62b7670e0c

View File

@ -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;