From f0dca6d2277a0db336cf49b4d61e8dead60e5e8b Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Mon, 22 Oct 2018 15:50:07 +0200 Subject: [PATCH] Bug 20334: Improve syspref description and set more sensible defaults --- .../atomicupdate/bug_20334-add-syspref-QueryRegexEscapeOptions.sql | 2 +- .../intranet-tmpl/prog/en/modules/admin/preferences/searching.pref | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_20334-add-syspref-QueryRegexEscapeOptions.sql b/installer/data/mysql/atomicupdate/bug_20334-add-syspref-QueryRegexEscapeOptions.sql index 7f70795631..e43d1c377c 100644 --- a/installer/data/mysql/atomicupdate/bug_20334-add-syspref-QueryRegexEscapeOptions.sql +++ b/installer/data/mysql/atomicupdate/bug_20334-add-syspref-QueryRegexEscapeOptions.sql @@ -1 +1 @@ -INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('QueryRegexEscapeOptions', 'dont_escape', 'dont_escape|escape|unescape_escaped', 'Escape option for regexps delimiters in Elasicsearch queries.', 'Choice'); +INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('QueryRegexEscapeOptions', 'escape', 'dont_escape|escape|unescape_escaped', 'Escape option for regexps delimiters in Elasicsearch queries.', 'Choice'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index c44f4d0e4e..154960e0c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -31,11 +31,12 @@ Searching: - ranking of search results by relevance (REQUIRES ZEBRA). - - pref: QueryRegexEscapeOptions + default: escape choices: escape: Escape unescape_escaped: Unescape escaped dont_escape: Don't escape - - "regular expressions within query strings. If \"Unescape escaped\" is selected this will allow writing regular expressions \"\/like this\/\" while \"/this/\", \"or/this\" will be escaped and interpreted by Elasticsearch as regular strings." + - "regular expressions within query strings. If \"Escape\" is selected occurences of \"/\" in search terms will be automatically escaped, and regular expressions interpreted as regular strings. If \"Unescape escaped\" is selected this will allow writing regular expressions \"\/like this\/\" while \"/this/\", \"or/this\" will be escaped and interpreted as regular strings. (Elasticsearch only.)" - - pref: OpacGroupResults default: 0 -- 2.11.0