]> 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>
Sun, 30 Jan 2022 23:44:32 +0000 (00:44 +0100)
commit31c94c7f96dfb88952d075915b793553a4dddf01
tree6e71a851ea38813a833eaf624ba7ccc2c5aa90d8
parent883e3d3095839a5c6f4825eb664242546ae38be4
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