]> git.openstreetmap.org Git - nominatim.git/blob - docs/develop/search-tables.plantuml
avoid forwarding variables via SQL
[nominatim.git] / docs / develop / search-tables.plantuml
1 @startuml
2 skinparam monochrome true
3 skinparam ObjectFontStyle bold
4
5 left to right direction
6
7 map placex {
8   place_id => BIGINT
9   osm_type => CHAR(1)
10   osm_id => BIGINT
11   class => TEXT
12   type => TEXT
13   name => HSTORE
14   address => HSTORE
15   extratags => HSTORE
16   admin_level => SMALLINT
17   partition => SMALLINT
18   geometry_sector => INT
19   parent_place_id => BIGINT
20   linked_place_id => BIGINT
21   importance => DOUBLE
22   rank_search => SMALLINT
23   rank_address => SMALLINT
24   wikipedia => TEXT
25   country_code => VARCHAR(2)
26   housenumber => TEXT
27   postcode => TEXT
28   indexed_status => SMALLINT
29   indexed_date => TIMESTAMP
30   centroid => GEOMETRY
31   geometry => GEOMETRY
32 }
33
34 map search_name {
35   place_id => BIGINT
36   importance => DOUBLE
37   search_rank => SMALLINT
38   address_rank => SMALLINT
39   name_vector => INT[]
40   nameaddress_vector => INT[]
41   country_code => VARCHAR(2)
42   centroid => GEOMETRY
43 }
44
45 map word {
46   word_id => INT
47   word_token => TEXT
48   ... =>
49 }
50
51 map location_property_osmline {
52   place_id => BIGINT
53   osm_id => BIGINT
54   startnumber => INT
55   endnumber => INT
56   interpolationtype => TEXT
57   address => HSTORE
58   partition => SMALLINT
59   geometry_sector => INT
60   parent_place_id => BIGINT
61   country_code => VARCHAR(2)
62   postcode => text
63   indexed_status => SMALLINT
64   indexed_date => TIMESTAMP
65   linegeo => GEOMETRY
66 }
67
68 map place_addressline {
69   place_id => BIGINT
70   address_place_id => BIGINT
71   distance => DOUBLE
72   cached_rank_address => SMALLINT
73   fromarea => BOOLEAN
74   isaddress => BOOLEAN
75 }
76
77 map location_postcode {
78   place_id => BIGINT
79   postcode => TEXT
80   parent_place_id => BIGINT
81   rank_search => SMALLINT
82   rank_address => SMALLINT
83   indexed_status => SMALLINT
84   indexed_date => TIMESTAMP
85   geometry => GEOMETRY
86 }
87
88 placex::place_id <-- search_name::place_id
89 placex::place_id <-- place_addressline::place_id
90 placex::place_id <-- place_addressline::address_place_id
91
92 search_name::name_vector --> word::word_id
93 search_name::nameaddress_vector --> word::word_id
94
95 place_addressline -[hidden]> location_property_osmline
96 search_name -[hidden]> place_addressline
97 location_property_osmline -[hidden]-> location_postcode
98
99 @enduml