mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
remove unused columns from word and search_name_* tables
Removes 'trigram' and 'location' from word. Removes 'address', 'importance' and 'country_code' from search_name_*. Use full geometry in centroid column of search_name_*. Requires migration of existing tables. For more info see pull request https://github.com/twain47/Nominatim/pull/45
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
drop type nearplace cascade;
|
||||
drop type if exists nearplace cascade;
|
||||
create type nearplace as (
|
||||
place_id BIGINT
|
||||
);
|
||||
|
||||
drop type nearfeature cascade;
|
||||
drop type if exists nearfeature cascade;
|
||||
create type nearfeature as (
|
||||
place_id BIGINT,
|
||||
keywords int[],
|
||||
@@ -13,7 +13,7 @@ create type nearfeature as (
|
||||
isguess boolean
|
||||
);
|
||||
|
||||
drop type nearfeaturecentr cascade;
|
||||
drop type if exists nearfeaturecentr cascade;
|
||||
create type nearfeaturecentr as (
|
||||
place_id BIGINT,
|
||||
keywords int[],
|
||||
@@ -24,6 +24,16 @@ create type nearfeaturecentr as (
|
||||
centroid GEOMETRY
|
||||
);
|
||||
|
||||
drop table IF EXISTS search_name_blank CASCADE;
|
||||
CREATE TABLE search_name_blank (
|
||||
place_id BIGINT,
|
||||
search_rank integer,
|
||||
address_rank integer,
|
||||
name_vector integer[]
|
||||
);
|
||||
SELECT AddGeometryColumn('search_name_blank', 'centroid', 4326, 'GEOMETRY', 2);
|
||||
|
||||
|
||||
CREATE TABLE location_area_country () INHERITS (location_area_large);
|
||||
CREATE INDEX idx_location_area_country_geometry ON location_area_country USING GIST (geometry);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user