mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-10-27 03:29:24 +03:00
ICU: add an index over word_ids
Needed for keyword lookup in the details response.
This commit is contained in:
parent
8e439d3dd9
commit
85797acf1e
@ -1,2 +1,3 @@
|
||||
-- Required for details lookup.
|
||||
CREATE INDEX IF NOT EXISTS idx_word_word_id
|
||||
ON word USING BTREE (word_id) {{db.tablespace.search_index}};
|
||||
|
@ -67,10 +67,13 @@ class LegacyICUTokenizer(AbstractTokenizer):
|
||||
self.term_normalization = get_property(conn, DBCFG_TERM_NORMALIZATION)
|
||||
|
||||
|
||||
def finalize_import(self, _):
|
||||
def finalize_import(self, config):
|
||||
""" Do any required postprocessing to make the tokenizer data ready
|
||||
for use.
|
||||
"""
|
||||
with connect(self.dsn) as conn:
|
||||
sqlp = SQLPreprocessor(conn, config)
|
||||
sqlp.run_sql_file(conn, 'tokenizer/legacy_tokenizer_indices.sql')
|
||||
|
||||
|
||||
def update_sql_functions(self, config):
|
||||
|
Loading…
Reference in New Issue
Block a user