diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-04-19 22:52:00 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-05-24 20:24:54 +0200 |
commit | ffe838a923696f81e8d8e1f24c5dc7a568cbc6ac (patch) | |
tree | 92894c1e927204b529759e8c3e9078720ce5e8bc /Bugzilla/Config/Elastic.pm | |
parent | 50fc9d77128db4f8565265047166c6ef61bac5c5 (diff) | |
download | bugzilla-ffe838a923696f81e8d8e1f24c5dc7a568cbc6ac.tar.gz bugzilla-ffe838a923696f81e8d8e1f24c5dc7a568cbc6ac.tar.xz |
Bug 1348380 - Add param and user setting to control elasticsearch behavior
1) add an 'elasticsearch' param (configured via admin.cgi) that turns off all
code that would attempt to connect to elasticsearch.
2) add a user preference that controls using elasticsearch for searches, which defaults
to off for logged-in users. Anonymous users will default to using elasticsearch
for the greater good. Note that elasticsearch, if available, will still power
user-autocompletion (unless turned off as by the above parameter).
Diffstat (limited to 'Bugzilla/Config/Elastic.pm')
-rw-r--r-- | Bugzilla/Config/Elastic.pm | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/Bugzilla/Config/Elastic.pm b/Bugzilla/Config/Elastic.pm index 2b2513f1b..690f5fac5 100644 --- a/Bugzilla/Config/Elastic.pm +++ b/Bugzilla/Config/Elastic.pm @@ -16,18 +16,23 @@ use Bugzilla::Config::Common; our $sortkey = 1550; sub get_param_list { - return ( - { - name => 'elasticsearch_nodes', - type => 't', - default => 'localhost:9200', - }, - { - name => 'elasticsearch_index', - type => 't', - default => 'bugzilla', - }, - ); + return ( + { + name => 'elasticsearch', + type => 'b', + default => 0, + }, + { + name => 'elasticsearch_nodes', + type => 't', + default => 'localhost:9200', + }, + { + name => 'elasticsearch_index', + type => 't', + default => 'bugzilla', + }, + ); } 1; |