]> git.openstreetmap.org Git - nominatim.git/commitdiff
use make_keywords for place search terms also
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 23 May 2021 21:08:11 +0000 (23:08 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 23 May 2021 21:08:11 +0000 (23:08 +0200)
Ensures that place indeed uses the same search names as other
names.

nominatim/tokenizer/legacy_tokenizer.py

index 4c03678d12e0c95ab613d44f2c152febd2e6294c..ec9100e9ba860fee8e5c8b9d9c6d114b90738e85 100644 (file)
@@ -513,10 +513,9 @@ class _TokenInfo:
         """
         def _get_place(name):
             with conn.cursor() as cur:
-                cur.execute("""SELECT (addr_ids_from_name(%s)
-                                       || getorcreate_name_id(make_standard_name(%s), ''))::text,
+                cur.execute("""SELECT make_keywords(hstore('name' , %s))::text,
                                       word_ids_from_name(%s)::text""",
-                            (name, name, name))
+                            (name, name))
                 return cur.fetchone()
 
         self.data['place_search'], self.data['place_match'] = \