From 7eb3680b81fdf339e466d9279584805f17a54c0f Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 11 Oct 2021 10:16:40 +0200 Subject: [PATCH] nominatim: make tokenizer configurable --- cookbooks/nominatim/attributes/default.rb | 4 ++++ cookbooks/nominatim/recipes/default.rb | 3 ++- cookbooks/nominatim/templates/default/nominatim.env.erb | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5