From 450a12c6be67381387bf400433109035ccb19049 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 28 Feb 2017 21:40:05 +0100 Subject: [PATCH 1/1] include housenumbers and postcodes when rechecking for exact matches --- lib/Geocode.php | 2 +- test/bdd/api/search/queries.feature | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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 -- 2.39.5