[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 Dec 29 11:43:50 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26957
Fridolin Somers <fridolin.somers at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #113935|0 |1
is obsolete| |
--- Comment #5 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 114716
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114716&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>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list