[Bug 5555] New: ISBN search returns bad results
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 Summary: ISBN search returns bad results Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P5 Component: Searching AssignedTo: gmcharlt@gmail.com ReportedBy: januszop@gmail.com QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 When making ISBN search (having chosen ISBN from the menu, NOT using ccl query) Koha generates fake results - instead of using nb (@attr 1=7) index it looks for given string anywhere in records. This is, most probably, caused by following fragment of C4::Search::buildQuery: # ISBN,ISSN,Standard Number, don't need special treatment elsif ( $index eq 'nb' || $index eq 'ns' ) { $indexes_set++; ( $stemming, $auto_truncation, $weight_fields, $fuzzy_enabled, $remove_stopwords ) = ( 0, 0, 0, 0, 0 ); } Fast workaround could be as attached at the bottom, but maybe somebody would propose a more elegant solution. Best regards, Janusz --- Search.pm 2010-12-30 10:41:23.000000000 +0200 +++ /usr/share/koha/lib/C4/Search.pm 2010-12-30 10:33:35.000000000 +0200 @@ -1125,6 +1129,7 @@ unless ( $indexes_set || !$index || $index =~ /(st-|phr|ext|wrdl)/ ) { $struct_attr = ",wrdl"; } +$indexes_set = 0 if ( $index eq 'nb' || $index eq 'ns' ); # Some helpful index variants my $index_plus = $index . $struct_attr . ':'; @@ -1307,7 +1312,7 @@ # This is flawed , means we can't search anything with : in it # if user wants to do ccl or cql, start the query with that # $query =~ s/:/=/g; - $query =~ s/(?<=(ti|au|pb|su|an|kw|mc)):/=/g; + $query =~ s/(?<=(ti|au|pb|su|an|kw|mc|nb|nc)):/=/g; $query =~ s/(?<=(wrdl)):/=/g; $query =~ s/(?<=(trn|phr)):/=/g; $limit =~ s/:/=/g; -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 januszop@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|gmcharlt@gmail.com |januszop@gmail.com --- Comment #1 from januszop@gmail.com 2011-03-28 16:52:38 UTC --- Without proposed correction when searching for ISBN / ISSN (nb / ns) -- both using query form and using ccl query -- an incorrect query is sent to the zebra server (there is no @attr 1=7 set -- cf. zebrasrv output). As a result a bad result set is generated. This issue is particularly annoying if (for some reason) the ISSN is entered (also) with dashes and the query is just about a part of ISBN -- then as a result one gets all the records containing the string in question in every possible place, e.g. as a record id or barcode or number of pages etc. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 --- Comment #2 from januszop@gmail.com 2011-03-28 16:55:56 UTC --- Created attachment 3471 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3471 Proposed patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 januszop@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaune@biblibre.c | |om Patch Status|Needs Signoff |Signed Off --- Comment #3 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2011-04-02 11:42:01 UTC --- This bug is mentioned in: Bug 5555: Corrected search for ISBN / ISSN http://lists.koha-community.org/pipermail/koha-patches/2011-March/014284.htm... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-04 21:32:14 UTC --- Hi Stephane Is the signed off patch available somewhere, not attached here, and can't see it on the list. Thanks -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Needs Signoff --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-06 03:31:16 UTC --- No signed off patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off --- Comment #6 from stephane.delaune@biblibre.com 2011-04-06 07:34:43 UTC --- the mail is send, excuse me for forgetting -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-06 07:50:48 UTC --- No problem Stephane, I appreciate all the hard work you are all doing Pushed now, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5555 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Pushed to Master |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org