Bug 9552

Summary: BIB1 Relation "Greater Than" Attribute Not Mapped Properly in CCL.Properties
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: chris, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9552 - BIB1 Relation "Greater Than" Attribute Not Mapped Properly in CCL.Properties
Bug 9552 - BIB1 Relation "Greater Than" Attribute Not Mapped Properly in CCL.Properties
Bug 9552 - BIB1 Relation "Greater Than" Attribute Not Mapped Properly in CCL.Properties

Description David Cook 2013-02-06 02:20:59 UTC
Currently, you can use "lt,le,eq,ge" in your CCL query to handle "lesser than, lesser or equal to, equal to, greater than or equal to" relationships. 

The only one missing is "gt" (Bib1 2=5). 

The mappings are also off "ne, phonetic, stem", but those are Bib1 attributes that Zebra doesn't support, so that's not really relevant.
Comment 1 David Cook 2013-02-06 03:24:43 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2013-02-06 06:42:20 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-06 13:47:42 UTC
QA comment:

Good catch David!

The patch works great and fixes 4 ccl relation values : gt, ne, stem and phonetic (http://www.indexdata.com/zebra/doc/querymodel-rpn.html)

Marked as Passed QA.
Comment 4 Jonathan Druart 2013-02-06 13:48:24 UTC
Created attachment 15094 [details] [review]
Bug 9552 - BIB1 Relation "Greater Than" Attribute Not Mapped Properly in CCL.Properties

Currently, you can use "lt,le,eq,ge" in your CCL query to handle
"lesser than, lesser or equal to, equal to, greater than or equal
to" relationships.

The only one missing is "gt" (Bib1 2=5).

The mappings are also off "ne, phonetic, stem", but those are Bib1
attributes that Zebra doesn't support, so that's not really relevant.

To test:

[1] Before applying the patch, try the following query in the OPAC:

pubdate,gt:2006

You should get "no results found".

[2] After applying the patch (and note that ccl.properties will usually
need to be installed in the run-time Zebra configuration directory), try
the same search.  This time, you could get back the titles whose publication
date is after 2006.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jared Camins-Esakov 2013-02-07 05:22:10 UTC
This patch has been pushed to master.
Comment 6 Chris Cormack 2013-02-08 23:42:41 UTC
Pushed to 3.10,x and 3.8.x will be in 3.10.3 and 3.8.10
Comment 7 David Cook 2013-02-12 04:43:09 UTC
It's worth pointing out that many of these Bib-1 Relation Attributes won't work for you if you're using ICU indexing.

Apparently, there is due to a known bug in Zebra. For more details, consult the following link:

http://lists.indexdata.dk/pipermail/zebralist/2009-April/002190.html