]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
move postcode indexing to end of setup
[nominatim.git] / utils / setup.php
index a9597da898f09d7fa15f60063db3da8d0a9f9e53..94087323bf7e43da2e3c8e5d8d6f3d8cd2621ab3 100755 (executable)
@@ -523,10 +523,6 @@ if ($aCMDResult['calculate-postcodes'] || $aCMDResult['all']) {
 
         if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
     }
-
-    echo "Indexing postcodes....\n";
-    $sSQL = 'UPDATE location_postcode SET indexed_status = 0';
-    if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
 }
 
 if ($aCMDResult['osmosis-init']) {
@@ -543,6 +539,10 @@ if ($aCMDResult['index'] || $aCMDResult['all']) {
     passthruCheckReturn($sBaseCmd.' -r 5 -R 25');
     if (!$aCMDResult['index-noanalyse']) pgsqlRunScript('ANALYSE');
     passthruCheckReturn($sBaseCmd.' -r 26');
+
+    echo "Indexing postcodes....\n";
+    $sSQL = 'UPDATE location_postcode SET indexed_status = 0';
+    if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
 }
 
 if ($aCMDResult['create-search-indices'] || $aCMDResult['all']) {