Bug 5295 - ctype index Zebra configuration
Summary: ctype index Zebra configuration
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-08 09:37 UTC by Fridolin Somers
Modified: 2016-10-04 16:11 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed patch (875 bytes, patch)
2010-10-08 09:37 UTC, Fridolin Somers
Details | Diff | Splinter Review
Proposed patch (updated) (864 bytes, patch)
2012-02-13 08:57 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 5295 : ctype index Zebra configuration (1.33 KB, patch)
2012-05-19 09:49 UTC, Chris Cormack
Details | Diff | Splinter Review
[Signed-off] Bug 5295 : ctype index Zebra configuration (1.40 KB, patch)
2012-06-11 10:47 UTC, Alex Arnaud
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2010-10-08 09:37:04 UTC
Hie,

Advanced search on "content type" (Zebra index "ctype" corresponding to index "Content-type") doesn't work. Index is unknown.
Index "Content-type" is used in records.abs (unimarc) : 

melm 110$a     Type-Of-Serial:w:range(data,0,1),Frequency-code:w:range(data,1,1),Regularity-code:w:range(data,2,1),Content-type:w:range(data,3,1),Content-type:w:range(data,4,3),...

First, in etc/zebradb/biblios/etc/bib1.att :
ctype is declared as index 1034, it should be "Content-type".

Second, in etc/zebradb/ccl.properties : Content-type 1=1034 t=b
Why "t=b"? It means right and left truncation.
Content type is a single letter ('a' to 'z'), it doesn't need truncation.

Regards.
Comment 1 Fridolin Somers 2010-10-08 09:37:56 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2012-02-13 08:57:38 UTC Comment hidden (obsolete)
Comment 3 Jared Camins-Esakov 2012-05-13 11:33:37 UTC
Fridolyn,

Could you please resubmit this as a git patch?
Comment 4 Chris Cormack 2012-05-19 09:49:47 UTC Comment hidden (obsolete)
Comment 5 Alex Arnaud 2012-06-11 10:46:48 UTC
Tiny patch. Tested searches on Content-type and it works. So signing off
Comment 6 Alex Arnaud 2012-06-11 10:47:37 UTC
Created attachment 10175 [details] [review]
[Signed-off] Bug 5295 : ctype index Zebra configuration

Patch submitted originally by Fridolyn SOMERS

Reformatted as a git patch

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 7 Ian Walls 2012-06-15 14:46:46 UTC
Replaces bib1.att ctype with Content-type, which is the correct index according to external sources, as well as ccl.properties.  Marking Passed QA.
Comment 8 Paul Poulain 2012-06-20 08:37:24 UTC
mmm... greping ctype, I see that there are a lot of references still here:
etc/zebradb/ccl.properties:ctype Content-type
etc/zebradb/marc_defs/normarc/biblios/record.abs:melm 008        date-entered-on-file:n:range(data,0,5),date-enter
ed-on-file:s:range(data,0,5),pubdate:w:range(data,7,4),pubdate:n:range(data,7,4),pubdate:y:range(data,7,4),pubdate
:s:range(data,7,4),pl:w:range(data,15,3),ta:w:range(data,22,1),ff8-23:w:range(data,23,1),ff8-29:w:range(data,29,1)
,lf:w:range(data,33,1),bio:w:range(data,34,1),ln:n:range(data,35,3),ctype:w:range(data,24,4),Record-source:w:range
(data,39,0)
etc/zebradb/marc_defs/marc21/biblios/record.abs:melm 008        date-entered-on-file:n:range(data,0,5),date-entere
d-on-file:s:range(data,0,5),pubdate:w:range(data,7,4),pubdate:n:range(data,7,4),pubdate:y:range(data,7,4),pubdate:
s:range(data,7,4),pl:w:range(data,15,3),ta:w:range(data,22,1),ff8-23:w:range(data,23,1),ff8-29:w:range(data,29,1),
lf:w:range(data,33,1),bio:w:range(data,34,1),ln:w:range(data,35,3),ctype:w:range(data,24,4),Record-source:w:range(
data,39,0)

COULD SOMEONE USING MARC21 confirm that this patch does not break marc21 ? I've some doubts...
Comment 9 Fridolin Somers 2012-06-20 12:41:03 UTC
I think indeed MARC21 will be broken because it uses ctype in record.abs.

By now, "ctype" works for MARC21 but it's a best pratice to use long names in configuration and short names only in CCL queries, no?

Can we replace "ctype" by "Content-type" for all record.abs ?
Comment 10 Marcel de Rooy 2012-06-21 10:38:59 UTC
(In reply to comment #9)
> Can we replace "ctype" by "Content-type" for all record.abs ?
Yes, you should, if you rename it in bib1.att. The patch at this moment will raise the warning: [warn] Index 'ctype' not found in attset(s). Nothing will be found anymore with ctype=...

Changing status to reflect need for adjustment.

Furthermore, you remove "t=b" (right and left truncation). I think that is okay (at least for left truncation). But note that this field is NOT a single letter. Actually, it contains (in MARC21) four characters. But they should be taken as four separate letters. That is currently a problem in Zebra; e.g. if I enter abc in Content-type, I cannot find this record when searching for ctype=b. In the correct interpretation of this marc field, I would like to find it when searching for a, b or c. Probably, this problem is outside the scope of your report.
Comment 11 Fridolin Somers 2012-06-21 12:38:59 UTC
> M. de Rooy : Furthermore, you remove "t=b" (right and left truncation)
I agree with you.

But I think truncation should not be implicit.
You can add truncation in query search.
Or create a second index CCL that contains truncation.
ie : Content-type-truncated 1=1034 t=b
Comment 12 Marc Véron 2016-10-04 16:11:27 UTC
Still valid?