mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
add penalty for special term searches
abbreviations for some of the terms are too easily matched against common address terms like 'street'
This commit is contained in:
@@ -908,6 +908,7 @@
|
|||||||
$aSearch['sType'] = $aSearchTerm['type'];
|
$aSearch['sType'] = $aSearchTerm['type'];
|
||||||
if (sizeof($aSearch['aName'])) $aSearch['sOperator'] = 'name';
|
if (sizeof($aSearch['aName'])) $aSearch['sOperator'] = 'name';
|
||||||
else $aSearch['sOperator'] = 'near'; // near = in for the moment
|
else $aSearch['sOperator'] = 'near'; // near = in for the moment
|
||||||
|
if (strlen($aSearchTerm['operator']) == 0) $aSearch['iSearchRank'] += 1;
|
||||||
|
|
||||||
// Do we have a shortcut id?
|
// Do we have a shortcut id?
|
||||||
if ($aSearch['sOperator'] == 'name')
|
if ($aSearch['sOperator'] == 'name')
|
||||||
|
|||||||
Reference in New Issue
Block a user