From: Sarah Hoffmann Date: Sat, 22 Aug 2020 15:04:58 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~220 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/8a8e23ef3cb3e7ffb937c75ab1bdeee9ef5b3bf0?hp=-c Merge remote-tracking branch 'upstream/master' --- 8a8e23ef3cb3e7ffb937c75ab1bdeee9ef5b3bf0 diff --combined utils/update.php index db280a62,f0b45b42..4897aa72 --- 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'); @@@ -279,9 -278,11 +279,11 @@@ if ($aResult['recompute-word-counts']) if ($aResult['index']) { $oCmd = (clone $oIndexCmd) - ->addParams('--minrank', $aResult['index-rank']); + ->addParams('--minrank', $aResult['index-rank'], '-b'); + $oCmd->run(); - // echo $oCmd->escapedCmd()."\n"; + $oCmd = (clone $oIndexCmd) + ->addParams('--minrank', $aResult['index-rank']); $oCmd->run(); $oDB->exec('update import_status set indexed = true'); @@@ -422,9 -423,18 +424,18 @@@ if ($aResult['import-osmosis'] || $aRes // Index file if (!$aResult['no-index']) { - $oThisIndexCmd = clone($oIndexCmd); $fCMDStartTime = time(); + $oThisIndexCmd = clone($oIndexCmd); + $oThisIndexCmd->addParams('-b'); + echo $oThisIndexCmd->escapedCmd()."\n"; + $iErrorLevel = $oThisIndexCmd->run(); + if ($iErrorLevel) { + echo "Error: $iErrorLevel\n"; + exit($iErrorLevel); + } + + $oThisIndexCmd = clone($oIndexCmd); echo $oThisIndexCmd->escapedCmd()."\n"; $iErrorLevel = $oThisIndexCmd->run(); if ($iErrorLevel) {