]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 20 Sep 2021 12:04:48 +0000 (14:04 +0200)
commitcc988b2d16cc0399a979d3ce491e29084a0d1166
treeb8efe3ae8b48cb337e13691ccb6d13bbeda4eb69
parent3ce2810324fc28d5f9c9791ee7ec7805df94ff3e
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>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm