mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-27 10:43:02 +03:00
parent
16794a84de
commit
8f0c628310
@ -237,7 +237,8 @@ class SearchDescription
|
||||
$oSearch->sHouseNumber = $oSearchTerm->sToken;
|
||||
// sanity check: if the housenumber is not mainly made
|
||||
// up of numbers, add a penalty
|
||||
if (preg_match_all('/[^0-9]/', $oSearch->sHouseNumber, $aMatches) > 2) {
|
||||
if (preg_match('/\\d/', $oSearch->sHouseNumber) === 0
|
||||
|| preg_match_all('/[^0-9]/', $oSearch->sHouseNumber, $aMatches) > 2) {
|
||||
$oSearch->iSearchRank++;
|
||||
}
|
||||
if (empty($oSearchTerm->iId)) {
|
||||
|
Loading…
Reference in New Issue
Block a user