[Koha-devel] Searching numeric ranges

Barton Chittenden barton at bywatersolutions.com
Thu Nov 5 17:47:16 CET 2015


I am working on searching lexile number ranges.

ccl.properties shows

    lex 1=9903 r=r

The 'r=r' bit means that I should be able to search using a numeric range
separated by a dash, e.g.

   500-600

Should return any numeric results from 500 to 600.

The following query works:

   cgi-bin/koha/catalogue/search.pl?q=ccl%3Dlex%2Cst-numeric%3D500-600

However, when I try adding that as an item in the search menu, as follows:

    $(document).ready(function(){

        //add lexile to search pull downs
        $("select[name='idx']").append("<option
value='lex,st-numeric'>Lexile (e.g. 600 or 550-650 )</option>");

    });

That gets munged... the url reads

    cgi-bin/koha/catalogue/search.pl?idx=lex%2Cst-numeric&q=500-600


And I get the following message:

    No results found
    No results match your search for 'lex,st-numeric: 500-600'.

--Barton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20151105/47a9f4bf/attachment.html>


More information about the Koha-devel mailing list