Bugzilla – Attachment 15936 Details for
Bug 7518
searches with quotation marks don't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-7518-searches-with-quotation-marks-don-t-work.patch (text/plain), 1.38 KB, created by
Fridolin Somers
on 2013-03-07 15:15:00 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2013-03-07 15:15:00 UTC
Size:
1.38 KB
patch
obsolete
>From d794c7df62ada119c2c9dade47275769fad78c78 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 7 Mar 2013 16:02:55 +0100 >Subject: [PATCH] Bug 7518: searches with quotation marks don't work > >A search term without quotation marks returns the expected results. >The same search term with quotation marks returns no results. >Koha should ignore the quotation marks and return results anyway. > >This appears when QueryWeightFields syspref is activated. This feature composes a complex CCL query using double quotes around search words. >This patch simply replaces double quotes in search words by a space. > >Test plan : >- Set QueryWeightFields off >- Perform a serch on two words where you have results, like : centre "ville >=> you get results >- Set QueryWeightFields on >- Perform same serch >=> you get the same results >--- > C4/Search.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 50f7d2b..b1a6866 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -828,6 +828,7 @@ sub _build_weighted_query { > my $stemming = C4::Context->preference("QueryStemming") || 0; > my $weight_fields = C4::Context->preference("QueryWeightFields") || 0; > my $fuzzy_enabled = C4::Context->preference("QueryFuzzy") || 0; >+ $operand =~ s/"/ /g; > > my $weighted_query .= "(rk=("; # Specifies that we're applying rank > >-- >1.7.10.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 7518
:
14113
|
14144
|
14187
|
15936
|
16238
|
17150
|
19596