]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / utils / update.php
index 9e74b4babd8bdb6bf2ef36c5e7671cf42ce830c8..4897aa72f88b0619e53a1bd69063724e4764fd04 100644 (file)
@@ -47,6 +47,7 @@ $aCMDOptions
 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');
@@ -278,9 +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');
@@ -421,9 +424,18 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) {
 
         // 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) {