forked from hans/Nominatim
do not count words when in reverse-only mode
This commit is contained in:
@@ -99,6 +99,7 @@ class LegacyICUTokenizer(AbstractTokenizer):
|
||||
""" Recompute frequencies for all name words.
|
||||
"""
|
||||
with connect(self.dsn) as conn:
|
||||
if conn.table_exists('search_name'):
|
||||
with conn.cursor() as cur:
|
||||
cur.drop_table("word_frequencies")
|
||||
LOG.info("Computing word frequencies")
|
||||
|
||||
@@ -190,6 +190,7 @@ class LegacyTokenizer(AbstractTokenizer):
|
||||
""" Recompute the frequency of full words.
|
||||
"""
|
||||
with connect(self.dsn) as conn:
|
||||
if conn.table_exists('search_name'):
|
||||
with conn.cursor() as cur:
|
||||
cur.drop_table("word_frequencies")
|
||||
LOG.info("Computing word frequencies")
|
||||
|
||||
Reference in New Issue
Block a user