]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-sql/tokenizer/icu_tokenizer_tables.sql
switch country name tokens to new word table layout
[nominatim.git] / lib-sql / tokenizer / icu_tokenizer_tables.sql
index 13e1bdb0c5ef520758da15589a01d6cbb0d40555..1d70a9c38e8b86b8600aad4dd809f1fe6a0eded9 100644 (file)
@@ -8,6 +8,9 @@ CREATE TABLE word_icu (
 
 CREATE INDEX idx_word_word_token ON word
     USING BTREE (word_token) {{db.tablespace.search_index}};
+-- Used when updating country names from the boundary relation.
+CREATE INDEX idx_word_country_names ON word
+    USING btree((info->>'cc')) WHERE type = 'C';
 GRANT SELECT ON word TO "{{config.DATABASE_WEBUSER}}";
 
 DROP SEQUENCE IF EXISTS seq_word;