Bugzilla – Attachment 19596 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]
Bug 7518: searches with quotation marks don't work
Bug-7518-searches-with-quotation-marks-dont-work.patch (text/plain), 1.56 KB, created by
Kyle M Hall (khall)
on 2013-07-12 14:16:11 UTC
(
hide
)
Description:
Bug 7518: searches with quotation marks don't work
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-07-12 14:16:11 UTC
Size:
1.56 KB
patch
obsolete
>From 5764168f36008480fdfcfc795970b20976c7af15 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 > >Signed-off-by: Leila <koha.aixmarseille@gmail.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Search.pm | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index aec024b..8d95493 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -847,6 +847,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; # Bug 7518: searches with quotation marks don't work > > my $weighted_query .= "(rk=("; # Specifies that we're applying rank > >-- >1.7.2.5
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