]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: make tokenizer configurable
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 11 Oct 2021 08:16:40 +0000 (10:16 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 11 Oct 2021 08:16:40 +0000 (10:16 +0200)
cookbooks/nominatim/attributes/default.rb
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/nominatim.env.erb

index 32699dc6d8daa66d4fde453607e7b28deafeeff4..056d41c764deb8c38d422d45d696019498b0d940 100644 (file)
@@ -23,6 +23,10 @@ default[:nominatim][:fpm_pools] = {
   }
 }
 
+default[:nominatim][:config] = {
+  :tokenizer => "legacy"
+}
+
 default[:nominatim][:redirects] = {}
 
 default[:postgresql][:versions] |= [node[:nominatim][:dbcluster].split("/").first]
index b7d7a803ed2ffbb93d3eed6a897830772ef3a812..7e32db7e68b464d9cd9ab749bbfe495befc5fd98 100644 (file)
@@ -239,7 +239,8 @@ template "#{build_directory}/.env" do
   variables :base_url => node[:nominatim][:state] == "off" ? node[:fqdn] : "nominatim.openstreetmap.org",
             :dbname => node[:nominatim][:dbname],
             :flatnode_file => node[:nominatim][:flatnode_file],
-            :log_file => "#{node[:nominatim][:logdir]}/query.log"
+            :log_file => "#{node[:nominatim][:logdir]}/query.log",
+            :tokenizer => node[:nominatim][:config][:tokenizer]
 end
 
 git ui_directory do
index f26a7baab253958cabb58a5036de3b3e3bb5098a..f3ead2bd4ca0043439d046dc020e9f4117941ada 100644 (file)
@@ -13,6 +13,8 @@ NOMINATIM_USE_US_TIGER_DATA=yes
 
 NOMINATIM_PYOSMIUM_BINARY=/usr/bin/pyosmium-get-changes
 
+NOMINATIM_TOKENIZER="<%= @tokenizer %>"
+
 NOMINATIM_TABLESPACE_SEARCH_DATA=dsearch
 NOMINATIM_TABLESPACE_SEARCH_INDEX=isearch
 NOMINATIM_TABLESPACE_OSM_DATA=dosm