From: Sarah Hoffmann Date: Mon, 11 Oct 2021 08:16:40 +0000 (+0200) Subject: nominatim: make tokenizer configurable X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/7eb3680b81fdf339e466d9279584805f17a54c0f nominatim: make tokenizer configurable --- diff --git a/cookbooks/nominatim/attributes/default.rb b/cookbooks/nominatim/attributes/default.rb index 32699dc6d..056d41c76 100644 --- a/cookbooks/nominatim/attributes/default.rb +++ b/cookbooks/nominatim/attributes/default.rb @@ -23,6 +23,10 @@ default[:nominatim][:fpm_pools] = { } } +default[:nominatim][:config] = { + :tokenizer => "legacy" +} + default[:nominatim][:redirects] = {} default[:postgresql][:versions] |= [node[:nominatim][:dbcluster].split("/").first] diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index b7d7a803e..7e32db7e6 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -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 diff --git a/cookbooks/nominatim/templates/default/nominatim.env.erb b/cookbooks/nominatim/templates/default/nominatim.env.erb index f26a7baab..f3ead2bd4 100644 --- a/cookbooks/nominatim/templates/default/nominatim.env.erb +++ b/cookbooks/nominatim/templates/default/nominatim.env.erb @@ -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