]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/clicmd/index.py
Merge pull request #2349 from lonvia/fix-website-refresh
[nominatim.git] / nominatim / clicmd / index.py
index 0225c5ed41561b35ca257eb622f6804204ac56f6..ea95e4565270a72dad8b9cdd2c609f51ee27a9d3 100644 (file)
@@ -3,8 +3,8 @@ Implementation of the 'index' subcommand.
 """
 import psutil
 
-from ..db import status
-from ..db.connection import connect
+from nominatim.db import status
+from nominatim.db.connection import connect
 
 # Do not repeat documentation of subcommand classes.
 # pylint: disable=C0111
@@ -32,8 +32,11 @@ class UpdateIndex:
     @staticmethod
     def run(args):
         from ..indexer.indexer import Indexer
+        from ..tokenizer import factory as tokenizer_factory
 
-        indexer = Indexer(args.config.get_libpq_dsn(),
+        tokenizer = tokenizer_factory.get_tokenizer_for_db(args.config)
+
+        indexer = Indexer(args.config.get_libpq_dsn(), tokenizer,
                           args.threads or psutil.cpu_count() or 1)
 
         if not args.no_boundaries: