Bugzilla – Attachment 131016 Details for
Bug 30153
FindDuplicate ElasticSearch should not use lowercase 'and'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30153: Use uppercase AND to join query parts
Bug-30153-Use-uppercase-AND-to-join-query-parts.patch (text/plain), 1.95 KB, created by
Martin Renvoize (ashimema)
on 2022-02-22 14:39:38 UTC
(
hide
)
Description:
Bug 30153: Use uppercase AND to join query parts
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-02-22 14:39:38 UTC
Size:
1.95 KB
patch
obsolete
>From bc5bf5f3e0226e96c460b765842845b3b9653a5e Mon Sep 17 00:00:00 2001 >From: Thomas Klausner <domm@plix.at> >Date: Tue, 22 Feb 2022 15:09:58 +0100 >Subject: [PATCH] Bug 30153: Use uppercase AND to join query parts >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >C4::Search->FindDuplicate joins title and author using 'and' >(lowercase). When this query is passed on to ElasticSearch, it >interprets the lowercase 'and' as a term to search for, because the >operator has to be in uppercases ('AND'). > >Test plan: >* Reproduce the bug: >- Set SearchEngine to ElasticSearch (and make sure you have the data > indexed etc) >- Find an existing book, note the title (245a) and the author (100a) >- Create a new book (Cataloging -> New Record) >- Fill in the same title and author using the same data as in an > existing book (and any other fields that might be required) >- Click "save" >=> A new book will be created, the Duplicate Finder has failed > >* Apply the patch > >* Check if it's working now: >- Create a new book (Cataloging -> New Record) >- Fill in the same title and author using the same data as in an > existing book (and any other fields that might be required) >- Click "save" >- The DuplicateFinder should now report the already exising book > >Maybe we should also check if Zebra does not have any problems with the >uppercase 'AND'? In that case, repeat the above steps, but set >SearchEngine to Zebra :-) > >Sponsored-by: Steiermärkische Landesbibliothek >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Search.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 18a2977a97..48c7985b4e 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -99,7 +99,7 @@ sub FindDuplicate { > > my $titleindex = 'ti,ext'; > my $authorindex = 'au,ext'; >- my $op = 'and'; >+ my $op = 'AND'; > > $result->{title} =~ s /\\//g; > $result->{title} =~ s /\"//g; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30153
:
131014
| 131016 |
131023