]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 6 Nov 2021 11:12:16 +0000 (12:12 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 6 Nov 2021 11:12:16 +0000 (12:12 +0100)
18 files changed:
.gitignore
CMakeLists.txt
ChangeLog
docs/admin/Migration.md
docs/develop/Database-Layout.md [new file with mode: 0644]
docs/develop/Import.md [deleted file]
docs/develop/Indexing.md [new file with mode: 0644]
docs/develop/address-tables.plantuml [new file with mode: 0644]
docs/develop/address-tables.svg [new file with mode: 0644]
docs/develop/osm2pgsql-tables.plantuml [new file with mode: 0644]
docs/develop/osm2pgsql-tables.svg [new file with mode: 0644]
docs/develop/parenting-flow.plantuml [new file with mode: 0644]
docs/develop/parenting-flow.svg [new file with mode: 0644]
docs/develop/search-tables.plantuml [new file with mode: 0644]
docs/develop/search-tables.svg [new file with mode: 0644]
docs/mkdocs.yml
lib-php/SearchDescription.php
nominatim/version.py

index 44b8eb32203dfeb897a8f4d3a1243c7a536b6ee1..b7e77f54c2b3b5442b43f42dfafa8ea60a2ebe45 100644 (file)
@@ -1,12 +1,9 @@
 *.log
 *.pyc
 
-build
-settings/local.php
+docs/develop/*.png
 
-data/wiki_import.sql
-data/wiki_specialphrases.sql
-data/osmosischange.osc
+build
 
 .vagrant
 data/country_osm_grid.sql.gz
index 052695c6eb3bbf491958c745d244b7c0db800fbe..8adc0be04ee949c44cf6ade64d628c46ff337f84 100644 (file)
@@ -18,8 +18,8 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
 project(nominatim)
 
-set(NOMINATIM_VERSION_MAJOR 3)
-set(NOMINATIM_VERSION_MINOR 7)
+set(NOMINATIM_VERSION_MAJOR 4)
+set(NOMINATIM_VERSION_MINOR 0)
 set(NOMINATIM_VERSION_PATCH 0)
 
 set(NOMINATIM_VERSION "${NOMINATIM_VERSION_MAJOR}.${NOMINATIM_VERSION_MINOR}.${NOMINATIM_VERSION_PATCH}")
index 4d66ee068423b83bb4c641fb2615de422918b3ef..b42ce7ee619e208542746fe36a7cffda779baa13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+4.0.0
+
+ * refactor name token computation and introduce ICU tokenizer
+   * name processing now happens in the indexer outside the DB
+   * reorganizes abbreviation handling and moves it to the indexing phases
+   * adds preprocessing of names
+ * add country-specific ranking for Spain, Slovakia
+ * partially switch to using SP-GIST indexes
+ * better updating of dependent addresses for name changes in streets
+ * remove unused/broken tables for external housenumbers
+ * move external postcodes to CSV format and no longer save them in tables
+   (adds support for postcodes for arbitrary countries)
+ * remove postcode helper entries from placex (thanks @AntoJvlt)
+ * change required format for TIGER data to CSV
+ * move configuration of default languages from wiki into config file
+ * expect customized configuration files in project directory by default
+ * disable search API for reverse-only import (thanks @darkshredder)
+ * port most of maintenance/import code to Python and remove PHP utils
+ * add catch-up mode for replication
+ * add updating of special phrases (thanks @AntoJvlt)
+ * add support for special phrases in CSV files (thanks @AntoJvlt)
+ * switch to case-independent matching between place and boundary names
+ * remove disabling of reverse query parsing
+ * minor tweaks to search algorithm to avoid more false positives
+ * major overhaul of the administrator and developer documentation
+ * add security disclosure policy
+ * add testing of installation scripts via CI
+ * drop support for Python < 3.6 and Postgresql < 9.5
+
+3.7.2
+
+ * fix database check for reverse-only imports
+ * do not error out in status API result when import date is missing
+ * add array_key_last function for PHP < 7.3 (thanks to @woodpeck)
+ * fix more url when server name is unknown (thanks to @mogita)
+ * commit changes to replication log table
+
+3.7.1
+
+ * fix smaller issues with special phrases import (thanks @AntoJvlt)
+ * add index to speed up continued indexing during import
+ * fix index on location_property_tiger(parent_place_id) (thanks @changpingc)
+ * make sure Python code is backward-compatible with Python 3.5
+ * various documentation fixes
+
 3.7.0
 
  * switch to dotenv for configuration file
@@ -20,7 +65,6 @@
  * add non-key indexes to speed up housenumber + street searches
  * switch housenumber field in placex to save transliterated names
 
-
 3.6.0
 
  * add full support for searching by and displaying of addr:* tags
index 8458e3d921409fdd1d8a8adbb68c1d120370348c..bc6499183c4b84e63efc2fc7d5778a9353777ee2 100644 (file)
@@ -15,7 +15,7 @@ breaking changes. **Please read them before running the migration.**
     If you are migrating from a version <3.6, then you still have to follow
     the manual migration steps up to 3.6.
 
-## 3.7.0 -> master
+## 3.7.0 -> 4.0.0
 
 ### NOMINATIM_PHRASE_CONFIG removed
 
@@ -29,6 +29,13 @@ the configuration in older versions. If you are updating from Nominatim < 3.7
 and still work with a custom `phrase-settings.php`, you need to manually
 convert it into a json format.
 
+### PHP utils removed
+
+The old PHP utils have now been removed completely. You need to switch to
+the appropriate functions of the nominatim  command line tool. See
+[Introducing `nominatim` command line tool](#introducing-nominatim-command-line-tool)
+below.
+
 ## 3.6.0 -> 3.7.0
 
 ### New format and name of configuration file
diff --git a/docs/develop/Database-Layout.md b/docs/develop/Database-Layout.md
new file mode 100644 (file)
index 0000000..fcd9c3b
--- /dev/null
@@ -0,0 +1,167 @@
+# Database Layout
+
+### Import tables
+
+OSM data is initially imported using [osm2pgsql](https://osm2pgsql.org).
+Nominatim uses its own data output style 'gazetteer', which differs from the
+output style created for map rendering.
+
+The import process creates the following tables:
+
+![osm2pgsql tables](osm2pgsql-tables.svg)
+
+The `planet_osm_*` tables are the usual backing tables for OSM data. Note
+that Nominatim uses them to look up special relations and to find nodes on
+ways.
+
+The gazetteer style produces a single table `place` as output with the following
+columns:
+
+ * `osm_type` - kind of OSM object (**N** - node, **W** - way, **R** - relation)
+ * `osm_id` - original OSM ID
+ * `class` - key of principal tag defining the object type
+ * `type` - value of principal tag defining the object type
+ * `name` - collection of tags that contain a name or reference
+ * `admin_level` - numerical value of the tagged administrative level
+ * `address` - collection of tags defining the address of an object
+ * `extratags` - collection of additional interesting tags that are not
+                 directly relevant for searching
+ * `geometry` - geometry of the object (in WGS84)
+
+A single OSM object may appear multiple times in this table when it is tagged
+with multiple tags that may constitute a principal tag. Take for example a
+motorway bridge. In OSM, this would be a way which is tagged with
+`highway=motorway` and `bridge=yes`. This way would appear in the `place` table
+once with `class` of `highway` and once with a `class` of `bridge`. Thus the
+*unique key* for `place` is (`osm_type`, `osm_id`, `class`).
+
+How raw OSM tags are mapped to the columns in the place table is to a certain
+degree configurable. See [Customizing Import Styles](../customize/Import-Styles.md)
+for more information.
+
+### Search tables
+
+The following tables carry all information needed to do the search:
+
+![search tables](search-tables.svg)
+
+The **placex** table is the central table that saves all information about the
+searchable places in Nominatim. The basic columns are the same as for the
+place table and have the same meaning. The placex tables adds the following
+additional columns:
+
+ * `place_id` - the internal unique ID to identify the place
+ * `partition` - the id to use with partitioned tables (see below)
+ * `geometry_sector` - a location hash used for geographically close ordering
+ * `parent_place_id` - the next higher place in the address hierarchy, only
+   relevant for POI-type places (with rank 30)
+ * `linked_place_id` - place ID of the place this object has been merged with.
+   When this ID is set, then the place is invisible for search.
+ * `importance` - measure how well known the place is
+ * `rank_search`, `rank_address` - search and address rank (see [Customizing ranking](../customize/Ranking.md)
+ * `wikipedia` - the wikipedia page used for computing the importance of the place
+ * `country_code` - the country the place is located in
+ * `housenumber` - normalized housenumber, if the place has one
+ * `postcode` - computed postcode for the place
+ * `indexed_status` - processing status of the place (0 - ready, 1 - freshly inserted, 2 - needs updating, 100 - needs deletion)
+ * `indexed_date` - timestamp when the place was processed last
+ * `centroid` - a point feature for the place
+
+The **location_property_osmline** table is a special table for
+[address interpolations](https://wiki.openstreetmap.org/wiki/Addresses#Using_interpolation).
+The columns have the same meaning and use as the columns with the same name in
+the placex table. Only three columns are special:
+
+ * `startnumber` and `endnumber` - beginning and end of the number range
+    for the interpolation
+ * `interpolationtype` - a string `odd`, `even` or `all` to indicate
+    the interval between the numbers
+
+Address interpolations are always ways in OSM, which is why there is no column
+`osm_type`.
+
+The **location_postcode** table holds computed centroids of all postcodes that
+can be found in the OSM data. The meaning of the columns is again the same
+as that of the placex table.
+
+Every place needs an address, a set of surrounding places that describe the
+location of the place. The set of address places is made up of OSM places
+themselves. The **place_addressline** table cross-references for each place
+all the places that make up its address. Two columns define the address
+relation:
+
+  * `place_id` - reference to the place being addressed
+  * `address_place_id` - reference to the place serving as an address part
+
+The most of the columns cache information from the placex entry of the address
+part. The exceptions are:
+
+  * `fromarea` - is true if the address part has an area geometry and can
+    therefore be considered preceise
+  * `isaddress` - is true if the address part should show up in the address
+    output. Sometimes there are multiple places competing for for same address
+    type (e.g. multiple cities) and this field resolves the tie.
+
+The **search_name** table contains the search index proper. It saves for each
+place the terms with which the place can be found. The terms are split into
+the name itself and all terms that make up the address. The table mirrors some
+of the columns from placex for faster lookup.
+
+Search terms are not saved as strings. Each term is assigned an integer and those
+integers are saved in the name and address vectors of the search_name table. The
+**word** table serves as the lookup table from string to such a word ID. The
+exact content of the word table depends on the [tokenizer](Tokenizers.md) used.
+
+## Address computation tables
+
+Next to the main search tables, there is a set of secondary helper tables used
+to compute the address relations between places. These tables are partitioned.
+Each country is assigned a partition number in the country_name table (see
+below) and the data is then split between a set of tables, one for each
+partition. Note that Nominatim still manually manages partitioned tables.
+Native support for partitions in PostgreSQL only became useable with version 13.
+It will be a little while before Nominatim drops support for older versions.
+
+![address tables](address-tables.svg)
+
+The **search_name_X** tables are used to look up streets that appear in the
+`addr:street` tag.
+
+The **location_area_large_X** tables are used to look up larger areas
+(administrative boundaries and place nodes) either through their geographic
+closeness or through `addr:*` entries.
+
+The **location_road_X** tables are used to find the closest street for a
+dependent place.
+
+All three table cache specific information from the placex table for their
+selected subset of places:
+
+ * `keywords` and `name_vector` contain lists of term ids (from the word table)
+   that the full name of the place should match against
+ * `isguess` is true for places that are not described by an area
+
+All other columns reflect their counterpart in the placex table.
+
+## Static data tables
+
+Nominatim also creates a number of static tables at import:
+
+ * `nominatim_properties` saves settings that must not be changed after
+    import
+ * `address_levels` save the rank information from the
+   [ranking configuration](../customize/Ranking.md)
+ * `country_name` contains a fallback of names for all countries, their
+   default languages and saves the assignment of countries to partitions.
+ * `country_osm_grid` provides a fallback for country geometries
+
+## Auxilary data tables
+
+Finally there are some table for auxillary data:
+
+ * `location_property_tiger` - saves housenumber from the Tiger import. Its
+   layout is similar to that of `location_propoerty_osmline`.
+ * `place_class_*` tables are helper tables to facilitate lookup of POIs
+   by their class and type. They exist because it is not possible to create
+   combined indexes with geometries.
+
diff --git a/docs/develop/Import.md b/docs/develop/Import.md
deleted file mode 100644 (file)
index 0f98daf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# OSM Data Import
-
-OSM data is initially imported using [osm2pgsql](https://osm2pgsql.org).
-Nominatim uses its own data output style 'gazetteer', which differs from the
-output style created for map rendering.
-
-## Database Layout
-
-The gazetteer style produces a single table `place` with the following rows:
-
- * `osm_type` - kind of OSM object (**N** - node, **W** - way, **R** - relation)
- * `osm_id` - original OSM ID
- * `class` - key of principal tag defining the object type
- * `type` - value of principal tag defining the object type
- * `name` - collection of tags that contain a name or reference
- * `admin_level` - numerical value of the tagged administrative level
- * `address` - collection of tags defining the address of an object
- * `extratags` - collection of additional interesting tags that are not
-                 directly relevant for searching
- * `geometry` - geometry of the object (in WGS84)
-
-A single OSM object may appear multiple times in this table when it is tagged
-with multiple tags that may constitute a principal tag. Take for example a
-motorway bridge. In OSM, this would be a way which is tagged with
-`highway=motorway` and `bridge=yes`. This way would appear in the `place` table
-once with `class` of `highway` and once with a `class` of `bridge`. Thus the
-*unique key* for `place` is (`osm_type`, `osm_id`, `class`).
diff --git a/docs/develop/Indexing.md b/docs/develop/Indexing.md
new file mode 100644 (file)
index 0000000..22959e2
--- /dev/null
@@ -0,0 +1,152 @@
+# Indexing Places
+
+In Nominatim, the word __indexing__ refers to the process that takes the raw
+OpenStreetMap data from the place table, enriches it with address information
+and creates the search indexes. This section explains the basic data flow.
+
+
+## Initial import
+
+After osm2pgsql has loaded the raw OSM data into the place table,
+the data is copied to the final search tables placex and location_property_osmline.
+While they are copied, some basic properties are added:
+
+ * country_code, geometry_sector and partition
+ * initial search and address rank
+
+In addition the column `indexed_status` is set to `1` marking the place as one
+that needs to be indexed.
+
+All this happens in the triggers `placex_insert` and `osmline_insert`.
+
+## Indexing
+
+The main work horse of the data import is the indexing step, where Nominatim
+takes every place from the placex and location_property_osmline tables where
+the indexed_status != 0 and computes the search terms and the address parts
+of the place.
+
+The indexing happens in three major steps:
+
+1. **Data preparation** - The indexer gets the data for the place to be indexed
+   from the database.
+
+2. **Search name processing** - The prepared data is given to the
+   tokenizer which computes the search terms from the names
+   and potentially other information.
+
+3. **Address processing** - The indexer then hands the prepared data and the
+   tokenizer information back to the database via an `INSERT` statement which
+   also sets the indexed_status to `0`. This triggers the update triggers
+   `placex_update`/`osmline_update` which do the work of computing address
+   parts and filling all the search tables.
+
+When computing the address terms of a place, Nominatim relies on the processed
+search names of all the address parts. That is why places are processed in rank
+order, from smallest rank to largest. To ensure correct handling of linked
+place nodes, administrative boundaries are processed before all other places.
+
+Apart from these restrictions, each place can be indexed independently
+from the others. This allows a large degree of parallelization during the indexing.
+It also means that the indexing process can be interrupted at any time and
+will simply pick up where it left of when restarted.
+
+### Data preparation
+
+The data preparation step computes and retrieves all data for a place that
+might be needed for the next step of processing the search name. That includes
+
+* location information (country code)
+* place classification (class, type, ranks)
+* names (including names of linked places)
+* address information (`addr:*` tags)
+
+Data preparation is implemented in pl/PgSQL mostly in the functions
+`placex_indexing_prepare()` and `get_interpolation_address()`.
+
+#### `addr:*` tag inheritance
+
+Nominatim has limited support for inheriting address tags from a building
+to POIs inside the building. This only works when the address tags are on the
+building outline. Any rank 30 object inside such a building or on its outline
+inherits all address tags when it does not have any address tags of its own.
+
+The inheritance is computed in the data preparation step.
+
+### Search name processing
+
+The prepared place information is handed to the tokenizer next. This is a
+Python module responsible for processing the names  from both name and address
+terms and building up the word index from them. The process is explained in
+more detail in the [Tokenizer chapter](Tokenizer.md).
+
+### Address processing
+
+Finally, the preprocessed place information and the results of the search name
+processing are written back to the database. At this point the update trigger
+of the placex/location_property_osmline tables take over and fill all the
+dependent tables. This makes up the most work-intensive part of the indexing.
+
+Nominatim distinguishes between dependent and independent places.
+**Dependent places** are all places on rank 30: house numbers, POIs etc. These
+places don't have a full address of their own. Instead they are attached to
+a parent street or place and use the information of the parent for searching
+and displaying information. Everything else are **independent places**: streets,
+parks, water bodies, suburbs, cities, states etc.  They receive a full address
+on their own.
+
+The address processing for both types of places is very different.
+
+#### Independent places
+
+To compute the address of an independent place Nominatim searches for all
+places that cover the place to compute the address for at least partially.
+For places with an area, that area is used to check for coverage. For place
+nodes an artificial square area is computed according to the rank of
+the place. The lower the rank the lager the area. The `location_area_large_X`
+tables are there to facilitate the lookup. All places that can function as
+the address of another place are saved in those tables.
+
+`addr:*` and `isin:*` tags are taken into account to compute the address, too.
+Nominatim will give preference to places with the same name as in these tags
+when looking for places in the vicinity. If there are no matching place names
+at all, then the tags are at least added to the search index. That means that
+the names will not be shown in the result as the 'address' of the place, but
+searching by them still works.
+
+Independent places are always added to the global search index `search_name`.
+
+#### Dependent places
+
+Dependent places skip the full address computation for performance reasons.
+Instead they just find a parent place to attach themselves to.
+
+![parenting of dependent places](parenting-flow.svg)
+
+By default a POI
+or house number will be attached to the closest street. That can be any major
+or minor street indexed by Nominatim. In the default configuration that means
+that it can attach itself to a footway but only when it has a name.
+
+When the dependent place has an `addr:street` tag, then Nominatim will first
+try to find a street with the same name before falling back to the closest
+street.
+
+There are also addresses in OSM, where the housenumber does not belong
+to a street at all. These have an `addr:place` tag. For these places, Nominatim
+tries to find a place with the given name in the indexed places with an
+address rank between 16 and 25. If none is found, then the dependent place
+is attached to the closest place in that category and the addr:place name is
+added as *unlisted* place, which indicates to Nominatim that it needs to add
+it to the address output, no matter what. This special case is necessary to
+cover addresses that don't really refer to an existing object.
+
+When an address has both the `addr:street` and `addr:place` tag, then Nominatim
+assumes that the `addr:place` tag in fact should be the city part of the address
+and give the POI the usual street number address.
+
+Dependent places are only added to the global search index `search_name` when
+they have either a name themselves or when they have address tags that are not
+covered by the places that make up their address. The latter ensures that
+addresses are always searchable by those address tags.
+
diff --git a/docs/develop/address-tables.plantuml b/docs/develop/address-tables.plantuml
new file mode 100644 (file)
index 0000000..a161697
--- /dev/null
@@ -0,0 +1,35 @@
+@startuml
+skinparam monochrome true
+skinparam ObjectFontStyle bold
+
+map search_name_X {
+  place_id => BIGINT
+  address_rank => SMALLINT
+  name_vector => INT[]
+  centroid => GEOMETRY
+}
+
+map location_area_large_X {
+  place_id => BIGINT
+  keywords => INT[]
+  partition => SMALLINT
+  rank_search => SMALLINT
+  rank_address => SMALLINT
+  country_code => VARCHR(2)
+  isguess => BOOLEAN
+  postcode => TEXT
+  centroid => POINT
+  geometry => GEOMETRY
+}
+
+map location_road_X {
+  place_id => BIGINT
+  partition => SMALLINT
+  country_code => VARCHR(2)
+  geometry => GEOMETRY
+}
+
+search_name_X -[hidden]> location_area_large_X
+location_area_large_X -[hidden]> location_road_X
+
+@enduml
diff --git a/docs/develop/address-tables.svg b/docs/develop/address-tables.svg
new file mode 100644 (file)
index 0000000..edf85b3
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="195px" preserveAspectRatio="none" style="width:576px;height:195px;background:#FFFFFF;" version="1.1" viewBox="0 0 576 195" width="576px" zoomAndPan="magnify"><defs><filter height="300%" id="f16zzqerbmrtlv" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#F8F8F8" filter="url(#f16zzqerbmrtlv)" height="80.5313" style="stroke:#383838;stroke-width:1.5;" width="142" x="7" y="52"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="108" x="24" y="65.1387">search_name_X</text><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="149" y1="69.9688" y2="69.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="25" y="81.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="86" y="81.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="81" x2="81" y1="69.9688" y2="85.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="149" y1="85.6094" y2="85.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="12" y="96.8916">address_rank</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="86" y="96.8916">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="81" x2="81" y1="85.6094" y2="101.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="149" y1="101.25" y2="101.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="12" y="112.5322">name_vector</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="24" x="86" y="112.5322">INT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="81" x2="81" y1="101.25" y2="116.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="149" y1="116.8906" y2="116.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="39" x="24.5" y="128.1729">centroid</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="86" y="128.1729">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="81" x2="81" y1="116.8906" y2="132.5313"/><rect fill="#F8F8F8" filter="url(#f16zzqerbmrtlv)" height="174.375" style="stroke:#383838;stroke-width:1.5;" width="168" x="200" y="7"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="154" x="207" y="20.1387">location_area_large_X</text><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="24.9688" y2="24.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="218.5" y="36.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="280" y="36.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="24.9688" y2="40.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="40.6094" y2="40.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="46" x="214.5" y="51.8916">keywords</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="24" x="280" y="51.8916">INT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="40.6094" y2="56.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="56.25" y2="56.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="40" x="217.5" y="67.5322">partition</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="280" y="67.5322">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="56.25" y2="71.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="71.8906" y2="71.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="208.5" y="83.1729">rank_search</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="280" y="83.1729">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="71.8906" y2="87.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="87.5313" y2="87.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="205.5" y="98.8135">rank_address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="280" y="98.8135">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="87.5313" y2="103.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="103.1719" y2="103.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="205" y="114.4541">country_code</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="280" y="114.4541">VARCHR(2)</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="103.1719" y2="118.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="118.8125" y2="118.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="35" x="220" y="130.0947">isguess</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="280" y="130.0947">BOOLEAN</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="118.8125" y2="134.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="134.4531" y2="134.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="215.5" y="145.7354">postcode</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="280" y="145.7354">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="134.4531" y2="150.0938"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="150.0938" y2="150.0938"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="39" x="218" y="161.376">centroid</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="280" y="161.376">POINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="150.0938" y2="165.7344"/><line style="stroke:#383838;stroke-width:1.0;" x1="200" x2="368" y1="165.7344" y2="165.7344"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="213.5" y="177.0166">geometry</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="280" y="177.0166">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="275" x2="275" y1="165.7344" y2="181.375"/><rect fill="#F8F8F8" filter="url(#f16zzqerbmrtlv)" height="80.5313" style="stroke:#383838;stroke-width:1.5;" width="143" x="419.5" y="52"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="111" x="435.5" y="65.1387">location_road_X</text><line style="stroke:#383838;stroke-width:1.0;" x1="419.5" x2="562.5" y1="69.9688" y2="69.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="438" y="81.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="499.5" y="81.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="494.5" x2="494.5" y1="69.9688" y2="85.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="419.5" x2="562.5" y1="85.6094" y2="85.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="40" x="437" y="96.8916">partition</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="499.5" y="96.8916">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="494.5" x2="494.5" y1="85.6094" y2="101.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="419.5" x2="562.5" y1="101.25" y2="101.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="424.5" y="112.5322">country_code</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="499.5" y="112.5322">VARCHR(2)</text><line style="stroke:#383838;stroke-width:1.0;" x1="494.5" x2="494.5" y1="101.25" y2="116.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="419.5" x2="562.5" y1="116.8906" y2="116.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="433" y="128.1729">geometry</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="499.5" y="128.1729">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="494.5" x2="494.5" y1="116.8906" y2="132.5313"/><!--MD5=[55995f5becd151159bf068365903d962]
+link search_name_X to location_area_large_X--><!--MD5=[fbe2ed848b29583363aa66cb2fc47582]
+link location_area_large_X to location_road_X--><!--MD5=[5b9f41070922970c85399fb1a55d3e53]
+@startuml\r
+skinparam monochrome true\r
+skinparam ObjectFontStyle bold\r
+\r
+map search_name_X {\r
+  place_id => BIGINT\r
+  address_rank => SMALLINT\r
+  name_vector => INT[]\r
+  centroid => GEOMETRY\r
+}\r
+\r
+map location_area_large_X {\r
+  place_id => BIGINT\r
+  keywords => INT[]\r
+  partition => SMALLINT\r
+  rank_search => SMALLINT\r
+  rank_address => SMALLINT\r
+  country_code => VARCHR(2)\r
+  isguess => BOOLEAN\r
+  postcode => TEXT\r
+  centroid => POINT\r
+  geometry => GEOMETRY\r
+}\r
+\r
+map location_road_X {\r
+  place_id => BIGINT\r
+  partition => SMALLINT\r
+  country_code => VARCHR(2)\r
+  geometry => GEOMETRY\r
+}\r
+\r
+search_name_X -[hidden]> location_area_large_X\r
+location_area_large_X -[hidden]> location_road_X\r
+\r
+@enduml\r
+
+PlantUML version 1.2021.12(Tue Oct 05 18:01:58 CEST 2021)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg>
\ No newline at end of file
diff --git a/docs/develop/osm2pgsql-tables.plantuml b/docs/develop/osm2pgsql-tables.plantuml
new file mode 100644 (file)
index 0000000..89c3c97
--- /dev/null
@@ -0,0 +1,44 @@
+@startuml
+skinparam monochrome true
+skinparam ObjectFontStyle bold
+
+map planet_osm_nodes #eee {
+  id => BIGINT
+  lat => INT
+  lon => INT
+}
+
+map planet_osm_ways #eee {
+  id => BIGINT
+  nodes => BIGINT[]
+  tags => TEXT[]
+}
+
+map planet_osm_rels #eee {
+  id => BIGINT
+  parts => BIGINT[]
+  members => TEXT[]
+  tags => TEXT[]
+  way_off => SMALLINT
+  rel_off => SMALLINT
+}
+
+map place {
+  osm_type => CHAR(1)
+  osm_id => BIGINT
+  class => TEXT
+  type => TEXT
+  name => HSTORE
+  address => HSTORE
+  extratags => HSTORE
+  admin_level => SMALLINT
+  geometry => GEOMETRY
+}
+
+planet_osm_nodes  -[hidden]> planet_osm_ways
+planet_osm_ways  -[hidden]> planet_osm_rels
+planet_osm_ways -[hidden]-> place
+
+planet_osm_nodes::id <- planet_osm_ways::nodes
+
+@enduml
diff --git a/docs/develop/osm2pgsql-tables.svg b/docs/develop/osm2pgsql-tables.svg
new file mode 100644 (file)
index 0000000..959380d
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="354px" preserveAspectRatio="none" style="width:534px;height:354px;background:#FFFFFF;" version="1.1" viewBox="0 0 534 354" width="534px" zoomAndPan="magnify"><defs><filter height="300%" id="fofrw86h3kqrc" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#EEEEEE" filter="url(#fofrw86h3kqrc)" height="64.8906" style="stroke:#383838;stroke-width:1.5;" width="145" x="7" y="29.5"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="131" x="14" y="42.6387">planet_osm_nodes</text><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="152" y1="47.4688" y2="47.4688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="8" x="15" y="58.751">id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="36" y="58.751">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="31" x2="31" y1="47.4688" y2="63.1094"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="152" y1="63.1094" y2="63.1094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="12" x="13" y="74.3916">lat</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="36" y="74.3916">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="31" x2="31" y1="63.1094" y2="78.75"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="152" y1="78.75" y2="78.75"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="14" x="12" y="90.0322">lon</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="36" y="90.0322">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="31" x2="31" y1="78.75" y2="94.3906"/><rect fill="#EEEEEE" filter="url(#fofrw86h3kqrc)" height="64.8906" style="stroke:#383838;stroke-width:1.5;" width="138" x="203.5" y="29.5"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="124" x="210.5" y="42.6387">planet_osm_ways</text><line style="stroke:#383838;stroke-width:1.0;" x1="203.5" x2="341.5" y1="47.4688" y2="47.4688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="8" x="219" y="58.751">id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="247.5" y="58.751">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="242.5" x2="242.5" y1="47.4688" y2="63.1094"/><line style="stroke:#383838;stroke-width:1.0;" x1="203.5" x2="341.5" y1="63.1094" y2="63.1094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="29" x="208.5" y="74.3916">nodes</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="247.5" y="74.3916">BIGINT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="242.5" x2="242.5" y1="63.1094" y2="78.75"/><line style="stroke:#383838;stroke-width:1.0;" x1="203.5" x2="341.5" y1="78.75" y2="78.75"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="21" x="212.5" y="90.0322">tags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="247.5" y="90.0322">TEXT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="242.5" x2="242.5" y1="78.75" y2="94.3906"/><rect fill="#EEEEEE" filter="url(#fofrw86h3kqrc)" height="111.8125" style="stroke:#383838;stroke-width:1.5;" width="128" x="392.5" y="7"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="114" x="399.5" y="20.1387">planet_osm_rels</text><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="24.9688" y2="24.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="8" x="417" y="36.251">id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="454.5" y="36.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="24.9688" y2="40.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="40.6094" y2="40.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="25" x="408.5" y="51.8916">parts</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="454.5" y="51.8916">BIGINT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="40.6094" y2="56.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="56.25" y2="56.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="47" x="397.5" y="67.5322">members</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="454.5" y="67.5322">TEXT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="56.25" y2="71.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="71.8906" y2="71.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="21" x="410.5" y="83.1729">tags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="454.5" y="83.1729">TEXT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="71.8906" y2="87.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="87.5313" y2="87.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="39" x="401.5" y="98.8135">way_off</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="454.5" y="98.8135">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="87.5313" y2="103.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="103.1719" y2="103.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="405.5" y="114.4541">rel_off</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="454.5" y="114.4541">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="103.1719" y2="118.8125"/><rect fill="#F8F8F8" filter="url(#fofrw86h3kqrc)" height="158.7344" style="stroke:#383838;stroke-width:1.5;" width="135" x="205" y="182"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="38" x="253.5" y="195.1387">place</text><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="199.9688" y2="199.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="214.5" y="211.251">osm_type</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="277" y="211.251">CHAR(1)</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="199.9688" y2="215.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="215.6094" y2="215.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="221.5" y="226.8916">osm_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="277" y="226.8916">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="215.6094" y2="231.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="231.25" y2="231.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="227" y="242.5322">class</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="277" y="242.5322">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="231.25" y2="246.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="246.8906" y2="246.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="22" x="227.5" y="258.1729">type</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="277" y="258.1729">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="246.8906" y2="262.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="262.5313" y2="262.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="28" x="224.5" y="273.8135">name</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="277" y="273.8135">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="262.5313" y2="278.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="278.1719" y2="278.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="219.5" y="289.4541">address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="277" y="289.4541">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="278.1719" y2="293.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="293.8125" y2="293.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="47" x="215" y="305.0947">extratags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="277" y="305.0947">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="293.8125" y2="309.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="309.4531" y2="309.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="57" x="210" y="320.7354">admin_level</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="277" y="320.7354">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="309.4531" y2="325.0938"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="325.0938" y2="325.0938"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="214.5" y="336.376">geometry</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="277" y="336.376">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="325.0938" y2="340.7344"/><!--MD5=[cfd242390168b76ecd29e738a0804d67]
+link planet_osm_nodes to planet_osm_ways--><!--MD5=[fa5350d6785809323ef22057335ae1c7]
+reverse link planet_osm_nodes to planet_osm_ways--><path codeLine="41" d="M153.5,53.5 C176.41,53.5 179.59,69.5 202.5,69.5 " fill="none" id="planet_osm_nodes-backto-planet_osm_ways" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="153.5,53.5,162.5,57.5,158.5,53.5,162.5,49.5,153.5,53.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[fb2ee53a59aef357360ab5aad89040fd]
+link planet_osm_ways to planet_osm_rels--><!--MD5=[09a44a38c707cfce4bf3674282185755]
+link planet_osm_ways to place--><!--MD5=[ab53e24c49396b9d4317735d0a875517]
+@startuml\r
+skinparam monochrome true\r
+skinparam ObjectFontStyle bold\r
+\r
+map planet_osm_nodes #eee {\r
+  id => BIGINT\r
+  lat => INT\r
+  lon => INT\r
+}\r
+\r
+map planet_osm_ways #eee {\r
+  id => BIGINT\r
+  nodes => BIGINT[]\r
+  tags => TEXT[]\r
+}\r
+\r
+map planet_osm_rels #eee {\r
+  id => BIGINT\r
+  parts => BIGINT[]\r
+  members => TEXT[]\r
+  tags => TEXT[]\r
+  way_off => SMALLINT\r
+  rel_off => SMALLINT\r
+}\r
+\r
+map place {\r
+  osm_type => CHAR(1)\r
+  osm_id => BIGINT\r
+  class => TEXT\r
+  type => TEXT\r
+  name => HSTORE\r
+  address => HSTORE\r
+  extratags => HSTORE\r
+  admin_level => SMALLINT\r
+  geometry => GEOMETRY\r
+}\r
+\r
+planet_osm_nodes  -[hidden]> planet_osm_ways\r
+planet_osm_ways  -[hidden]> planet_osm_rels\r
+planet_osm_ways -[hidden]-> place\r
+\r
+planet_osm_nodes::id <- planet_osm_ways::nodes\r
+\r
+@enduml\r
+
+PlantUML version 1.2021.12(Tue Oct 05 18:01:58 CEST 2021)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg>
\ No newline at end of file
diff --git a/docs/develop/parenting-flow.plantuml b/docs/develop/parenting-flow.plantuml
new file mode 100644 (file)
index 0000000..ade927c
--- /dev/null
@@ -0,0 +1,31 @@
+@startuml
+skinparam monochrome true
+
+start
+
+if (has 'addr:street'?) then (yes)
+  if (street with that name\n nearby?) then (yes)
+    :**Use closest street**
+     **with same name**;
+     kill
+  else (no)
+    :** Use closest**\n**street**;
+     kill
+  endif
+elseif (has 'addr:place'?) then (yes)
+  if (place with that name\n nearby?) then (yes)
+    :**Use closest place**
+     **with same name**;
+     kill
+  else (no)
+    :add addr:place to adress;
+    :**Use closest place**\n**rank 16 to 25**;
+     kill
+  endif
+else (otherwise)
+ :**Use closest**\n**street**;
+ kill
+endif
+
+
+@enduml
diff --git a/docs/develop/parenting-flow.svg b/docs/develop/parenting-flow.svg
new file mode 100644 (file)
index 0000000..7e8271a
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="275px" preserveAspectRatio="none" style="width:785px;height:275px;background:#FFFFFF;" version="1.1" viewBox="0 0 785 275" width="785px" zoomAndPan="magnify"><defs><filter height="300%" id="f1b513ppngo123" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="379.5" cy="20" fill="#000000" filter="url(#f1b513ppngo123)" rx="10" ry="10" style="stroke:none;stroke-width:1.0;"/><polygon fill="#F8F8F8" filter="url(#f1b513ppngo123)" points="118,50,218,50,230,62,218,74,118,74,106,62,118,50" style="stroke:#383838;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="20" x="172" y="84.2104">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="100" x="118" y="65.8081">has 'addr:street'?</text><polygon fill="#F8F8F8" filter="url(#f1b513ppngo123)" points="108,105.7104,228,105.7104,240,118.5151,228,131.3198,108,131.3198,96,118.5151,108,105.7104" style="stroke:#383838;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="120" x="108" y="115.9209">street with that name</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="45" x="111" y="128.7256">nearby?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="20" x="76" y="115.9209">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="14" x="240" y="115.9209">no</text><rect fill="#F8F8F8" filter="url(#f1b513ppngo123)" height="47.9375" rx="12.5" ry="12.5" style="stroke:#383838;stroke-width:1.5;" width="150" x="11" y="141.3198"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="130" x="21" y="162.4585">Use closest street</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="0" x="25" y="176.4272"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="116" x="25" y="176.4272">with same name</text><rect fill="#F8F8F8" filter="url(#f1b513ppngo123)" height="47.9375" rx="12.5" ry="12.5" style="stroke:#383838;stroke-width:1.5;" width="106" x="197" y="141.3198"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="82" x="211" y="162.4585">Use closest</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="44" x="207" y="176.4272">street</text><polygon fill="#F8F8F8" filter="url(#f1b513ppngo123)" points="427.75,50,523.75,50,535.75,62,523.75,74,427.75,74,415.75,62,427.75,50" style="stroke:#383838;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="20" x="479.75" y="84.2104">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="96" x="427.75" y="65.8081">has 'addr:place'?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="56" x="535.75" y="59.4058">otherwise</text><polygon fill="#F8F8F8" filter="url(#f1b513ppngo123)" points="417.75,105.7104,533.75,105.7104,545.75,118.5151,533.75,131.3198,417.75,131.3198,405.75,118.5151,417.75,105.7104" style="stroke:#383838;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="116" x="417.75" y="115.9209">place with that name</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="45" x="420.75" y="128.7256">nearby?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="20" x="385.75" y="115.9209">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="14" x="545.75" y="115.9209">no</text><rect fill="#F8F8F8" filter="url(#f1b513ppngo123)" height="47.9375" rx="12.5" ry="12.5" style="stroke:#383838;stroke-width:1.5;" width="144" x="313" y="141.3198"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="124" x="323" y="162.4585">Use closest place</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="0" x="327" y="176.4272"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="116" x="327" y="176.4272">with same name</text><rect fill="#F8F8F8" filter="url(#f1b513ppngo123)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#383838;stroke-width:1.5;" width="179" x="477" y="141.3198"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="159" x="487" y="162.4585">add addr:place to adress</text><rect fill="#F8F8F8" filter="url(#f1b513ppngo123)" height="47.9375" rx="12.5" ry="12.5" style="stroke:#383838;stroke-width:1.5;" width="144" x="494.5" y="210.2886"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="124" x="504.5" y="231.4272">Use closest place</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="91" x="504.5" y="245.396">rank 16 to 25</text><rect fill="#F8F8F8" filter="url(#f1b513ppngo123)" height="47.9375" rx="12.5" ry="12.5" style="stroke:#383838;stroke-width:1.5;" width="102" x="666" y="157.5972"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="82" x="676" y="178.7358">Use closest</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="44" x="676" y="192.7046">street</text><line style="stroke:#383838;stroke-width:1.5;" x1="96" x2="86" y1="118.5151" y2="118.5151"/><line style="stroke:#383838;stroke-width:1.5;" x1="86" x2="86" y1="118.5151" y2="141.3198"/><polygon fill="#383838" points="82,131.3198,86,141.3198,90,131.3198,86,135.3198" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="240" x2="250" y1="118.5151" y2="118.5151"/><line style="stroke:#383838;stroke-width:1.5;" x1="250" x2="250" y1="118.5151" y2="141.3198"/><polygon fill="#383838" points="246,131.3198,250,141.3198,254,131.3198,250,135.3198" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="566.5" x2="566.5" y1="175.2886" y2="210.2886"/><polygon fill="#383838" points="562.5,200.2886,566.5,210.2886,570.5,200.2886,566.5,204.2886" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="405.75" x2="385" y1="118.5151" y2="118.5151"/><line style="stroke:#383838;stroke-width:1.5;" x1="385" x2="385" y1="118.5151" y2="141.3198"/><polygon fill="#383838" points="381,131.3198,385,141.3198,389,131.3198,385,135.3198" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="545.75" x2="566.5" y1="118.5151" y2="118.5151"/><line style="stroke:#383838;stroke-width:1.5;" x1="566.5" x2="566.5" y1="118.5151" y2="141.3198"/><polygon fill="#383838" points="562.5,131.3198,566.5,141.3198,570.5,131.3198,566.5,135.3198" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="168" x2="168" y1="74" y2="105.7104"/><polygon fill="#383838" points="164,95.7104,168,105.7104,172,95.7104,168,99.7104" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="475.75" x2="475.75" y1="74" y2="105.7104"/><polygon fill="#383838" points="471.75,95.7104,475.75,105.7104,479.75,95.7104,475.75,99.7104" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="230" x2="415.75" y1="62" y2="62"/><polygon fill="#383838" points="405.75,58,415.75,62,405.75,66,409.75,62" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="379.5" x2="379.5" y1="30" y2="35"/><line style="stroke:#383838;stroke-width:1.5;" x1="379.5" x2="168" y1="35" y2="35"/><line style="stroke:#383838;stroke-width:1.5;" x1="168" x2="168" y1="35" y2="50"/><polygon fill="#383838" points="164,40,168,50,172,40,168,44" style="stroke:#383838;stroke-width:1.0;"/><line style="stroke:#383838;stroke-width:1.5;" x1="535.75" x2="717" y1="62" y2="62"/><line style="stroke:#383838;stroke-width:1.5;" x1="717" x2="717" y1="62" y2="157.5972"/><polygon fill="#383838" points="713,147.5972,717,157.5972,721,147.5972,717,151.5972" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[e03d31a5684b671bb715075c57004ccb]
+@startuml\r
+skinparam monochrome true\r
+\r
+start\r
+\r
+if (has 'addr:street'?) then (yes)\r
+  if (street with that name\n nearby?) then (yes)\r
+    :**Use closest street**\r
+     **with same name**;\r
+     kill\r
+  else (no)\r
+    :** Use closest**\n**street**;\r
+     kill\r
+  endif\r
+elseif (has 'addr:place'?) then (yes)\r
+  if (place with that name\n nearby?) then (yes)\r
+    :**Use closest place**\r
+     **with same name**;\r
+     kill\r
+  else (no)\r
+    :add addr:place to adress;\r
+    :**Use closest place**\n**rank 16 to 25**;\r
+     kill\r
+  endif\r
+else (otherwise)\r
+ :**Use closest**\n**street**;\r
+ kill\r
+endif\r
+\r
+\r
+@enduml\r
+
+PlantUML version 1.2021.12(Tue Oct 05 18:01:58 CEST 2021)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg>
\ No newline at end of file
diff --git a/docs/develop/search-tables.plantuml b/docs/develop/search-tables.plantuml
new file mode 100644 (file)
index 0000000..4b8121c
--- /dev/null
@@ -0,0 +1,99 @@
+@startuml
+skinparam monochrome true
+skinparam ObjectFontStyle bold
+
+left to right direction
+
+map placex {
+  place_id => BIGINT
+  osm_type => CHAR(1)
+  osm_id => BIGINT
+  class => TEXT
+  type => TEXT
+  name => HSTORE
+  address => HSTORE
+  extratags => HSTORE
+  admin_level => SMALLINT
+  partition => SMALLINT
+  geometry_sector => INT
+  parent_place_id => BIGINT
+  linked_place_id => BIGINT
+  importance => DOUBLE
+  rank_search => SMALLINT
+  rank_address => SMALLINT
+  wikipedia => TEXT
+  country_code => VARCHAR(2)
+  housenumber => TEXT
+  postcode => TEXT
+  indexed_status => SMALLINT
+  indexed_date => TIMESTAMP
+  centroid => GEOMETRY
+  geometry => GEOMETRY
+}
+
+map search_name {
+  place_id => BIGINT
+  importance => DOUBLE
+  search_rank => SMALLINT
+  address_rank => SMALLINT
+  name_vector => INT[]
+  nameaddress_vector => INT[]
+  country_code => VARCHAR(2)
+  centroid => GEOMETRY
+}
+
+map word {
+  word_id => INT
+  word_token => TEXT
+  ... =>
+}
+
+map location_property_osmline {
+  place_id => BIGINT
+  osm_id => BIGINT
+  startnumber => INT
+  endnumber => INT
+  interpolationtype => TEXT
+  address => HSTORE
+  partition => SMALLINT
+  geometry_sector => INT
+  parent_place_id => BIGINT
+  country_code => VARCHAR(2)
+  postcode => text
+  indexed_status => SMALLINT
+  indexed_date => TIMESTAMP
+  linegeo => GEOMETRY
+}
+
+map place_addressline {
+  place_id => BIGINT
+  address_place_id => BIGINT
+  distance => DOUBLE
+  cached_rank_address => SMALLINT
+  fromarea => BOOLEAN
+  isaddress => BOOLEAN
+}
+
+map location_postcode {
+  place_id => BIGINT
+  postcode => TEXT
+  parent_place_id => BIGINT
+  rank_search => SMALLINT
+  rank_address => SMALLINT
+  indexed_status => SMALLINT
+  indexed_date => TIMESTAMP
+  geometry => GEOMETRY
+}
+
+placex::place_id <-- search_name::place_id
+placex::place_id <-- place_addressline::place_id
+placex::place_id <-- place_addressline::address_place_id
+
+search_name::name_vector --> word::word_id
+search_name::nameaddress_vector --> word::word_id
+
+place_addressline -[hidden]> location_property_osmline
+search_name -[hidden]> place_addressline
+location_property_osmline -[hidden]-> location_postcode
+
+@enduml
diff --git a/docs/develop/search-tables.svg b/docs/develop/search-tables.svg
new file mode 100644 (file)
index 0000000..7e1610d
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="594px" preserveAspectRatio="none" style="width:695px;height:594px;background:#FFFFFF;" version="1.1" viewBox="0 0 695 594" width="695px" zoomAndPan="magnify"><defs><filter height="300%" id="f1abmn4sk1koxw" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#F8F8F8" filter="url(#f1abmn4sk1koxw)" height="393.3438" style="stroke:#383838;stroke-width:1.5;" width="168" x="7" y="187"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="45" x="68.5" y="200.1387">placex</text><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="204.9688" y2="204.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="34.5" y="216.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="105" y="216.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="204.9688" y2="220.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="220.6094" y2="220.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="29.5" y="231.8916">osm_type</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="105" y="231.8916">CHAR(1)</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="220.6094" y2="236.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="236.25" y2="236.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="36.5" y="247.5322">osm_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="105" y="247.5322">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="236.25" y2="251.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="251.8906" y2="251.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="42" y="263.1729">class</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="105" y="263.1729">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="251.8906" y2="267.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="267.5313" y2="267.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="22" x="42.5" y="278.8135">type</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="105" y="278.8135">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="267.5313" y2="283.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="283.1719" y2="283.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="28" x="39.5" y="294.4541">name</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="105" y="294.4541">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="283.1719" y2="298.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="298.8125" y2="298.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="34.5" y="310.0947">address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="105" y="310.0947">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="298.8125" y2="314.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="314.4531" y2="314.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="47" x="30" y="325.7354">extratags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="105" y="325.7354">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="314.4531" y2="330.0938"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="330.0938" y2="330.0938"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="57" x="25" y="341.376">admin_level</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="105" y="341.376">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="330.0938" y2="345.7344"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="345.7344" y2="345.7344"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="40" x="33.5" y="357.0166">partition</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="105" y="357.0166">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="345.7344" y2="361.375"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="361.375" y2="361.375"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="83" x="12" y="372.6572">geometry_sector</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="105" y="372.6572">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="361.375" y2="377.0156"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="377.0156" y2="377.0156"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="75" x="16" y="388.2979">parent_place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="105" y="388.2979">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="377.0156" y2="392.6563"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="392.6563" y2="392.6563"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="70" x="18.5" y="403.9385">linked_place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="105" y="403.9385">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="392.6563" y2="408.2969"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="408.2969" y2="408.2969"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="55" x="26" y="419.5791">importance</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="105" y="419.5791">DOUBLE</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="408.2969" y2="423.9375"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="423.9375" y2="423.9375"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="24.5" y="435.2197">rank_search</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="105" y="435.2197">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="423.9375" y2="439.5781"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="439.5781" y2="439.5781"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="21.5" y="450.8604">rank_address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="105" y="450.8604">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="439.5781" y2="455.2188"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="455.2188" y2="455.2188"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="43" x="32" y="466.501">wikipedia</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="105" y="466.501">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="455.2188" y2="470.8594"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="470.8594" y2="470.8594"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="21" y="482.1416">country_code</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="105" y="482.1416">VARCHAR(2)</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="470.8594" y2="486.5"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="486.5" y2="486.5"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="67" x="20" y="497.7822">housenumber</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="105" y="497.7822">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="486.5" y2="502.1406"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="502.1406" y2="502.1406"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="31.5" y="513.4229">postcode</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="105" y="513.4229">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="502.1406" y2="517.7813"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="517.7813" y2="517.7813"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="73" x="17" y="529.0635">indexed_status</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="105" y="529.0635">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="517.7813" y2="533.4219"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="533.4219" y2="533.4219"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="21" y="544.7041">indexed_date</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="59" x="105" y="544.7041">TIMESTAMP</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="533.4219" y2="549.0625"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="549.0625" y2="549.0625"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="39" x="34" y="560.3447">centroid</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="105" y="560.3447">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="549.0625" y2="564.7031"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="175" y1="564.7031" y2="564.7031"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="29.5" y="575.9854">geometry</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="105" y="575.9854">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="100" x2="100" y1="564.7031" y2="580.3438"/><rect fill="#F8F8F8" filter="url(#f1abmn4sk1koxw)" height="143.0938" style="stroke:#383838;stroke-width:1.5;" width="187" x="257.5" y="7"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="93" x="304.5" y="20.1387">search_name</text><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="24.9688" y2="24.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="294.5" y="36.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="374.5" y="36.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="24.9688" y2="40.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="40.6094" y2="40.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="55" x="286" y="51.8916">importance</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="374.5" y="51.8916">DOUBLE</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="40.6094" y2="56.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="56.25" y2="56.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="284.5" y="67.5322">search_rank</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="374.5" y="67.5322">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="56.25" y2="71.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="71.8906" y2="71.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="281.5" y="83.1729">address_rank</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="374.5" y="83.1729">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="71.8906" y2="87.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="87.5313" y2="87.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="281.5" y="98.8135">name_vector</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="24" x="374.5" y="98.8135">INT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="87.5313" y2="103.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="103.1719" y2="103.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="102" x="262.5" y="114.4541">nameaddress_vector</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="24" x="374.5" y="114.4541">INT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="103.1719" y2="118.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="118.8125" y2="118.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="281" y="130.0947">country_code</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="374.5" y="130.0947">VARCHAR(2)</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="118.8125" y2="134.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="257.5" x2="444.5" y1="134.4531" y2="134.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="39" x="294" y="145.7354">centroid</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="374.5" y="145.7354">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="369.5" x2="369.5" y1="134.4531" y2="150.0938"/><rect fill="#F8F8F8" filter="url(#f1abmn4sk1koxw)" height="64.8906" style="stroke:#383838;stroke-width:1.5;" width="99" x="554.5" y="76.5"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="36" x="586" y="89.6387">word</text><line style="stroke:#383838;stroke-width:1.0;" x1="554.5" x2="653.5" y1="94.4688" y2="94.4688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="37" x="569" y="105.751">word_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="625.5" y="105.751">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="620.5" x2="620.5" y1="94.4688" y2="110.1094"/><line style="stroke:#383838;stroke-width:1.0;" x1="554.5" x2="653.5" y1="110.1094" y2="110.1094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="56" x="559.5" y="121.3916">word_token</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="625.5" y="121.3916">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="620.5" x2="620.5" y1="110.1094" y2="125.75"/><line style="stroke:#383838;stroke-width:1.0;" x1="554.5" x2="653.5" y1="125.75" y2="125.75"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="9" x="583" y="137.0322">...</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="0" x="628.5" y="137.0322"/><line style="stroke:#383838;stroke-width:1.0;" x1="620.5" x2="620.5" y1="125.75" y2="141.3906"/><rect fill="#F8F8F8" filter="url(#f1abmn4sk1koxw)" height="236.9375" style="stroke:#383838;stroke-width:1.5;" width="200" x="251" y="337"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="186" x="258" y="350.1387">location_property_osmline</text><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="354.9688" y2="354.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="278.5" y="366.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="349" y="366.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="354.9688" y2="370.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="370.6094" y2="370.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="280.5" y="381.8916">osm_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="349" y="381.8916">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="370.6094" y2="386.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="386.25" y2="386.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="61" x="267" y="397.5322">startnumber</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="349" y="397.5322">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="386.25" y2="401.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="401.8906" y2="401.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="56" x="269.5" y="413.1729">endnumber</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="349" y="413.1729">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="401.8906" y2="417.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="417.5313" y2="417.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="82" x="256.5" y="428.8135">interpolationtype</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="349" y="428.8135">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="417.5313" y2="433.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="433.1719" y2="433.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="278.5" y="444.4541">address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="349" y="444.4541">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="433.1719" y2="448.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="448.8125" y2="448.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="40" x="277.5" y="460.0947">partition</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="349" y="460.0947">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="448.8125" y2="464.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="464.4531" y2="464.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="83" x="256" y="475.7354">geometry_sector</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="349" y="475.7354">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="464.4531" y2="480.0938"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="480.0938" y2="480.0938"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="75" x="260" y="491.376">parent_place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="349" y="491.376">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="480.0938" y2="495.7344"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="495.7344" y2="495.7344"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="265" y="507.0166">country_code</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="349" y="507.0166">VARCHAR(2)</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="495.7344" y2="511.375"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="511.375" y2="511.375"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="275.5" y="522.6572">postcode</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="20" x="349" y="522.6572">text</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="511.375" y2="527.0156"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="527.0156" y2="527.0156"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="73" x="261" y="538.2979">indexed_status</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="349" y="538.2979">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="527.0156" y2="542.6563"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="542.6563" y2="542.6563"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="265" y="553.9385">indexed_date</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="59" x="349" y="553.9385">TIMESTAMP</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="542.6563" y2="558.2969"/><line style="stroke:#383838;stroke-width:1.0;" x1="251" x2="451" y1="558.2969" y2="558.2969"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="280.5" y="569.5791">linegeo</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="349" y="569.5791">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="344" x2="344" y1="558.2969" y2="573.9375"/><rect fill="#F8F8F8" filter="url(#f1abmn4sk1koxw)" height="111.8125" style="stroke:#383838;stroke-width:1.5;" width="174" x="264" y="187"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="128" x="287" y="200.1387">place_addressline</text><line style="stroke:#383838;stroke-width:1.0;" x1="264" x2="438" y1="204.9688" y2="204.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="301.5" y="216.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="382" y="216.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="377" x2="377" y1="204.9688" y2="220.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="264" x2="438" y1="220.6094" y2="220.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="81" x="280" y="231.8916">address_place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="382" y="231.8916">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="377" x2="377" y1="220.6094" y2="236.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="264" x2="438" y1="236.25" y2="236.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="40" x="300.5" y="247.5322">distance</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="382" y="247.5322">DOUBLE</text><line style="stroke:#383838;stroke-width:1.0;" x1="377" x2="377" y1="236.25" y2="251.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="264" x2="438" y1="251.8906" y2="251.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="103" x="269" y="263.1729">cached_rank_address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="382" y="263.1729">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="377" x2="377" y1="251.8906" y2="267.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="264" x2="438" y1="267.5313" y2="267.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="46" x="297.5" y="278.8135">fromarea</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="382" y="278.8135">BOOLEAN</text><line style="stroke:#383838;stroke-width:1.0;" x1="377" x2="377" y1="267.5313" y2="283.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="264" x2="438" y1="283.1719" y2="283.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="45" x="298" y="294.4541">isaddress</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="382" y="294.4541">BOOLEAN</text><line style="stroke:#383838;stroke-width:1.0;" x1="377" x2="377" y1="283.1719" y2="298.8125"/><rect fill="#F8F8F8" filter="url(#f1abmn4sk1koxw)" height="143.0938" style="stroke:#383838;stroke-width:1.5;" width="154" x="527" y="382"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="129" x="539.5" y="395.1387">location_postcode</text><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="399.9688" y2="399.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="550.5" y="411.251">place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="617" y="411.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="399.9688" y2="415.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="415.6094" y2="415.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="547.5" y="426.8916">postcode</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="617" y="426.8916">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="415.6094" y2="431.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="431.25" y2="431.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="75" x="532" y="442.5322">parent_place_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="617" y="442.5322">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="431.25" y2="446.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="446.8906" y2="446.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="540.5" y="458.1729">rank_search</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="617" y="458.1729">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="446.8906" y2="462.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="462.5313" y2="462.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="64" x="537.5" y="473.8135">rank_address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="617" y="473.8135">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="462.5313" y2="478.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="478.1719" y2="478.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="73" x="533" y="489.4541">indexed_status</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="617" y="489.4541">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="478.1719" y2="493.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="493.8125" y2="493.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="65" x="537" y="505.0947">indexed_date</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="59" x="617" y="505.0947">TIMESTAMP</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="493.8125" y2="509.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="527" x2="681" y1="509.4531" y2="509.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="545.5" y="520.7354">geometry</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="617" y="520.7354">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="612" x2="612" y1="509.4531" y2="525.0938"/><!--MD5=[2b322b975a43d887f4b5130fa1514430]
+reverse link placex to search_name--><path codeLine="87" d="M181.41,211.25 C259.75,203.85 171.16,31.5 257,31.5 " fill="none" id="placex-backto-search_name" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="176,211.5,185.163,215.111,180.9954,211.2859,184.8205,207.1183,176,211.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[9225071ced1fa56d3be038aebaf7c111]
+reverse link placex to place_addressline--><path codeLine="88" d="M181.25,211.5 C215.64,211.5 226.15,211.5 263,211.5 " fill="none" id="placex-backto-place_addressline" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="176,211.5,185,215.5,181,211.5,185,207.5,176,211.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[9225071ced1fa56d3be038aebaf7c111]
+reverse link placex to place_addressline--><path codeLine="89" d="M181.32,211.6 C216.1,212.87 225.6,226.5 263,226.5 " fill="none" id="placex-backto-place_addressline-1" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="176,211.5,184.9301,215.6537,180.9993,211.5857,185.0672,207.6549,176,211.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[bd411bc1e40cdc9c35ac95f86ac574be]
+link search_name to word--><path codeLine="91" d="M446,92.5 C492.35,92.5 504.95,99.92 548.79,100.47 " fill="none" id="search_name-to-word" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="554,100.5,545.023,96.4486,549.0001,100.4714,544.9773,104.4485,554,100.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[bd411bc1e40cdc9c35ac95f86ac574be]
+link search_name to word--><path codeLine="92" d="M446,107.5 C492.32,107.5 504.97,101.01 548.79,100.53 " fill="none" id="search_name-to-word-1" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="554,100.5,544.9773,96.5515,549.0001,100.5286,545.023,104.5514,554,100.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[2026b97b8eebe17816bba28c4ad4b669]
+link place_addressline to location_property_osmline--><!--MD5=[a9348f7e9012ac5ef48544c7a8bc4c7c]
+link search_name to place_addressline--><!--MD5=[28ade17d5fbc4e5a643b9e72ecbc3cb5]
+link location_property_osmline to location_postcode--><!--MD5=[3778d5ad5451b5ba12005c60410924eb]
+@startuml\r
+skinparam monochrome true\r
+skinparam ObjectFontStyle bold\r
+\r
+left to right direction\r
+\r
+map placex {\r
+  place_id => BIGINT\r
+  osm_type => CHAR(1)\r
+  osm_id => BIGINT\r
+  class => TEXT\r
+  type => TEXT\r
+  name => HSTORE\r
+  address => HSTORE\r
+  extratags => HSTORE\r
+  admin_level => SMALLINT\r
+  partition => SMALLINT\r
+  geometry_sector => INT\r
+  parent_place_id => BIGINT\r
+  linked_place_id => BIGINT\r
+  importance => DOUBLE\r
+  rank_search => SMALLINT\r
+  rank_address => SMALLINT\r
+  wikipedia => TEXT\r
+  country_code => VARCHAR(2)\r
+  housenumber => TEXT\r
+  postcode => TEXT\r
+  indexed_status => SMALLINT\r
+  indexed_date => TIMESTAMP\r
+  centroid => GEOMETRY\r
+  geometry => GEOMETRY\r
+}\r
+\r
+map search_name {\r
+  place_id => BIGINT\r
+  importance => DOUBLE\r
+  search_rank => SMALLINT\r
+  address_rank => SMALLINT\r
+  name_vector => INT[]\r
+  nameaddress_vector => INT[]\r
+  country_code => VARCHAR(2)\r
+  centroid => GEOMETRY\r
+}\r
+\r
+map word {\r
+  word_id => INT\r
+  word_token => TEXT\r
+  ... =>\r
+}\r
+\r
+map location_property_osmline {\r
+  place_id => BIGINT\r
+  osm_id => BIGINT\r
+  startnumber => INT\r
+  endnumber => INT\r
+  interpolationtype => TEXT\r
+  address => HSTORE\r
+  partition => SMALLINT\r
+  geometry_sector => INT\r
+  parent_place_id => BIGINT\r
+  country_code => VARCHAR(2)\r
+  postcode => text\r
+  indexed_status => SMALLINT\r
+  indexed_date => TIMESTAMP\r
+  linegeo => GEOMETRY\r
+}\r
+\r
+map place_addressline {\r
+  place_id => BIGINT\r
+  address_place_id => BIGINT\r
+  distance => DOUBLE\r
+  cached_rank_address => SMALLINT\r
+  fromarea => BOOLEAN\r
+  isaddress => BOOLEAN\r
+}\r
+\r
+map location_postcode {\r
+  place_id => BIGINT\r
+  postcode => TEXT\r
+  parent_place_id => BIGINT\r
+  rank_search => SMALLINT\r
+  rank_address => SMALLINT\r
+  indexed_status => SMALLINT\r
+  indexed_date => TIMESTAMP\r
+  geometry => GEOMETRY\r
+}\r
+\r
+placex::place_id <- - search_name::place_id\r
+placex::place_id <- - place_addressline::place_id\r
+placex::place_id <- - place_addressline::address_place_id\r
+\r
+search_name::name_vector - -> word::word_id\r
+search_name::nameaddress_vector - -> word::word_id\r
+\r
+place_addressline -[hidden]> location_property_osmline\r
+search_name -[hidden]> place_addressline\r
+location_property_osmline -[hidden]-> location_postcode\r
+\r
+@enduml\r
+
+PlantUML version 1.2021.12(Tue Oct 05 18:01:58 CEST 2021)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg>
\ No newline at end of file
index 0f4ed655cd1fa1b80c3ef2e612b7e750ea38afbb..3fae95b72b03e17c43721387db9edf6719c0952f 100644 (file)
@@ -34,10 +34,11 @@ pages:
         - 'External data: US housenumbers from TIGER': 'customize/Tiger.md'
         - 'External data: Postcodes': 'customize/Postcodes.md'
     - 'Developers Guide':
-        - 'Setup for Development' : 'develop/Development-Environment.md'
         - 'Architecture Overview' : 'develop/overview.md'
-        - 'OSM Data Import' : 'develop/Import.md'
+        - 'Database Layout' : 'develop/Database-Layout.md'
+        - 'Indexing' : 'develop/Indexing.md'
         - 'Tokenizers' : 'develop/Tokenizers.md'
+        - 'Setup for Development' : 'develop/Development-Environment.md'
         - 'Testing' : 'develop/Testing.md'
         - 'External Data Sources': 'develop/data-sources.md'
     - 'Appendix':
index fcb87d433a606a114f9ae27f2dbcde1989cb34df..e13a0e9daccd2b511b8c0dcb3664e05776643e44 100644 (file)
@@ -257,7 +257,7 @@ class SearchDescription
         if (empty($this->aName)) {
             $this->bNameNeedsAddress = $bNeedsAddress;
         } else {
-            $this->bNameNeedsAddress |= $bNeedsAddress;
+            $this->bNameNeedsAddress &= $bNeedsAddress;
         }
         if ($bSearchable) {
             $this->aName[$iId] = $iId;
index 025600f7956069e58da3a2e08d0d654d8e8a301e..dcfc161eac5c0dad27e6ba73d082c7671cf9db9a 100644 (file)
@@ -10,7 +10,7 @@ Version information for Nominatim.
 # and must always be increased when there is a change to the database or code
 # that requires a migration.
 # Released versions always have a database patch level of 0.
-NOMINATIM_VERSION = (3, 7, 0, 2)
+NOMINATIM_VERSION = (4, 0, 0, 0)
 
 POSTGRESQL_REQUIRED_VERSION = (9, 5)
 POSTGIS_REQUIRED_VERSION = (2, 2)