1 -- SPDX-License-Identifier: GPL-2.0-only
3 -- This file is part of Nominatim. (https://nominatim.org)
5 -- Copyright (C) 2026 by the Nominatim developer community.
6 -- For a full list of authors see the git log.
8 DROP TABLE IF EXISTS search_name;
10 {% if not create_reverse_only %}
12 CREATE TABLE search_name (
13 place_id BIGINT NOT NULL,
14 importance FLOAT NOT NULL,
15 address_rank SMALLINT NOT NULL,
16 name_vector integer[] NOT NULL,
17 nameaddress_vector integer[] NOT NULL,
18 country_code varchar(2),
19 centroid GEOMETRY(Geometry, 4326) NOT NULL
20 ) {{db.tablespace.search_data}};
22 CREATE UNIQUE INDEX idx_search_name_place_id
23 ON search_name USING BTREE (place_id) {{db.tablespace.search_index}};