]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/TokenHousenumber.php
apply variants by languages
[nominatim.git] / lib-php / TokenHousenumber.php
index cd60d3ca5620b7851a36736971adf753c6db49f9..f7bdc4713e913d0e466d48779e14a9a0924b0bc5 100644 (file)
@@ -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++;