[Koha-bugs] [Bug 17484] New: Searching with date range limit (lower and upper) does not work

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 21 17:55:07 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17484

            Bug ID: 17484
           Summary: Searching with date range limit (lower and upper) does
                    not work
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: koha at univ-lyon3.fr
        QA Contact: testopia at bugs.koha-community.org

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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list