From 79f11073910df4801b9c96b5b0d7700d9c2607fe Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 4 May 2015 21:14:34 +0200 Subject: [PATCH] increase relevance of class/type importance fixes #273 --- lib/Geocode.php | 4 ++-- lib/lib.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index 212eebb9..18062d8c 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1778,11 +1778,11 @@ if (isset($aClassType[$aResult['class'].':'.$aResult['type']]['importance']) && $aClassType[$aResult['class'].':'.$aResult['type']]['importance']) { - $aResult['foundorder'] = $aResult['foundorder'] + 0.000001 * $aClassType[$aResult['class'].':'.$aResult['type']]['importance']; + $aResult['foundorder'] += 0.0001 * $aClassType[$aResult['class'].':'.$aResult['type']]['importance']; } else { - $aResult['foundorder'] = $aResult['foundorder'] + 0.001; + $aResult['foundorder'] += 0.01; } $aSearchResults[$iResNum] = $aResult; } diff --git a/lib/lib.php b/lib/lib.php index 2f94c25c..c68f04eb 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -438,7 +438,6 @@ 'tourism:hotel' => array('label'=>'Hotel','frequency'=>2150,'icon'=>'accommodation_hotel2',), 'tourism:motel' => array('label'=>'Motel','frequency'=>43,'icon'=>'',), 'amenity:cinema' => array('label'=>'Cinema','frequency'=>277,'icon'=>'tourist_cinema',), - 'tourism:information' => array('label'=>'Information','frequency'=>224,'icon'=>'amenity_information',), 'tourism:artwork' => array('label'=>'Artwork','frequency'=>171,'icon'=>'tourist_art_gallery2',), 'historic:archaeological_site' => array('label'=>'Archaeological Site','frequency'=>407,'icon'=>'tourist_archaeological2',), 'amenity:doctors' => array('label'=>'Doctors','frequency'=>581,'icon'=>'health_doctors',), @@ -512,6 +511,7 @@ 'shop:travel_agency' => array('label'=>'Travel Agency','frequency'=>21,'icon'=>'',), 'shop:hifi' => array('label'=>'Hifi','frequency'=>21,'icon'=>'',), 'amenity:shop' => array('label'=>'Shop','frequency'=>61,'icon'=>'',), + 'tourism:information' => array('label'=>'Information','frequency'=>224,'icon'=>'amenity_information',), 'place:house' => array('label'=>'House','frequency'=>2086,'icon'=>'','defzoom'=>18,), 'place:house_name' => array('label'=>'House','frequency'=>2086,'icon'=>'','defzoom'=>18,), -- 2.39.5