X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8cd9550295a9414eefd3c242defc9262e426a736..ddc2b4b80692eef15c4fcfab8de5840d8f9e2130:/lib/setup/SetupClass.php diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index ba700a2c..f16c9e60 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -201,6 +201,8 @@ class SetupFunctions $oCmd->addParams('--output', 'gazetteer'); $oCmd->addParams('--hstore'); $oCmd->addParams('--number-processes', 1); + $oCmd->addParams('--with-forward-dependencies', 'false'); + $oCmd->addParams('--log-progress', 'true'); $oCmd->addParams('--cache', $this->iCacheMemory); $oCmd->addParams('--port', $this->aDSNInfo['port']); @@ -566,19 +568,27 @@ class SetupFunctions info('Index ranks 0 - 4'); $oCmd = (clone $oBaseCmd)->addParams('--maxrank', 4); echo $oCmd->escapedCmd(); - + $iStatus = $oCmd->run(); if ($iStatus != 0) { fail('error status ' . $iStatus . ' running nominatim!'); } if (!$bIndexNoanalyse) $this->pgsqlRunScript('ANALYSE'); + info('Index administrative boundaries'); + $oCmd = (clone $oBaseCmd)->addParams('-b'); + $iStatus = $oCmd->run(); + if ($iStatus != 0) { + fail('error status ' . $iStatus . ' running nominatim!'); + } + info('Index ranks 5 - 25'); $oCmd = (clone $oBaseCmd)->addParams('--minrank', 5, '--maxrank', 25); $iStatus = $oCmd->run(); if ($iStatus != 0) { fail('error status ' . $iStatus . ' running nominatim!'); } + if (!$bIndexNoanalyse) $this->pgsqlRunScript('ANALYSE'); info('Index ranks 26 - 30'); @@ -705,13 +715,8 @@ class SetupFunctions @define('CONST_BasePath', '".CONST_BasePath."'); if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS')); -@define('CONST_Database_DSN', '".CONST_Database_DSN."'); // or add ;host=...;port=...;user=...;password=... +@define('CONST_Database_DSN', '".CONST_Database_DSN."'); @define('CONST_Default_Language', ".(CONST_Default_Language ? ("'".CONST_Default_Language."'") : 'false')."); -@define('CONST_Default_Lat', ".CONST_Default_Lat."); -@define('CONST_Default_Lon', ".CONST_Default_Lon."); -@define('CONST_Default_Zoom', ".CONST_Default_Zoom."); -@define('CONST_Map_Tile_URL', '".CONST_Map_Tile_URL."'); -@define('CONST_Map_Tile_Attribution', '".CONST_Map_Tile_Attribution."'); // Set if tile source isn't osm.org @define('CONST_Log_DB', ".(CONST_Log_DB ? 'true' : 'false')."); @define('CONST_Log_File', ".(CONST_Log_File ? ("'".CONST_Log_File."'") : 'false')."); @define('CONST_Max_Word_Frequency', '".CONST_Max_Word_Frequency."'); @@ -725,8 +730,8 @@ if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SE @define('CONST_Term_Normalization_Rules', \"".CONST_Term_Normalization_Rules."\"); @define('CONST_Use_Aux_Location_data', ".(CONST_Use_Aux_Location_data ? 'true' : 'false')."); @define('CONST_Use_US_Tiger_Data', ".(CONST_Use_US_Tiger_Data ? 'true' : 'false')."); -@define('CONST_Website_BaseURL', '".CONST_Website_BaseURL."'); -"); +@define('CONST_MapIcon_URL', ".(CONST_MapIcon_URL ? ("'".CONST_MapIcon_URL."'") : 'false').'); +'); info(CONST_InstallPath.'/settings/settings-frontend.php has been set up successfully'); }