diff --git a/app/services/search_indexer.rb b/app/services/search_indexer.rb index ceeaaf27f25..09193fff094 100644 --- a/app/services/search_indexer.rb +++ b/app/services/search_indexer.rb @@ -17,6 +17,8 @@ class SearchIndexer end def self.inject_extra_terms(raw) + return raw if !SiteSetting.search_inject_extra_terms + # insert some extra words for I.am.a.word so "word" is tokenized # I.am.a.word becomes I.am.a.word am a word raw.gsub(/[^[:space:]]*[\.]+[^[:space:]]*/) do |with_dot| diff --git a/config/site_settings.yml b/config/site_settings.yml index e8cd6f7d7aa..079232c0a93 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -1730,6 +1730,9 @@ backups: hidden: true search: + search_inject_extra_terms: + default: true + hidden: true min_search_term_length: client: true default: 3