include housenumbers and postcodes when rechecking for exact matches

This commit is contained in:
Sarah Hoffmann 2017-02-28 21:40:05 +01:00
parent 196c55e341
commit 450a12c6be
2 changed files with 1 additions and 2 deletions

View File

@ -1737,7 +1737,7 @@ class Geocode
$aClassType = getClassTypesWithImportance(); $aClassType = getClassTypesWithImportance();
$aRecheckWords = preg_split('/\b[\s,\\-]*/u', $sQuery); $aRecheckWords = preg_split('/\b[\s,\\-]*/u', $sQuery);
foreach ($aRecheckWords as $i => $sWord) { 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) { if (CONST_Debug) {

View File

@ -58,7 +58,6 @@ Feature: Search queries
| 30 | | 30 |
# https://trac.openstreetmap.org/ticket/5094 # https://trac.openstreetmap.org/ticket/5094
@Fail
Scenario: housenumbers are ordered by complete match first Scenario: housenumbers are ordered by complete match first
When sending json search query "6395 geminis, montevideo" with address When sending json search query "6395 geminis, montevideo" with address
Then result addresses contain Then result addresses contain