Bug 4852 - Facets doesn't work with direct CCL queries
Summary: Facets doesn't work with direct CCL queries
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) minor (vote)
Assignee: Robin Sheat
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 14:28 UTC by Fridolin SOMERS
Modified: 2012-10-25 23:04 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (1.10 KB, patch)
2010-08-13 04:31 UTC, Robin Sheat
Details | Diff | Splinter Review
Signed-off patch (1.22 KB, patch)
2011-02-24 21:35 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin SOMERS 2010-06-04 14:28:35 UTC
When using for search a direct CCL query (ie "q=su:action"), by editing URL or using some links (ie the link to subject in normal view of opac-details.pl).
In this case, facets links are like (ie for branches) : 
"opac-search.pl?q=ccl=su:action&limit=branch:BR".
This search doesn't limit the number of results : facet doesn't work.

I think it comes from lib/C4/Search.pm.

Version 3.2 alpha 2.
Comment 1 Robin Sheat 2010-08-12 00:17:13 UTC
Steps to reproduce in the OPAC:
1) Do a CCL query. This is searching on a particular field, e.g. subject, but not using the dropdown. Either have the search term be 'su:Subject' or click on a subject (or author, or...) in a record.
2) Click on a facet on the left in order to refine the search
3) Note that the search isn't refined.

The query in the URL that doesn't work ends with: 
?q=ccl=au:Michael Fullan&limit=au:Mascall, Blair.

A version of this that would work:
?q=ccl=au:Michael Fullan and au:Mascall, Blair.
Comment 2 Robin Sheat 2010-08-13 04:31:14 UTC
Created attachment 2519 [details] [review]
proposed patch

This patch is intended for anyone interested in testing it. Once it's gone through our QA, I'll submit it to the list and switch the status on this bug.
Comment 3 Chris Cormack 2010-12-14 07:59:04 UTC
Wheres this at now Robin?
Comment 4 Fridolin SOMERS 2010-12-14 10:31:32 UTC
Patch tested,
It works fine.

Workflow :
Click on a link in details view (ie "au:La Fontaine").
You will see that facets are a ccl search with limits.
Click on facets, it works.
Comment 5 Chris Cormack 2010-12-14 23:57:32 UTC
Fridolyn, excellent thanks for the test.

Are you up for trying to sign off the patch?

http://wiki.koha-community.org/wiki/Sign_off_on_patches
Comment 6 Fridolin SOMERS 2010-12-15 08:46:07 UTC
(In reply to comment #5)
> Fridolyn, excellent thanks for the test.
> 
> Are you up for trying to sign off the patch?
> 
> http://wiki.koha-community.org/wiki/Sign_off_on_patches

Sorry, I'm a beginner with git.
I've got to get familiar with it.
I think I'll try another time.

Regards,
Comment 7 Robin Sheat 2010-12-16 06:59:39 UTC
If you can apply the patch, you're 95% of the way to being able to sign off on it :)
Comment 8 Jared Camins-Esakov 2011-02-24 21:35:37 UTC
Created attachment 3217 [details] [review]
Signed-off patch

Applied and tested against current master.
Comment 9 Chris Cormack 2011-03-04 00:01:22 UTC
Pushed, please test and mark resolved
Comment 10 MJ Ray (software.coop) 2011-03-04 10:27:10 UTC
This bug is mentioned in:
Bug 4852 - rewrite the query to	include limits if using ccl= http://lists.koha-community.org/pipermail/koha-patches/2011-February/013930.html
Bug 4852 - rewrite the query to include	limits if using ccl= http://lists.koha-community.org/pipermail/koha-patches/2011-February/013931.html