mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-09-20 15:37:49 +03:00
further increase penalty on housenumbers without numbers
Make the penality dependent on the length of the token: no penalty for one letter house numbers and increasing one for more letters.
This commit is contained in:
parent
d18794931a
commit
94d3dee369
@ -59,7 +59,7 @@ class HouseNumber
|
||||
$iSearchCost = 1;
|
||||
if (preg_match('/\\d/', $this->sToken) === 0
|
||||
|| preg_match_all('/[^0-9]/', $this->sToken, $aMatches) > 2) {
|
||||
$iSearchCost++;
|
||||
$iSearchCost += strlen($this->sToken) - 1;
|
||||
}
|
||||
if (!$oSearch->hasOperator(\Nominatim\Operator::NONE)) {
|
||||
$iSearchCost++;
|
||||
|
Loading…
Reference in New Issue
Block a user