From: Sarah Hoffmann Date: Thu, 1 May 2014 07:16:03 +0000 (+0200) Subject: add penalty for special term searches X-Git-Tag: v2.3.0~43 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/34adfd504104fa941f6edbfa155b990ef7b3d77b add penalty for special term searches abbreviations for some of the terms are too easily matched against common address terms like 'street' --- diff --git a/lib/Geocode.php b/lib/Geocode.php index 7f1d3733..92e1a0b3 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -908,6 +908,7 @@ $aSearch['sType'] = $aSearchTerm['type']; if (sizeof($aSearch['aName'])) $aSearch['sOperator'] = 'name'; else $aSearch['sOperator'] = 'near'; // near = in for the moment + if (strlen($aSearchTerm['operator']) == 0) $aSearch['iSearchRank'] += 1; // Do we have a shortcut id? if ($aSearch['sOperator'] == 'name')