]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 3 Nov 2020 15:29:19 +0000 (16:29 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 3 Nov 2020 15:29:19 +0000 (16:29 +0100)
1  2 
CMakeLists.txt
lib/Geocode.php
utils/update.php

diff --combined CMakeLists.txt
index 5aa71800b8c235d8205062646911b2b6183d6317,cb1373419987d4f79e228f935857b3438ab9b860..816ce647613c4a996a6ee6c7ed980607f6b584fc
@@@ -121,7 -121,6 +121,6 @@@ if (BUILD_API
     set(WEBSITESCRIPTS
         website/deletable.php
         website/details.php
-        website/hierarchy.php
         website/lookup.php
         website/polygons.php
         website/reverse.php
         website/status.php
     )
  
 +   set(WEBSITEFILES
 +       403.html
 +       509.html
 +       crossdomain.xml
 +       favicon.ico
 +       nominatim.xml
 +       robots.txt
 +       taginfo.json
 +   )
 +
     foreach (script_source ${WEBSITESCRIPTS})
         configure_file(${PROJECT_SOURCE_DIR}/cmake/website.tmpl
                        ${PROJECT_BINARY_DIR}/${script_source})
  
     set(WEBPATHS css images js)
  
 +   foreach (webfile ${WEBSITEFILES})
 +       configure_file(${PROJECT_SOURCE_DIR}/website/${webfile}
 +                      ${PROJECT_BINARY_DIR}/website/${webfile})
 +   endforeach()
 +
     foreach (wp ${WEBPATHS})
         execute_process(
             COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/
diff --combined lib/Geocode.php
index 8e71d761b367ce0d3e7722e6bf8adfd7f879b88b,69b6f41ca46e1085d2917592dc2757780bbbc64a..cce85f2b31b8f78c982fe9f9674355d3a40a95e7
@@@ -18,7 -18,7 +18,7 @@@ class Geocod
      protected $aLangPrefOrder = array();
  
      protected $aExcludePlaceIDs = array();
 -    protected $bReverseInPlan = false;
 +    protected $bReverseInPlan = true;
  
      protected $iLimit = 20;
      protected $iFinalLimit = 10;
                  } else {
                      $aResult['foundorder'] += 0.01;
                  }
+                 // - rank
+                 $aResult['foundorder'] -= 0.00001 * (30 - $aResult['rank_search']);
  
                  // Adjust importance for the number of exact string matches in the result
                  $iCountWords = 0;
diff --combined utils/update.php
index 4897aa72f88b0619e53a1bd69063724e4764fd04,7e90016c3c01018cae76afe02231f8976d2f3565..87a5a294221e5fed07f83e42af1e602fb8e1c49f
@@@ -47,7 -47,6 +47,7 @@@ $aCMDOption
  getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true);
  
  if (!isset($aResult['index-instances'])) $aResult['index-instances'] = 1;
 +
  if (!isset($aResult['index-rank'])) $aResult['index-rank'] = 0;
  
  date_default_timezone_set('Etc/UTC');
@@@ -242,15 -241,15 +242,15 @@@ if (isset($aResult['import-way']) && $a
      if ($bUseOSMApi) {
          $sContentURL = 'https://www.openstreetmap.org/api/0.6/way/'.$aResult['import-way'].'/full';
      } else {
-         $sContentURL = 'https://overpass-api.de/api/interpreter?data=(way('.$aResult['import-way'].');node(w););out%20meta;';
+         $sContentURL = 'https://overpass-api.de/api/interpreter?data=(way('.$aResult['import-way'].');%3E;);out%20meta;';
      }
  }
  
  if (isset($aResult['import-relation']) && $aResult['import-relation']) {
      if ($bUseOSMApi) {
-         $sContentURLsModifyXMLstr = 'https://www.openstreetmap.org/api/0.6/relation/'.$aResult['import-relation'].'/full';
+         $sContentURL = 'https://www.openstreetmap.org/api/0.6/relation/'.$aResult['import-relation'].'/full';
      } else {
-         $sContentURL = 'https://overpass-api.de/api/interpreter?data=((rel('.$aResult['import-relation'].');way(r);node(w));node(r));out%20meta;';
+         $sContentURL = 'https://overpass-api.de/api/interpreter?data=(rel(id:'.$aResult['import-relation'].');%3E;);out%20meta;';
      }
  }