When you do a search through advanced search with a publication date range limit (like 2002-2006 by example) according the example given in the legend, you get no results even if there must be ones. It's ok for one-bound limits like -2002 or 2006-, but for two bounds limits you must wrap the hypen with spaces to get results, which is not consistent with the legend. Whitout spaces the query sent to zebra is done by opac-search.pl script like this : kw,wrdl,rtrn=MY_SEARCH and yr,st-numeric,ge=2002 and yr,st-numeric,le=2006 Seems that Zebra does not understand that syntax. With spaces, it is turned out like this : kw,wrdl,rtrn=MY_SEARCH and yr,st-numeric=2002 - 2006 and it works. It also works without spaces if you run a ccl query directly from the opac : ccl=kw,wrdl,rtrn=archipel and yr,st-numeric=2002-2006 May be it's a question of zebra config or zebra version, not completely sure of this (cf bug 12897), I propose this patch nevertheless as an eventuel solution. Test plan : 1) do a search from advanced search with some results 2) redo the same putting a date limit with two bounds separated by an hypen without spaces : you get no results 3) apply the patch 4) redo stage 2 : you get the expected results
Created attachment 56726 [details] [review] Bug_17484 Searching with date range limit (lower and upper) does not work
This change in Yaz --- 5.15.0 2015/11/11 CCL: fix r=o, r=r WRT inherited attributes YAZ-864 appears that it may be the point at which the syntax was tightened up
Created attachment 56742 [details] [review] Proposed patch Tested on two systems one exhibiting the bug and one not on both date ranges now work as advertised
Signed Off bug - patch fixes problem
You should make the same changes for the intranet script (catalogue/search.pl) as well.
Created attachment 56842 [details] [review] Bug 17484 - Searching with date range limit (lower and upper) does not work added same modification on staff interface
Created attachment 57606 [details] [review] Bug_17484 Search with date range limit (lower and upper) does not work If the period is entered without spaces wrapping the hyphen You can't get any result Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> I can't reproduce the error, search still works after applying the patch
I do not recreate the error (whereas I did when I tried it last month). I am using kohadevbox, and yaz 4.2.30-4.
(In reply to Jonathan Druart from comment #8) > I do not recreate the error (whereas I did when I tried it last month). > > I am using kohadevbox, and yaz 4.2.30-4. If the change I listed above is the one causing the old code to cease to work you need a yaz version > 5.15 to manifest the problem. This bears out what I've observed in a number of sites later yaz manifests the problem earlier ones dont. Fix works for all
Created attachment 57622 [details] [review] Bug_17484 Search with date range limit (lower and upper) does not work If the period is entered without spaces wrapping the hyphen You can't get any result Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> I can't reproduce the error, search still works after applying the patch Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Colin Campbell from comment #9) > (In reply to Jonathan Druart from comment #8) > > I do not recreate the error (whereas I did when I tried it last month). > > > > I am using kohadevbox, and yaz 4.2.30-4. > > If the change I listed above is the one causing the old code to cease to > work you need a yaz version > 5.15 to manifest the problem. This bears out > what I've observed in a number of sites later yaz manifests the problem > earlier ones dont. Fix works for all It looks like jessie, stretch and sid are all using 4.2.30
(In reply to Jonathan Druart from comment #11) > It looks like jessie, stretch and sid are all using 4.2.30 You can get 5.x from IndexData, but it's not going to be in Debian anytime soon I guess.
Pushed to master for 16.11, thanks Koha Team Lyon 3!
Pushed to 3.22.x, will be in 3.22.13
Pushed to 16.05.x, for 16.05.06 release