[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
Mon Nov 23 19:45:23 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26957
Nick Clemens <nick at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #113934|0 |1
is obsolete| |
--- Comment #3 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 113935
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113935&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
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list