Koha-clms/C4
Nick Clemens 7ab5051e09 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@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a52a9d7875)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 680fc0f77d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-01-29 14:25:23 +00:00
..
AuthoritiesMarc Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Barcodes Bug 26673: Fix perlcritic complains 2020-11-13 21:05:25 +00:00
ClassSortRoutine
…
ClassSplitRoutine Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Creators Bug 25852: Improve C4::Creators::Lib reliability under plack 2020-08-13 16:23:59 +00:00
External Bug 22010: Check preferences for ebook integration 2019-04-30 11:42:51 +00:00
Form
…
Heading Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
ILSDI Bug 21301: (follow-up) Remove borrowernumber in issues for GetRecords ILS-DI service 2021-01-20 01:48:09 +00:00
Installer Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Labels Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Linker Bug 25189: Don't create authority if results found 2020-07-10 15:53:23 +00:00
Members Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
OAI Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
Output
…
Patroncards Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Reports Bug 22001: execute reports in an eval 2020-03-31 17:48:14 +01:00
SIP Bug 27196:[20.05.x] Don't explode if item that is waiting if checked in by SIP 2021-01-22 19:45:01 +00:00
Search Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Serials Bug 20144: [sql_modes] Add default value for subscription_numberpatterns.description in tests 2018-02-13 13:58:53 -03:00
Utils Bug 25875: Move check for module_bit and code to the JOIN 2020-07-13 16:22:27 +00:00
Accounts.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Acquisition.pm Bug 25750: fix fallback to ecost_tax_included/ecost_tax_excluded 2020-09-03 15:40:42 +00:00
Auth.pm Bug 27345: Add missing global permissions for superlibrarian 2021-01-19 21:46:27 +00:00
Auth_cas_servers.yaml.sample
…
Auth_with_cas.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Auth_with_ldap.pm Bug 20443: Use search_with_library_limits for attribute types 2020-03-23 13:49:22 +00:00
Auth_with_shibboleth.pm Bug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly 2019-12-10 10:43:20 +00:00
AuthoritiesMarc.pm Bug 25313: Add skip_merge to ModAuthority 2020-12-09 21:15:31 +00:00
BackgroundJob.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Barcodes.pm
…
Biblio.pm Bug 26518: Move BiblioAutoLink within the transaction 2020-12-14 15:24:35 +00:00
Boolean.pm
…
Breeding.pm Bug 23542: Fix SRU import encoding 2020-08-17 14:31:09 +00:00
Budgets.pm Bug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules 2020-01-07 13:59:51 +00:00
Calendar.pm Bug 25723: (QA follow-up) Handle holiday and exception on same day 2020-07-27 17:40:25 +00:00
Charset.pm Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
Circulation.pm Bug 26593: Remove _get_discount_from_rule 2021-01-20 15:57:01 +00:00
ClassSortRoutine.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
ClassSource.pm Bug 15836: Remove deprecated subroutines 2018-11-13 18:56:18 +00:00
ClassSplitRoutine.pm Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Context.pm Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS 2020-08-31 20:05:05 +00:00
Contract.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
CourseReserves.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Creators.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Debug.pm
…
HTML5Media.pm Bug 20783: Use iframe to embed Youtube videos 2020-06-17 22:37:45 +00:00
Heading.pm Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
HoldsQueue.pm Bug 18958: (follow-up) Ensure hold fill target reserve_id is set for all hold types 2020-10-16 16:48:15 +00:00
Images.pm Revert "Bug 21987: Do not generate true color thumbnails if not needed" 2019-11-04 13:21:53 +00:00
ImportBatch.pm Bug 26557: (bug 23463 follow-up) Fix Batch import when incoming records contain itemnumber 2020-11-20 20:05:18 +00:00
ImportExportFramework.pm Bug 18143: Silence ods MARC framework export flood 2019-02-19 13:52:15 +00:00
InstallAuth.pm Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS 2020-08-31 20:05:05 +00:00
Installer.pm Bug 24883: Add POD entry and remove unused variable 2020-03-27 12:11:32 +00:00
ItemCirculationAlertPreference.pm
…
Items.pm Bug 27509: Prevent cn_sort value to be lost when editing items 2021-01-22 14:45:20 +00:00
Koha.pm Bug 17845: Remove unused code related to printers 2020-03-10 15:18:27 +00:00
Labels.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Languages.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Letters.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Linker.pm
…
Log.pm Bug 23632: Remove C4::Logs::GetLogs 2020-09-04 14:39:36 +00:00
MarcModificationTemplates.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Matcher.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Members.pm Bug 14708: Skip AnonymousPatron in GetBorrowersToExpunge 2020-12-09 21:38:24 +00:00
Message.pm Bug 21206: Replace C4::Items::GetItem 2019-02-26 13:24:07 +00:00
NewsChannels.pm Bug 24002: Incorrect DATE value: '00-00-0000' in NewsChannels.pm 2019-11-12 13:49:58 +00:00
Output.pm Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml 2020-07-10 16:03:57 +00:00
Overdues.pm Bug 27079: Floating point comparison correction 2020-12-14 15:35:14 +00:00
Patroncards.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Record.pm Bug 26414: Unable to export Withdrawn status using CSV profile 2020-10-20 13:56:17 +00:00
Reports.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Reserves.pm Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm 2020-11-16 20:34:15 +00:00
Ris.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
RotatingCollections.pm Bug 24299: Record 'RotatingCollection' as a transfer trigger 2020-03-20 15:54:55 +00:00
SMS.pm Bug 19134: C4::SMS falils on long driver name 2017-08-25 10:51:24 -03:00
Scheduler.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Scrubber.pm
…
Search.pm Bug 26957: Don't remove words that are also operators from search terms 2021-01-29 14:25:23 +00:00
Serials.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
Service.pm
…
ShelfBrowser.pm Bug 26673: Remove shebangs from Perl modules 2020-11-13 21:04:25 +00:00
SocialData.pm
…
Stats.pm Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
Suggestions.pm Bug 22784: Add the ability to archive/unarchive a purchase suggestions 2020-04-14 16:19:02 +01:00
TTParser.pm Bug 26673: Remove #!/usr/bin/env perl from .pm modules too 2020-11-13 21:04:52 +00:00
Tags.pm Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
Templates.pm Bug 21395: Make perlcritic happy 2020-07-13 16:44:43 +00:00
TmplToken.pm
…
TmplTokenType.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
UsageStats.pm Bug 25147: (RM follow-up) Update pref references. 2020-04-17 09:03:47 +01:00
XISBN.pm Bug 26364: Don't skip records that match the isbn we passed 2021-01-14 13:11:12 +00:00
XSLT.pm Bug 24052: Rename XSLT_Handler 2020-03-24 10:42:23 +00:00