From: Sarah Hoffmann Date: Tue, 10 Sep 2013 17:19:24 +0000 (+0200) Subject: penalty for special searches X-Git-Tag: deploy~585 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/8ffa5be81fddc6e82df7466cd3f07cad873a440c?ds=sidebyside penalty for special searches --- diff --git a/lib/Geocode.php b/lib/Geocode.php index e1acb2f6..a01869fd 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -724,6 +724,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')