From: Sarah Hoffmann Date: Tue, 3 Nov 2020 15:29:19 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~200 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/764dcd7f6459c08aafd5cf2fcb7902cc2868cb30?ds=sidebyside;hp=-c Merge remote-tracking branch 'upstream/master' --- 764dcd7f6459c08aafd5cf2fcb7902cc2868cb30 diff --combined CMakeLists.txt index 5aa71800,cb137341..816ce647 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@@ -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 @@@ -129,16 -128,6 +128,16 @@@ 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}) @@@ -146,11 -135,6 +145,11 @@@ 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 8e71d761,69b6f41c..cce85f2b --- a/lib/Geocode.php +++ b/lib/Geocode.php @@@ -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; @@@ -934,6 -934,8 +934,8 @@@ } 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 4897aa72,7e90016c..87a5a294 --- a/utils/update.php +++ b/utils/update.php @@@ -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;'; } }