X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1db098c05d54e50e1682747d446ef92f5ed0f9f6..9627352ee48361799e61cf29360f163c5bcdd548:/lib-sql/tokenizer/icu_tokenizer_tables.sql?ds=sidebyside diff --git a/lib-sql/tokenizer/icu_tokenizer_tables.sql b/lib-sql/tokenizer/icu_tokenizer_tables.sql index 7ec3c6f8..509f6f65 100644 --- a/lib-sql/tokenizer/icu_tokenizer_tables.sql +++ b/lib-sql/tokenizer/icu_tokenizer_tables.sql @@ -1,3 +1,10 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- +-- This file is part of Nominatim. (https://nominatim.org) +-- +-- Copyright (C) 2022 by the Nominatim developer community. +-- For a full list of authors see the git log. + DROP TABLE IF EXISTS word; CREATE TABLE word ( word_id INTEGER, @@ -21,6 +28,10 @@ CREATE INDEX idx_word_postcodes ON word CREATE INDEX idx_word_full_word ON word USING btree(word) {{db.tablespace.address_index}} WHERE type = 'W'; +-- Used when inserting analyzed housenumbers (exclude old-style entries). +CREATE INDEX idx_word_housenumbers ON word + USING btree(word) {{db.tablespace.address_index}} + WHERE type = 'H' and word is not null; GRANT SELECT ON word TO "{{config.DATABASE_WEBUSER}}";