X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fbbdd31399da42b94188d9d4aa4f084efd4876a4..d72f11d1afd5ae91071ba4a7440ed953d2495e16:/lib-sql/tokenizer/legacy_tokenizer_tables.sql?ds=inline

diff --git a/lib-sql/tokenizer/legacy_tokenizer_tables.sql b/lib-sql/tokenizer/legacy_tokenizer_tables.sql
index 3410b763..937eaaa2 100644
--- a/lib-sql/tokenizer/legacy_tokenizer_tables.sql
+++ b/lib-sql/tokenizer/legacy_tokenizer_tables.sql
@@ -12,6 +12,8 @@ CREATE TABLE word (
 
 CREATE INDEX idx_word_word_token ON word
     USING BTREE (word_token) {{db.tablespace.search_index}};
+CREATE INDEX idx_word_word ON word
+    USING BTREE (word) {{db.tablespace.search_index}} WHERE word is not null;
 GRANT SELECT ON word TO "{{config.DATABASE_WEBUSER}}";
 
 DROP SEQUENCE IF EXISTS seq_word;
