Bugzilla – Attachment 29913 Details for
Bug 12323
Acquisitions search results fixed in order of biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber
Bug-12323-SIGNED-OFF---Acquisitions-search-results.patch (text/plain), 2.70 KB, created by
Jonathan Druart
on 2014-07-21 08:44:21 UTC
(
hide
)
Description:
Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-07-21 08:44:21 UTC
Size:
2.70 KB
patch
obsolete
>From 6e6e6af192f33d40622552fa04719d6cbbe28bb0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 21 May 2014 11:09:04 -0700 >Subject: [PATCH] Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in > order of biblionumber > >The acquisitions search is exhibiting the same behavior as bug 11410. >Results are always fixed in order of biblionumber, among other possible >issues ( including the ampersand issue ). > >Test Plan: >1) From an open basket, choose "Add to basket" >2) Run a search for "From an existing record" >3) Note the "View MARC" URLs are fixed in order of biblionumber >4) Apply this patch >5) Refresh the page >6) Note the results are no longer fixed in order of biblionumber > >Signed-off-by: David Cook <dcook@prosentient.com.au> > >Works as described. > >I think the code could be a bit tidier, but I think it makes sense to >use buildQuery here. It'll detect CCL, CQL, and PQF queries, as well >as parsing a regular keyword search as one would expect when searching >the catalogue. > >It also has the added bonus of performing relevance searching, >so long as QueryAutoTruncation is off, and so long as library staff >avoid using the "*" truncation wildcard (see bug 12430). > >While there are simpler ways to fix this acq bug, I think this was >probably the best move, as it adds a bit to the consistency of what >librarians can expect from their search results. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Same result with and without the patch but I agree with the changes. >BuildQuery should be called before SimpleSearch if QP is not used. >--- > acqui/neworderbiblio.pl | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl >index cfa2e82..2f0773a 100755 >--- a/acqui/neworderbiblio.pl >+++ b/acqui/neworderbiblio.pl >@@ -94,8 +94,17 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > # Searching the catalog. > >- # find results >-my ( $error, $marcresults, $total_hits ) = SimpleSearch( $query, $results_per_page * ( $page - 1 ), $results_per_page ); >+my @operands = $query; >+my $QParser; >+$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser')); >+my $builtquery; >+if ($QParser) { >+ $builtquery = $query; >+} else { >+ my ( $builterror,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type); >+ ( $builterror,$builtquery,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(undef,\@operands); >+} >+my ( $error, $marcresults, $total_hits ) = SimpleSearch( $builtquery, $results_per_page * ( $page - 1 ), $results_per_page ); > > if (defined $error) { > $template->param( >-- >2.0.0.rc2
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 12323
:
28525
|
28972
| 29913