]> git.openstreetmap.org Git - nominatim.git/blob - docs/develop/search-tables.plantuml
release 5.3.2.post11
[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   categories => LTREE[]
33   token_info => JSONB
34 }
35
36 map placex_entrance {
37   place_id => BIGINT
38   osm_id => BIGINT
39   type => TEXT
40   location => GEOMETRY
41   extratags => HSTORE
42 }
43
44 map search_name {
45   place_id => BIGINT
46   importance => DOUBLE
47   address_rank => SMALLINT
48   name_vector => INT[]
49   nameaddress_vector => INT[]
50   country_code => VARCHAR(2)
51   centroid => GEOMETRY
52 }
53
54 map word {
55   word_id => INT
56   word_token => TEXT
57   ... =>
58 }
59
60 map location_property_osmline {
61   place_id => BIGINT
62   osm_id => BIGINT
63   type => TEXT
64   startnumber => INT
65   endnumber => INT
66   step => int
67   address => HSTORE
68   partition => SMALLINT
69   geometry_sector => INT
70   parent_place_id => BIGINT
71   country_code => VARCHAR(2)
72   postcode => text
73   indexed_status => SMALLINT
74   indexed_date => TIMESTAMP
75   linegeo => GEOMETRY
76   token_info => JSONB
77 }
78
79 map place_addressline {
80   place_id => BIGINT
81   address_place_id => BIGINT
82   distance => DOUBLE
83   cached_rank_address => SMALLINT
84   fromarea => BOOLEAN
85   isaddress => BOOLEAN
86 }
87
88 map location_postcodes {
89   place_id => BIGINT
90   osm_id => BIGINT
91   postcode => TEXT
92   country_code => TEXT
93   parent_place_id => BIGINT
94   rank_search => SMALLINT
95   indexed_status => SMALLINT
96   indexed_date => TIMESTAMP
97   is_area => BOOLEAN
98   geometry => GEOMETRY
99   centroid => GEOMETRY
100 }
101
102 placex::place_id <-- search_name::place_id
103 placex::place_id <-- place_addressline::place_id
104 placex::place_id <-- place_addressline::address_place_id
105 placex::place_id <-- placex_entrance::place_id
106
107 search_name::name_vector --> word::word_id
108 search_name::nameaddress_vector --> word::word_id
109
110 place_addressline -[hidden]> location_property_osmline
111 search_name -[hidden]> place_addressline
112 location_property_osmline -[hidden]-> location_postcodes
113 location_postcodes -[hidden]-> placex_entrance
114
115 @enduml