Bugzilla – Attachment 30634 Details for
Bug 12738
Search behaviour inconsistent with QueryParser on Perl 5.18
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 12738: C4::Context should set 'keyword' as the default search class
SIGNED-OFF-Bug-12738-C4Context-should-set-keyword-.patch (text/plain), 1.72 KB, created by
Martin Renvoize (ashimema)
on 2014-08-08 16:08:28 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 12738: C4::Context should set 'keyword' as the default search class
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-08-08 16:08:28 UTC
Size:
1.72 KB
patch
obsolete
>From 50326727df5cfd7110ac41d3d578d572dcb5bc2b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Fri, 8 Aug 2014 12:01:36 -0300 >Subject: [PATCH] [SIGNED OFF] Bug 12738: C4::Context should set 'keyword' as > the default search class > >On a Perl 5.18 environment (e.g. Ubuntu 14.04 LTS): > >To reproduce: >- Have UseQueryParser == "Don't try" >- Perform a search typing just a word that would have many matches on your Zebra db. >- Take note of the search results count. >- Make sure you have the queryparser.yaml file in your config dir. >- Set UseQueryParser == "Try" >- Perform the same search a couple of times >=> FAIL: Notice that the search results count differs from one run to the other. >- Run the regression tests > $ prove -v t/db_dependent/QueryParser.t >=> FAIL: tests fail > >To test: >- Apply the patch >- Run tests > $ prove -v t/db_dependent/QueryParser.t >=> SUCCESS: tests pass >- Repeat the steps 'To reproduce' >=> SUCCESS: Search results count is deterministic :-D >- Sign off :-D > >Sponsored-by: Universidad Nacional de Cordoba >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Context.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 9a7b75d..63e8ebe 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -988,6 +988,8 @@ sub _new_queryparser { > my $config_file = $context->config('queryparser_config'); > $config_file ||= '/etc/koha/searchengine/queryparser.yaml'; > if ( $QParser->load_config($config_file) ) { >+ # Set 'keyword' as the default search class >+ $QParser->default_search_class('keyword'); > # TODO: allow indexes to be configured in the database > return $QParser; > } >-- >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 12738
:
30630
|
30631
|
30633
|
30634
|
30658
|
30659