Bug 7586 - Search: Language restriction does NOT show expected results (no items shown)
Summary: Search: Language restriction does NOT show expected results (no items shown)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal (vote)
Target Milestone: ---
Assignee: Marc Véron
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 16:26 UTC by Marc Véron
Modified: 2013-12-05 20:05 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7586 - Search: Language restriction does NOT show expected results (no items shown) (1.89 KB, patch)
2012-06-08 11:43 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 7586 - Search: Language restriction does NOT show expected results (no items shown) (1.90 KB, patch)
2012-06-09 05:15 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2012-02-23 16:26:11 UTC
Description:
------------

We have records with the language set to German in field 008 Range 35-37

The Opac search does not find the items if the languages is restricted to German in the drop down box.

The bug can be reproduced as well with a keyword search:
ln:ger

Solution:
---------
as adviced by jcamins on the Koha channel (Thanks!):

open up etc/zebradb/marc_defs/marc21/biblio/record.abs
Look for the 008 line.
You should see ln somewhere on it.
I theorize that it's back to a numeric index.
It'll look something like ln(xx,yy):n if I'm right.
If I'm wrong, there will be a :w instead of :n

We found: lm:n:range(data,35,3)

jcamins: Needs to be ln:w:range(data,35,3)

We changed it and did:

koha-rebuild-zebra --full

After the rebuild the German records are found as expected.
Comment 1 Marc Véron 2012-06-08 11:43:19 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-06-09 05:15:26 UTC
Created attachment 9989 [details] [review]
Bug 7586 - Search: Language restriction does NOT show expected results (no items shown)

modified:   etc/zebradb/marc_defs/marc21/biblios/record.abs

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 3 Marcel de Rooy 2012-06-09 09:34:06 UTC
QA Comment:
Good catch, Marc.
Simple but effective change. Looks good.
Passed QA

Note: I am lowering the priority. This is not that critical ;)
Comment 4 Paul Poulain 2012-06-10 09:00:00 UTC
QA comment: really tiny patch, that just move ln:n:range(data,35,3) to ln:w:range(data,35,3) in a very long line.

passed QA
Comment 5 Paul Poulain 2012-06-10 09:02:00 UTC
Not a so minor bugfix, worth porting to 3.8.x (and be announced in the release notes, as it requires a copy of .abs file and full reindexing
Comment 6 Paul Poulain 2012-06-10 09:05:48 UTC
IMPORTANT NOTICE:
Yesterday, I pushed the DOM indexing patch, that replaces, for new setup, record.abs to biblio-koha-indexdef.xml

If I'm not wrong, the patch must also be ported here:
  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="35" length="3">
    <target_index>ln:n</target_index>

=> it should be
  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="35" length="3">
    <target_index>ln:w</target_index>

isn't it ?
Comment 7 Jared Camins-Esakov 2012-12-31 01:04:41 UTC
There have been no further reports of problems so I am marking this bug resolved.