[Bug 14277] New: Search index 'lex' does not honor MARC indicator "ind1"
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Bug ID: 14277 Summary: Search index 'lex' does not honor MARC indicator "ind1" Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The current definition in etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml for the 'lex' index for lexile scores looks like this: <!--record.abs line 153: melm 521$a lex:n--> <index_subfields tag="521" subfields="a"> <target_index>lex:w</target_index> <target_index>lex:p</target_index> <target_index>lex:n</target_index> </index_subfields> This uses MARC 521 -- "Target Audience Note" as the marc field containing lexile score... however, the contents of the various subfields MARC 521 are dependent on the value of indicator 1, which encodes "audience" Full details can be found at http://www.loc.gov/marc/bibliographic/bd521.html Here are the possible values of indicator 1: 0 - Reading grade level 1 - Interest age level 2 - Interest grade level 3 - Special audience characteristics 4 - Motivation/interest level 8 - No display constant generated Lexile score would be encoded under indicator 8. Trying to index other indicators as "lex" will create indexes which are inconsistent at best, and which may return incorrect search results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|gmcharlt@gmail.com |barton@bywatersolutions.com Status|NEW |ASSIGNED CC| |nengard@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Depends on| |14217 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14217 [Bug 14217] Add a DOM syntax for specifying conditions on indexes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Nicole Engard (ByWater) <nicole@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nicole@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 jdemuth@roseville.ca.us <jdemuth@roseville.ca.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jdemuth@roseville.ca.us -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 --- Comment #1 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 45783 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45783&action=edit Bug 14277 add zebra indexes for lexile that respect 521 indicator 1. Added the following indexes: Interest-age-level | 591$a ind1=1 Interest-grade-level | 591$a ind1=2 lexile-number | 591$a ind1=8 Reading-grade-level | 591$a ind1=0 Moved 'lex' from a zebra index to a ccl alias to lexile-number. Changed the handling of st-numeric in C4/Search.pm to allow for search ranges. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Needs Signoff |Failed QA --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Please provide a test plan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 --- Comment #3 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 46002 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46002&action=edit Test data containing 521 8 $b Lexile $a 530 Test data. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46002|0 |1 is obsolete| | --- Comment #4 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 46005 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46005&action=edit Test data Query for test data: select biblionumber, title, ExtractValue( marcxml, '//datafield[@tag=521][@ind1=0]/subfield[@code="a"]' ) as 'Reading grade level', ExtractValue( marcxml, '//datafield[@tag=521][@ind1=1]/subfield[@code="a"]' ) as 'Interest age level', ExtractValue( marcxml, '//datafield[@tag=521][@ind1=2]/subfield[@code="a"]' ) as 'Interest grade level', ExtractValue( marcxml, '//datafield[@tag=521][@ind1=8]/subfield[@code="a"]' ) as 'Lexile number' from biblioitems inner join biblio using (biblionumber) where biblionumber in ( 86147 , 88090 , 89886 , 90198 , 90669 , 221316 , 221317 , 221318 , 221319 , 221320 ) +--------------+--------------------------+---------------------+--------------------+----------------------+----------------+ | biblionumber | title | Reading grade level | Interest age level | Interest grade level | Lexile number | +--------------+--------------------------+---------------------+--------------------+----------------------+----------------+ | 86147 | Laura Ingalls Wilder | 5.0 4. 6.1 | 7-11. | 5-8 2-6. | Lexile 780 780 | | 88090 | Poppleton forever | 1. | 4-7. | P-3. | Lexile 410 410 | | 89886 | The music of dolphins | 6. | 11-13. | 5-9. | 560 | | 90198 | Worth | 4.5. | 9-12. | 4-7. | T 830 | | 90669 | Monday with a mad genius | 3.8. | 6-9. | 1-4. | 590 590 | | 221316 | Persian cats / | 0.5. | 4-8. | K-3 0-2. | 580 | | 221317 | Maine coon cats / | 0.5. | 4-8. | K-3 0-2. | 600 | | 221318 | Calico cats / | 0.5. | 4-8. | K-3 0-2. | 510 | | 221319 | Scottish fold cats / | 0.5. | 4-8. | K-3 0-2. | 550 | | 221320 | Siamese cats / | 0.5. | 4-8. | K-3 0-2. | 480 | +--------------+--------------------------+---------------------+--------------------+----------------------+----------------+ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Barton Chittenden <barton@bywatersolutions.com> --- == TO TEST == Set-up: Add the following branch codes: CES, EBE, PSM, SES, TCE, UES. Add itemtype BOOK Import data from attachment 46005. Re-index, search for 'title Laura Ingalls Wilder'. This should return biblionumber 86147. Add the following to intranetuserjs $(document).ready(function(){ //add lexile to search pull downs $("select[name='idx']").append("<option value='lexile-number,st-numeric'>Lexile score (e.g. 600 or 550-650 )</option>"); $("select[name='idx']").append("<option value='Interest-age-level,wrdl'>Interest Age Level</option>"); $("select[name='idx']").append("<option value='Interest-grade-level,wrdl'>Interest Grade Level</option>"); $("select[name='idx']").append("<option value='Reading-grade-level,wrdl'>+Reading Grade Level</option>"); }); Test plan: 1/ Go to advanced search, select 'Lexile score'. Search for 600 . Search will fail 2/ Go to advanced search, select 'Lexile score'. Search for 500-599 . Search will fail 3/ Go to advanced search, select 'Reading grade level'. Search for 1 . Search will fail 4/ Go to advanced search, select 'Interest age level'. Search for 4-8 . Search will fail 5/ Go to advanced search, select 'Interest grade level'. Search for 1-4 . Search will fail 6/ Apply patch. 7/ Go to advanced search, select 'Lexile score'. Search for 600 . Search will return Title: 'Maine coon cats' 8/ Go to advanced search, select 'Lexile score'. Search for 500-599 . Search will return Title: 'The music of dolphins', 'Monday with a mad genius', 'Persian cats', 'Calico cats', ' Scottish fold cats' 9/ Go to advanced search, select 'Reading grade level'. Search for 1 . Search will return Title: 'Poppleton forever' 10/ Go to advanced search, select 'Interest age level'. Search for 4-8 . Search will return Title: 'Maine coon cats', 'Siamese cats', 'Persian cats', 'Calico cats', 'Scottish fold cats' 11/ Go to advanced search, select 'Interest grade level'. Search for 1-4 . Search will return Title: 'Monday with a mad genius' -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45783|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 46098 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46098&action=edit Bug 14277 add zebra indexes for lexile that respect 521 indicator 1. Added the following indexes: Interest-age-level | 591$a ind1=1 Interest-grade-level | 591$a ind1=2 lexile-number | 591$a ind1=8 Reading-grade-level | 591$a ind1=0 Moved 'lex' from a zebra index to a ccl alias to lexile-number. Changed the handling of st-numeric in C4/Search.pm to allow for search ranges. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14277 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Internal sign-off - still needs community sign-off -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org