]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove special casing for rank 25 postcodes
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 18 Sep 2020 14:18:02 +0000 (16:18 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 18 Sep 2020 14:18:02 +0000 (16:18 +0200)
They can be computed like any other place.

sql/functions/placex_triggers.sql
test/bdd/api/search/structured.feature

index 0102d2c819d83c59f8a6047e732102e67d2341bb..a935b75a644c260abc1880112d495b8189dd6f8d 100644 (file)
@@ -703,7 +703,7 @@ BEGIN
 
   -- ---------------------------------------------------------------------------
   -- For low level elements we inherit from our parent road
-  IF (NEW.rank_search > 27 OR (NEW.type = 'postcode' AND NEW.rank_search = 25)) THEN
+  IF NEW.rank_search > 27 THEN
 
     --DEBUG: RAISE WARNING 'finding street for % %', NEW.osm_type, NEW.osm_id;
     NEW.parent_place_id := null;
@@ -766,11 +766,6 @@ BEGIN
       -- Performance, it would be more acurate to do all the rest of the import
       -- process but it takes too long
       -- Just be happy with inheriting from parent road only
-      IF NEW.rank_search <= 25 and NEW.rank_address > 0 THEN
-        result := add_location(NEW.place_id, NEW.country_code, NEW.partition, name_vector, NEW.rank_search, NEW.rank_address, upper(trim(NEW.address->'postcode')), NEW.geometry);
-        --DEBUG: RAISE WARNING 'Place added to location table';
-      END IF;
-
       result := insertSearchName(NEW.partition, NEW.place_id, name_vector,
                                  NEW.rank_search, NEW.rank_address, NEW.geometry);
 
index ec7eb1be68631cd0a45b5c0cbc3a386f05a42ae5..e94cd4cc2b26b15bf79e02e2d5b12fb2d490b8a7 100644 (file)
@@ -18,7 +18,7 @@ Feature: Structured search queries
           | 22547 |
         Then results contain
           | type |
-          | postcode |
+          | ^post(al_)?code |
         And result addresses contain
           | postcode |
           | 22547 |