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 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}};
23 CREATE UNIQUE INDEX idx_search_name_place_id
24 ON search_name USING BTREE (place_id) {{db.tablespace.search_index}};