]> git.koha-community.org Git - koha.git/commit
Bug 28316: escape ES ranges if QueryAutoTruncate is enabled
authorPetro Vashchuk <stalkernoid@gmail.com>
Mon, 6 Sep 2021 13:46:45 +0000 (16:46 +0300)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Wed, 22 Dec 2021 18:55:22 +0000 (19:55 +0100)
commit2ff0677f7f0dcab993624043f650a66b9d7e9325
treefe0f864a9f6b45ce0ebdf10de4d9a32946e3415b
parent1bfda79f2643d92942409f2ca944cfc2498c7aa7
Bug 28316: escape ES ranges if QueryAutoTruncate is enabled

if QueryAutoTruncate enabled we will have any special operators ruined
for example: "test [6 TO 7]" will be converted to "test* [6* TO* 7]"
so no reason to keep ranges when QueryAutoTruncate set to "enabled"

1) enable QueryAutoTruncate at your sysprefs.
2) perform a search using range, for example: "[1999 TO 2020]",
it shouldn't work the way it's supposed to.
3) apply the patch.
4) perform the same search with range, ensure that it works correctly.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e84759dfee9a4323a17146b88aba9d717ca0bb75)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm