From: Sarah Hoffmann Date: Tue, 28 Feb 2017 20:40:05 +0000 (+0100) Subject: include housenumbers and postcodes when rechecking for exact matches X-Git-Tag: v3.0.0~60 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/450a12c6be67381387bf400433109035ccb19049 include housenumbers and postcodes when rechecking for exact matches --- diff --git a/lib/Geocode.php b/lib/Geocode.php index c6341829..b12f9607 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1737,7 +1737,7 @@ class Geocode $aClassType = getClassTypesWithImportance(); $aRecheckWords = preg_split('/\b[\s,\\-]*/u', $sQuery); foreach ($aRecheckWords as $i => $sWord) { - if (!preg_match('/\pL/', $sWord)) unset($aRecheckWords[$i]); + if (!preg_match('/[\pL\pN]/', $sWord)) unset($aRecheckWords[$i]); } if (CONST_Debug) { diff --git a/test/bdd/api/search/queries.feature b/test/bdd/api/search/queries.feature index c9b33701..0074e334 100644 --- a/test/bdd/api/search/queries.feature +++ b/test/bdd/api/search/queries.feature @@ -58,7 +58,6 @@ Feature: Search queries | 30 | # https://trac.openstreetmap.org/ticket/5094 - @Fail Scenario: housenumbers are ordered by complete match first When sending json search query "6395 geminis, montevideo" with address Then result addresses contain