Bugzilla – Attachment 68943 Details for
Bug 19580
Elasticsearch: QueryAutoTruncate exclude period as splitting character in autotruncation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19580: Exclude period as splitting character for autotrunction
Bug-19580-Exclude-period-as-splitting-character-fo.patch (text/plain), 1.30 KB, created by
Nick Clemens (kidclamp)
on 2017-11-04 01:31:47 UTC
(
hide
)
Description:
Bug 19580: Exclude period as splitting character for autotrunction
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-11-04 01:31:47 UTC
Size:
1.30 KB
patch
obsolete
>From d369e86a8aa9c1404a4627b98a8460d9e7814879 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sat, 4 Nov 2017 01:01:42 +0000 >Subject: [PATCH] Bug 19580: Exclude period as splitting character for > autotrunction > >To test: >0 - Apply Unit test patch only >1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t >2 - Should fail >3 - Apply this patch >4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t >5 - should pass >6 - search for 'Local-number.raw:"4"' (or a vlid biblionumber) >7 - should get expected result >--- > 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 a021a0c..82c5ee2 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -798,7 +798,7 @@ sub _truncate_terms { > > # '"donald duck" title:"the mouse" and peter" get split into > # ['', '"donald duck"', '', ' ', '', 'title:"the mouse"', '', ' ', 'and', ' ', 'pete'] >- my @tokens = split /((?:[\w-]+:)?"[^"]+"|\s+)/, $query; >+ my @tokens = split /((?:[\w-.]+:)?"[^"]+"|\s+)/, $query; > > # Filter out empty tokens > my @words = grep { $_ !~ /^\s*$/ } @tokens; >-- >2.1.4
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 19580
:
68942
|
68943
|
69094
|
69095
|
70455
|
70456