]> git.koha-community.org Git - koha.git/commit
Bug 20334: Option for escaping slashes in search queries
authorDavid Gustafsson <david.gustafsson@ub.gu.se>
Fri, 2 Mar 2018 17:16:39 +0000 (18:16 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 8 Oct 2019 13:09:53 +0000 (14:09 +0100)
commitda16f6bc9185f8ae166d46c8e35f3565e41d6bc0
treea5f4699138437998cd9ff2c2ae564be1f6b64737
parent3ab36c2c935d8cdef5158147d659590b4015b53e
Bug 20334: Option for escaping slashes in search queries

Add "QueryRegexEscapeOption" system preference to provide option to escape
Elasticsearch regexp delimiters (/) within queries, or alternativly to
unescape escaped slashes (\/) while escaping unescaped slashes, in
effect making "\/" the new regexp delimiter.

How to test:
1) Run tests in ./t/Koha/SearchEngine/ElasticSearch/QueryBuilder.t
2) All tests should succeed

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
installer/data/mysql/atomicupdate/bug_20334-add-syspref-QueryRegexEscapeOptions.sql [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
t/Koha/SearchEngine/ElasticSearch/QueryBuilder.t [new file with mode: 0644]