mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
Make rank assignments configurable
The initial search and address rank is saved in a table that is set up from a json configuration file. Ranks may be assigned on a country level according to class and type of the object. Special handling that depends on the geometry or OSM type is still hard-coded in placex insert. The new default config file mimicks the current assignment as close as possible. A couple of exceptions have been removed, most notably the exception for Irish townlands.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Nominatim\Setup;
|
||||
|
||||
require_once(CONST_BasePath.'/lib/setup/AddressLevelParser.php');
|
||||
|
||||
class SetupFunctions
|
||||
{
|
||||
protected $iCacheMemory;
|
||||
@@ -272,6 +274,9 @@ class SetupFunctions
|
||||
if ($bReverseOnly) {
|
||||
$this->pgExec('DROP TABLE search_name');
|
||||
}
|
||||
|
||||
$oAlParser = new AddressLevelParser(CONST_Address_Level_Config);
|
||||
$oAlParser->createTable($this->oDB, 'address_levels');
|
||||
}
|
||||
|
||||
public function createPartitionTables()
|
||||
|
||||
Reference in New Issue
Block a user