[Koha-bugs] [Bug 26957] Find duplicate removes operators from the middle of search terms
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jan 12 13:18:50 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26957
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #114716|0 |1
is obsolete| |
--- Comment #8 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 115080
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115080&action=edit
Bug 26957: Don't remove words that are also operators from search terms
FindDuplicate has a hardcoded regex to remove 'and', 'or', and 'not' from any
search fields, however,
is does this with no regard for these terms being embedded in the middle of a
word or phrase.
E.g.:
'Coupland' becomes 'Coupl'
'Frog and toad' becomes 'frog toad'
etc.
This patch simplay removes the substitutions as we already quote the terms as
well
To test:
1 - Add records to your system like:
The night circus by Erin Morgenstern
Frog and toad all year
Nothing ever happens
2 - Attempt to add purchase suggestions like
title: the night circus, author:Morgenstern, Erin
title: For and toad all year
title:nothing ever happens (case is important)
3 - No warnings about existing biblios
4 - Apply patches
5 - Delete existing suggestions
6 - Repeat step 2
7 - Each attempt should warn you of existing biblio
Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list