mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Merge pull request #1414 from lonvia/remove-more-places-from-address
Remove more places from address ranking
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
"place" : {
|
"place" : {
|
||||||
"sea" : [2, 0],
|
"sea" : [2, 0],
|
||||||
"continent" : [2, 0],
|
"continent" : [2, 0],
|
||||||
"country" : [4, 4],
|
"country" : [4, 0],
|
||||||
"state" : [8, 8],
|
"state" : [8, 0],
|
||||||
"region" : [18, 0],
|
"region" : [18, 0],
|
||||||
"county" : 12,
|
"county" : 12,
|
||||||
"city" : 16,
|
"city" : 16,
|
||||||
@@ -83,6 +83,16 @@
|
|||||||
"neighbourhood" : [30, 0]
|
"neighbourhood" : [30, 0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{ "countries" : [ "de" ],
|
||||||
|
"tags" : {
|
||||||
|
"place" : {
|
||||||
|
"county" : [12, 0]
|
||||||
|
},
|
||||||
|
"boundary" : {
|
||||||
|
"administrative5" : [10, 0]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -887,11 +887,7 @@ BEGIN
|
|||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- some postcorrections
|
-- some postcorrections
|
||||||
IF NEW.class = 'place' THEN
|
IF NEW.class = 'waterway' AND NEW.osm_type = 'R' THEN
|
||||||
IF NEW.type in ('continent', 'sea', 'country', 'state') AND NEW.osm_type = 'N' THEN
|
|
||||||
NEW.rank_address := 0;
|
|
||||||
END IF;
|
|
||||||
ELSEIF NEW.class = 'waterway' AND NEW.osm_type = 'R' THEN
|
|
||||||
-- Slightly promote waterway relations so that they are processed
|
-- Slightly promote waterway relations so that they are processed
|
||||||
-- before their members.
|
-- before their members.
|
||||||
NEW.rank_search := NEW.rank_search - 1;
|
NEW.rank_search := NEW.rank_search - 1;
|
||||||
@@ -908,11 +904,6 @@ BEGIN
|
|||||||
NEW.country_code := NULL;
|
NEW.country_code := NULL;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Block import below rank 22
|
|
||||||
-- IF NEW.rank_search > 22 THEN
|
|
||||||
-- RETURN NULL;
|
|
||||||
-- END IF;
|
|
||||||
|
|
||||||
--DEBUG: RAISE WARNING 'placex_insert:END: % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type;
|
--DEBUG: RAISE WARNING 'placex_insert:END: % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type;
|
||||||
|
|
||||||
RETURN NEW; -- %DIFFUPDATES% The following is not needed until doing diff updates, and slows the main index process down
|
RETURN NEW; -- %DIFFUPDATES% The following is not needed until doing diff updates, and slows the main index process down
|
||||||
|
|||||||
@@ -220,8 +220,8 @@ Feature: Import into placex
|
|||||||
| R21 | 30 | 30 |
|
| R21 | 30 | 30 |
|
||||||
| R22 | 30 | 30 |
|
| R22 | 30 | 30 |
|
||||||
| R23 | 30 | 30 |
|
| R23 | 30 | 30 |
|
||||||
| R40 | 4 | 4 |
|
| R40 | 4 | 0 |
|
||||||
| R41 | 8 | 8 |
|
| R41 | 8 | 0 |
|
||||||
|
|
||||||
Scenario: search and address ranks for highways correctly assigned
|
Scenario: search and address ranks for highways correctly assigned
|
||||||
Given the scene roads-with-pois
|
Given the scene roads-with-pois
|
||||||
|
|||||||
Reference in New Issue
Block a user