]> git.openstreetmap.org Git - nominatim.git/commitdiff
increase relevance of class/type importance
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 4 May 2015 19:14:34 +0000 (21:14 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 4 May 2015 19:14:34 +0000 (21:14 +0200)
fixes #273

lib/Geocode.php
lib/lib.php

index 212eebb97cc2a3b04f8a5369755fe6cc79163cc9..18062d8c8784d259824115382cbcf0c4ac3e2716 100644 (file)
                                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;
                        }
index 2f94c25cf7c7d8eab011cdd46a6691954b77a933..c68f04eb9df20e05c13c0a9819cdb4a743148b75 100644 (file)
  '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',),
  '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,),