From: Sarah Hoffmann Date: Tue, 14 Jan 2020 20:56:02 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~263 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/b3f1f45f97ebbe378be8e9e3b09f90aa5e22c0e1?hp=a437f5d18a48d3f982e965ef81c93f71a73e53e0 Merge remote-tracking branch 'upstream/master' --- diff --git a/lib/template/includes/html-top-navigation.php b/lib/template/includes/html-top-navigation.php index 41b638ab..0047e59c 100644 --- a/lib/template/includes/html-top-navigation.php +++ b/lib/template/includes/html-top-navigation.php @@ -21,8 +21,10 @@ About & Help diff --git a/lib/template/includes/introduction.php b/lib/template/includes/introduction.php index f089881f..ce136d2d 100644 --- a/lib/template/includes/introduction.php +++ b/lib/template/includes/introduction.php @@ -6,6 +6,6 @@ look up data by its geographic coordinate (reverse search). Each result comes wi link to a details page where you can inspect what data about the object is saved in the database and investigate how the address of the object has been computed.

-

For more information visit the Nominatim wiki page.

+

For more information visit the Nominatim home page.

All usage of nominatim.openstreetmap.org must follow the Nominatim Usage Policy.

diff --git a/lib/template/includes/report-errors.php b/lib/template/includes/report-errors.php index 05a47c8b..c5dc1e7f 100644 --- a/lib/template/includes/report-errors.php +++ b/lib/template/includes/report-errors.php @@ -1,24 +1,42 @@

- Before reporting problems please read the user documentation - and - FAQ. + Before reporting problems please read the user documentation. + +

Finding the expected result

+ + First of all, please make sure that the result that you expect is + available in the OpenStreetMap data. + + To find the OpenStreetMap data, do the following: + + + + If you cannot find the data you are looking for, there is a good chance + that it has not been entered yet. You should report or fix the problem in OpenStreetMap directly. + +

Reporting bad searches

+ + Problems may be reported at the issue tracker on github. Please read through + the open tickets first and check if your problem has not already been + reported. + + When reporting a problem, include the following: + + + + For general questions about installing and searching in Nominatim, please + use Help OpenStreetMap. - If your problem relates to the address of a particular search result please use the 'details' link - to check how the address was generated before reporting a problem. -

-

- Use Nominatim issues on github - to report problems. - -

-

- Please ensure that you include a full description of the problem, including the search - query that you used, the problem with the result and, if the problem relates to missing data, - the osm type (node, way, relation) and id of the item that is missing. -

-

- Problems that contain enough detail are likely to get looked at before ones that require - significant research.

diff --git a/utils/check_import_finished.php b/utils/check_import_finished.php index 7828f5cf..c6ccb67b 100755 --- a/utils/check_import_finished.php +++ b/utils/check_import_finished.php @@ -130,6 +130,32 @@ END; } } +echo 'Checking search indices are valid ... '; +$sSQL = <<< END + SELECT relname + FROM pg_class, pg_index + WHERE pg_index.indisvalid = false + AND pg_index.indexrelid = pg_class.oid; +END; +$aInvalid = $oDB->getCol($sSQL); +if (empty($aInvalid)) { + $print_success(); +} else { + $print_fail(); + echo <<< END + At least one index is invalid. That can happen, e.g. when index creation was + disrupted and later restarted. You should delete the affected indices and + run the index stage of setup again. + See the question 'Can a stopped/killed import process be resumed?' in the + troubleshooting guide. + Affected indices: +END; + echo join(', ', $aInvalid) . "\n"; + exit(1); +} + + + if (CONST_Use_US_Tiger_Data) { echo 'Checking TIGER table exists ... '; if ($oDB->tableExists('location_property_tiger')) { diff --git a/utils/warm.php b/utils/warm.php index 8ba746a2..5476eae0 100644 --- a/utils/warm.php +++ b/utils/warm.php @@ -23,6 +23,19 @@ $oDB->connect(); $bVerbose = $aResult['verbose']; +function print_results($aResults, $bVerbose) +{ + if ($bVerbose) { + if ($aResults && count($aResults)) { + echo $aResults[0]['langaddress']."\n"; + } else { + echo "\n"; + } + } else { + echo '.'; + } +} + if (!$aResult['search-only']) { $oReverseGeocode = new Nominatim\ReverseGeocode($oDB); $oReverseGeocode->setZoom(20); @@ -36,13 +49,10 @@ if (!$aResult['search-only']) { $fLat = rand(-9000, 9000) / 100; $fLon = rand(-18000, 18000) / 100; if ($bVerbose) echo "$fLat, $fLon = "; + $oLookup = $oReverseGeocode->lookup($fLat, $fLon); - if ($oLookup) { - $aDetails = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)); - if ($bVerbose) echo $aDetails['langaddress']."\n"; - } else { - echo '.'; - } + $aSearchResults = $oLookup ? $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)) : null; + print_results($aSearchResults, $bVerbose); } echo "\n"; } @@ -52,13 +62,14 @@ if (!$aResult['reverse-only']) { echo 'Warm search: '; if ($bVerbose) echo "\n"; - $sSQL = 'select word from word where word is not null order by search_name_count desc limit 1000'; + $sSQL = 'SELECT word FROM word WHERE word is not null ORDER BY search_name_count DESC LIMIT 1000'; foreach ($oDB->getCol($sSQL) as $sWord) { if ($bVerbose) echo "$sWord = "; + $oGeocode->setLanguagePreference(array('en')); $oGeocode->setQuery($sWord); $aSearchResults = $oGeocode->lookup(); - if ($bVerbose) echo $aSearchResults[0]['langaddress']."\n"; - else echo '.'; + print_results($aSearchResults, $bVerbose); } + echo "\n"; }