]> git.openstreetmap.org Git - nominatim.git/blob - lib-sql/tables/search_name.sql
Merge pull request #3991 from lonvia/interpolation-on-addresses
[nominatim.git] / lib-sql / tables / search_name.sql
1 -- SPDX-License-Identifier: GPL-2.0-only
2 --
3 -- This file is part of Nominatim. (https://nominatim.org)
4 --
5 -- Copyright (C) 2026 by the Nominatim developer community.
6 -- For a full list of authors see the git log.
7
8 DROP TABLE IF EXISTS search_name;
9
10 {% if not create_reverse_only %}
11
12 CREATE TABLE search_name (
13   place_id BIGINT NOT NULL,
14   importance FLOAT NOT NULL,
15   search_rank SMALLINT NOT NULL,
16   address_rank SMALLINT NOT NULL,
17   name_vector integer[] NOT NULL,
18   nameaddress_vector integer[] NOT NULL,
19   country_code varchar(2),
20   centroid GEOMETRY(Geometry, 4326) NOT NULL
21   ) {{db.tablespace.search_data}};
22
23 CREATE UNIQUE INDEX idx_search_name_place_id
24   ON search_name USING BTREE (place_id) {{db.tablespace.search_index}};
25
26 {% endif %}