Bug 4074 - The 'Subject(s)' link(s) are malformed resulting in no search results
Summary: The 'Subject(s)' link(s) are malformed resulting in no search results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: PC All
: PATCH-Sent (DO NOT USE) blocker (vote)
Assignee: Chris Nighswonger
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-28 03:12 UTC by Chris Nighswonger
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Patch (39.87 KB, patch)
2010-01-28 15:15 UTC, Chris Cormack
Details | Diff | Splinter Review
Backport of fix to current 3.0.x branch (47.62 KB, patch)
2010-01-28 15:59 UTC, Chris Cormack
Details | Diff | Splinter Review
Corrected patch (2.77 KB, patch)
2010-02-02 13:13 UTC, Chris Cormack
Details | Diff | Splinter Review
Proposed patch (1.31 KB, patch)
2010-11-16 17:33 UTC, Colin Campbell
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:22:51 UTC


---- Reported by cnighswonger@foundations.edu 2010-01-28 15:12:26 ----

These links are rendered with the wrong syntax. ie. 'q=su:foo' This results in a search for 'su:foo' rather than a search for 'foo' with an index of 'su.' This patch corrects the code so that the syntax conforms to current parsing methods. ie. 'idx=su&q=foo'

NOTE: The change to the underlying C4::Biblio->GetMarcSubjects() does not need to be ported to any other calling code.



---- Additional Comments From cnighswonger@foundations.edu 2010-01-28 15:15:32 ----

Created an attachment
Patch





---- Additional Comments From cnighswonger@foundations.edu 2010-01-28 15:59:31 ----

Created an attachment
Backport of fix to current 3.0.x branch





---- Additional Comments From cnighswonger@foundations.edu 2010-02-02 13:13:45 ----

Created an attachment
Corrected patch

Back port to 3.0.x can be had from here:

http://git.foundations.edu/?p=koha.git;a=commit;h=925aad5aa27f327153dd0de75edfb1a4ebf6b47f



---- Additional Comments From cnighswonger@foundations.edu 2010-02-02 13:15:26 ----

This tweak to the normalizing regexp requires less changes to existing code.



---- Additional Comments From cnighswonger@foundations.edu 2010-02-05 03:06:24 ----

Fixed in HEAD.



---- Additional Comments From henridamien@koha-fr.org 2010-04-21 16:24:19 ----

I have a problem with eb6b10f8 : it doesnot test all possible attributes, wrdl phr, and ext are not considered in the list of ccl qualifier, and thus, a system with NO syspref Query set searching for a word will fail.
Still Blocker and should at least be enhanced to test 
wrdl, le, ge, lt, gt, trn 
see lines 841 to 913 etc/zebradb/ccl.properties for qualifiers.
nahuel patch on 3.0 did quite well at that.
Even though needed a copy paste of ccl.properties
see #3854




--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:22 UTC  ---

This bug was previously known as _bug_ 4074 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4074
Imported an attachment (id=1813)
Imported an attachment (id=1814)
Imported an attachment (id=1815)

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 1813 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 1814 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 1815 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Colin Campbell 2010-11-16 16:53:26 UTC
The point raised by Henridamien is valid. In fact, the patch stops all simple searching under these conditions e.g. search for 'water' fails because the query string hits the regexes as kw,wrdl:water and the search as zebra sees it is for water AND kw AND wrdl.

Whether all of the qualifiers are needed to be tested for is not certain but certainly wrdl needs to be added (and if we test for right truncation arn't other truncations equally valid?
Comment 2 Colin Campbell 2010-11-16 17:33:10 UTC
Created attachment 2762 [details] [review]
Proposed patch

This patch clears the major problem I encountered with the code as is.
We  may need to check for more cases. Arguably it might be better to parse the query string fully into its constituent parts /(index)?(, *qualifier)=/
Comment 3 Chris Cormack 2010-11-17 08:01:29 UTC
Patch pushed, please test
Comment 4 Chris Nighswonger 2010-11-18 03:15:34 UTC
This bug has a patch presently committed to HEAD and 3.2.x.

Please take the appropriate action to update the status of this bug.

Remember, bugs which have been resolved should be tested and marked closed, preferably by the original reporter.
Comment 5 Chris Nighswonger 2010-11-30 15:54:48 UTC
A fix for this bug has been committed to the current development HEAD as well as released in 3.2.1.