Bugzilla – Attachment 126587 Details for
Bug 29284
Koha dies when an analytics search fails in Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29284: Handle the case of an exclamation point in parentheses
Bug-29284-Handle-the-case-of-an-exclamation-point-.patch (text/plain), 1.50 KB, created by
Martin Renvoize
on 2021-10-20 13:25:54 UTC
(
hide
)
Description:
Bug 29284: Handle the case of an exclamation point in parentheses
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-10-20 13:25:54 UTC
Size:
1.50 KB
patch
obsolete
>From 343c1abead957601713c83f27c09d5f95ca2ac80 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 20 Oct 2021 12:49:42 +0000 >Subject: [PATCH] Bug 29284: Handle the case of an exclamation point in > parentheses > >This expands the regex to handle this specific case > >To test: >1 - Load record created for last patch >2 - Note analytics error >3 - Apply patch >4 - Restart and reload >5 - No more errorm also no Analytics link >6 - Add a 773$t to a record with title used before: > Digger does it all (not really!) >7 - reload the initial record >8 - See 'Show analytics' link >9 - Click the link >10 - You should end up on the record you added the 773 to > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 58d5155ab4..76b4dbc6b4 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -986,7 +986,7 @@ sub clean_search_term { > $term =~ s/((?<!\\)(?:[\\]{2})*:[^:\s]+(?<!\\)(?:[\\]{2})*)(?=:)/$1\\/g; > > # screen all exclamation signs that either are the last symbol or have white space after them >- $term =~ s/(?:[\s\\]*!\s*)+(\s|$)/$1/g; >+ $term =~ s/(?:[\s\\]*!\s*)+(\s|$|\))/$1/g; > > # screen all brackets with backslash > $term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/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 29284
:
126583
|
126584
|
126586
| 126587 |
126656
|
126657
|
126658