Bugzilla – Attachment 26652 Details for
Bug 9368
specific behavior of yr and acqdate indexes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9368 - do not change if QueryParser
Bug-9368---do-not-change-if-QueryParser.patch (text/plain), 1.92 KB, created by
Fridolin Somers
on 2014-03-27 16:40:00 UTC
(
hide
)
Description:
Bug 9368 - do not change if QueryParser
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2014-03-27 16:40:00 UTC
Size:
1.92 KB
patch
obsolete
>From e4f6ccf522351f4210011c4719170c52eac9662b Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 27 Mar 2014 17:38:34 +0100 >Subject: [PATCH] Bug 9368 - do not change if QueryParser > >--- > C4/Search.pm | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 2011acf..f3f3daf 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1273,6 +1273,8 @@ sub buildQuery { > my $fuzzy_enabled = C4::Context->preference("QueryFuzzy") || 0; > my $remove_stopwords = C4::Context->preference("QueryRemoveStopwords") || 0; > >+ my $QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser')); >+ > my $query = $operands[0]; > my $simple_query = $operands[0]; > >@@ -1367,14 +1369,24 @@ sub buildQuery { > # Add index-specific attributes > # Date of Publication > if ( $index eq 'yr' ) { >- $operand = "$index,st-numeric=$operand"; >+ if ($QParser) { >+ $index .= ",st-numeric"; >+ } >+ else { >+ $operand = "$index,st-numeric=$operand"; >+ } > $indexes_set++; > $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; > } > > # Date of Acquisition > elsif ( $index eq 'acqdate' ) { >- $operand = "$index,st-date-normalized=$operand"; >+ if ($QParser) { >+ $index .= ",st-date-normalized"; >+ } >+ else { >+ $operand = "$index,st-date-normalized=$operand"; >+ } > $indexes_set++; > $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; > } >-- >1.8.3.2
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 9368
:
14472
|
15114
|
16268
|
26652
|
28916
|
30318
|
31552