]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/indices.src.sql
link nodes and relations using name->'name' index lookup instead of search_name
[nominatim.git] / sql / indices.src.sql
index 05cbd90d556045fcb9cedb4ced8101961304418c..57a6cdd749d3330e04761cf70f82eb3fb8b0f583 100644 (file)
@@ -15,7 +15,7 @@ CREATE INDEX idx_placex_pendingsector ON placex USING BTREE (rank_search,geometr
 CREATE INDEX idx_placex_parent_place_id ON placex USING BTREE (parent_place_id) where parent_place_id IS NOT NULL;
 CREATE INDEX idx_placex_interpolation ON placex USING BTREE (geometry_sector) where indexed_status > 0 and class='place' and type='houses';
 CREATE INDEX idx_placex_sector ON placex USING BTREE (geometry_sector,rank_address,osm_type,osm_id);
-
+CREATE INDEX idx_placex_adminname on placex USING BTREE (make_standard_name(name->'name'),rank_search) WHERE osm_type='N' and rank_search < 26;
 CREATE INDEX idx_location_area_country_place_id ON location_area_country USING BTREE (place_id);
 
 CREATE INDEX idx_search_name_country_centroid ON search_name_country USING GIST (centroid);