Discussion:
[Koha] Mapping MARC21 to Advanced Search
Rubén Fernández Asensio
2018-08-12 19:52:11 UTC
Permalink
Hello all,
I'm trying to plan the cataloguing requirements for our Esperanto
library, and since we don't have to follow any other library's
standards, we don't want to type more that strictly needed. My goal is
cataloguing according to the information our own users will be able to
retrieve from the Koha OPAC, no more, no less.

However, the mapping of MARC21 fields to Advanced Search Options seems
to be undocumented.

For example, what field is used to search by language or publisher
location? Why the "Content" option doesn't match character 33 of field
008? In the search field, what's the exact meaning of "Subject and
broader terms", "Subject and narrower terms", "Subject and related
terms", and "Curriculum"? Where are you supposed to input that when
cataloguing?

Sorry if my questions are naive, I'm just an amateur sysad and amateur
librarian working in my spare time for a nonprofit.

Rubén Fernández
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/l
Caroline Cyr-La-Rose
2018-08-13 13:52:16 UTC
Permalink
Hi Rubén!

In the manual, there is a kind of mapping section for searches that
gives you the indexes for each marc field:
https://koha-community.org/manual/18.05/en/html/searching.html#koha-search-indexes

If you want to know what index is used for each search limit, you can
make a search in Koha and look in the breadcrumbs for "Search for
'...'". This will give you the index used for the search. For example,
if I search with Danish in the language limit, it returns 'ln,rtrn:dan'.
According to the manual, the 'ln' index is mapped to 008, position
35-37, and 041.

I hope this helps.

Maybe it could be more explicit in the manual. I will look into that!

Caroline


Caroline Cyr La Rose, M.S.I.
Bibl. prof. / Chargée de la formation et du soutien

Tél.  : 1 (833) 465-4276
caroline.cyr-la-***@inLibro.com <mailto:caroline.cyr-la-***@inLibro.com>

inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Post by Rubén Fernández Asensio
Hello all,
I'm trying to plan the cataloguing requirements for our Esperanto
library, and since we don't have to follow any other library's
standards, we don't want to type more that strictly needed. My goal is
cataloguing according to the information our own users will be able to
retrieve from the Koha OPAC, no more, no less.
However, the mapping of MARC21 fields to Advanced Search Options seems
to be undocumented.
For example, what field is used to search by language or publisher
location? Why the "Content" option doesn't match character 33 of field
008? In the search field, what's the exact meaning of "Subject and
broader terms", "Subject and narrower terms", "Subject and related
terms", and "Curriculum"? Where are you supposed to input that when
cataloguing?
Sorry if my questions are naive, I'm just an amateur sysad and amateur
librarian working in my spare time for a nonprofit.
Rubén Fernández
_______________________________________________
Koha mailing list  http://koha-community.org
https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://lists.kati
Barton Chittenden
2018-08-14 13:48:18 UTC
Permalink
On Mon, Aug 13, 2018 at 9:52 AM, Caroline Cyr-La-Rose <
In the manual, there is a kind of mapping section for searches that gives
you the indexes for each marc field: https://koha-community.org/man
ual/18.05/en/html/searching.html#koha-search-indexes
If you want to see where the actual mapping between marc tags and zebra
index definitions occurs, take a look at the *-koha-indexdefs.xml files.

./normarc/biblios/biblio-koha-indexdefs.xml
./marc21/authorities/authority-koha-indexdefs.xml
./marc21/biblios/biblio-koha-indexdefs.xml
./unimarc/authorities/authority-koha-indexdefs.xml
./unimarc/biblios/biblio-koha-indexdefs.xml

Here's a snippit of biblio-koha-indexdefs.xml for marc21 -- 245$a has the
zebra indexes Title-cover:w, Title-cover:p, Title-cover:s, Title:w
and Title:p.

The part after the colon is the index type - w for 'word', p for 'phrase'
and ... I'm not sure what s is (my guess is 'exact *S*tring').

<index_subfields tag="245" subfields="a">
<target_index>Title-cover:w</target_index>
<target_index>Title-cover:p</target_index>
<target_index>Title-cover:s</target_index>
<target_index>Title:w</target_index>
<target_index>Title:p</target_index>
</index_subfields>
<!--record.abs line 114: melm 245$c
Author,Author-in-order:w,Author-in-order:p,Author-in-order:s-->
<index_subfields tag="245" subfields="c">
<target_index>Author:w</target_index>
<target_index>Author-in-order:w</target_index>
<target_index>Author-in-order:p</target_index>
<target_index>Author-in-order:s</target_index>
</index_subfields>

(Here's a link to that file in the koha git repository:
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml;h=b3b12a0e2b12239c35a671325407a73e5db364e9;hb=HEAD
)

That's only half of the story, because Koha doesn't use the raw zebra
indexes... it actually uses the ccl.properties file for the indexes that
you see in the url... for instance, here's the entry in ccl.properties for
'author':

Author 1=1003 s=pw
au Author

The first line has the zebra index definition as well as the bib-1
attribute (used in z39.50). The second line is creating the alias 'au' for
Author.

so, when you look at the url for an author search, you'll see something
like idx=au,phr

... to trace that back to the indexdefs, you would look up "au" and "phr"
in ccl.properties, find the zebra index name there, and then back up to
the indexdefs.xml file.

That's not the whole story, but it's enough for most cases.

--Barton
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://lists.katipo.c
Barton Chittenden
2018-08-14 13:53:39 UTC
Permalink
Oh, I meant to give a link to the ccl.properties in github as well:
http://git.koha-community.org/gitweb/?p=koha.git;a=blob_plain;f=etc/zebradb/ccl.properties;h=a1ea690c43ef347ebfdd409c51299bdb9cf32777;hb=HEAD

On Tue, Aug 14, 2018 at 9:48 AM, Barton Chittenden <
Post by Barton Chittenden
On Mon, Aug 13, 2018 at 9:52 AM, Caroline Cyr-La-Rose <
In the manual, there is a kind of mapping section for searches that gives
you the indexes for each marc field: https://koha-community.org/man
ual/18.05/en/html/searching.html#koha-search-indexes
If you want to see where the actual mapping between marc tags and zebra
index definitions occurs, take a look at the *-koha-indexdefs.xml files.
./normarc/biblios/biblio-koha-indexdefs.xml
./marc21/authorities/authority-koha-indexdefs.xml
./marc21/biblios/biblio-koha-indexdefs.xml
./unimarc/authorities/authority-koha-indexdefs.xml
./unimarc/biblios/biblio-koha-indexdefs.xml
Here's a snippit of biblio-koha-indexdefs.xml for marc21 -- 245$a has the
zebra indexes Title-cover:w, Title-cover:p, Title-cover:s, Title:w
and Title:p.
The part after the colon is the index type - w for 'word', p for 'phrase'
and ... I'm not sure what s is (my guess is 'exact *S*tring').
<index_subfields tag="245" subfields="a">
<target_index>Title-cover:w</target_index>
<target_index>Title-cover:p</target_index>
<target_index>Title-cover:s</target_index>
<target_index>Title:w</target_index>
<target_index>Title:p</target_index>
</index_subfields>
<!--record.abs line 114: melm 245$c Author,Author-in-order:w,
Author-in-order:p,Author-in-order:s-->
<index_subfields tag="245" subfields="c">
<target_index>Author:w</target_index>
<target_index>Author-in-order:w</target_index>
<target_index>Author-in-order:p</target_index>
<target_index>Author-in-order:s</target_index>
</index_subfields>
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml;h=
b3b12a0e2b12239c35a671325407a73e5db364e9;hb=HEAD)
That's only half of the story, because Koha doesn't use the raw zebra
indexes... it actually uses the ccl.properties file for the indexes that
you see in the url... for instance, here's the entry in ccl.properties for
Author 1=1003 s=pw
au Author
The first line has the zebra index definition as well as the bib-1
attribute (used in z39.50). The second line is creating the alias 'au' for
Author.
so, when you look at the url for an author search, you'll see something
like idx=au,phr
... to trace that back to the indexdefs, you would look up "au" and "phr"
in ccl.properties, find the zebra index name there, and then back up to
the indexdefs.xml file.
That's not the whole story, but it's enough for most cases.
--Barton
Rubén Fernández Asensio
2018-08-18 19:10:02 UTC
Permalink
Thanks a lot for the hints!
As for language search, it turns out that its value is defined in the
file /etc/koha/zebradb/ccl.properties thusly:

#Use Value Definition USMARC tag(s)
#-------------------- ----- ------------------------------
------------------
#
#Code-language 54 A code that indicates the 008/35-37, 041
# language of the item.
# The codes are defined by the
# target.
language 1=54
ln language

I experimented a bit and found that it is taken from field 008(35-37),
but when set by field 041$a that value is overriden.

Also, it seems I can customize the Advance Search interface by editing
file
/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt,
and add a search for original language there.

Rubén
Post by Barton Chittenden
On Mon, Aug 13, 2018 at 9:52 AM, Caroline Cyr-La-Rose
In the manual, there is a kind of mapping section for searches that
https://koha-community.org/manual/18.05/en/html/searching.html#koha-search-indexes
<https://koha-community.org/manual/18.05/en/html/searching.html#koha-search-indexes>
 If you want to see where the actual mapping between marc tags and
zebra index definitions occurs, take a look at the *-koha-indexdefs.xml
files.
./normarc/biblios/biblio-koha-indexdefs.xml
./marc21/authorities/authority-koha-indexdefs.xml
./marc21/biblios/biblio-koha-indexdefs.xml
./unimarc/authorities/authority-koha-indexdefs.xml
./unimarc/biblios/biblio-koha-indexdefs.xml
Here's a snippit of biblio-koha-indexdefs.xml for marc21 -- 245$a has
the zebra indexes Title-cover:w, Title-cover:p, Title-cover:s, Title:w
and Title:p.
The part after the colon is the index type - w for 'word', p for
'phrase' and ... I'm not sure what s is (my guess is 'exact *S*tring').
  <index_subfields tag="245" subfields="a">
    <target_index>Title-cover:w</target_index>
    <target_index>Title-cover:p</target_index>
    <target_index>Title-cover:s</target_index>
    <target_index>Title:w</target_index>
    <target_index>Title:p</target_index>
  </index_subfields>
  <!--record.abs line 114: melm 245$c
Author,Author-in-order:w,Author-in-order:p,Author-in-order:s-->
  <index_subfields tag="245" subfields="c">
    <target_index>Author:w</target_index>
    <target_index>Author-in-order:w</target_index>
    <target_index>Author-in-order:p</target_index>
    <target_index>Author-in-order:s</target_index>
  </index_subfields>
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml;h=b3b12a0e2b12239c35a671325407a73e5db364e9;hb=HEAD)
That's only half of the story, because Koha doesn't use the raw zebra
indexes... it actually uses the ccl.properties file for the indexes that
you see in the url... for instance, here's the entry in ccl.properties
Author 1=1003 s=pw
au Author
The first line has the zebra index definition as well as the bib-1
attribute (used in z39.50). The second line is creating the alias 'au'
for Author.
so, when you look at the url for an author search, you'll see something
like idx=au,phr
... to trace that back to the indexdefs, you would look up "au" and
"phr" in ccl.properties, find the zebra index name there, and then back
up to the indexdefs.xml file.
That's not the whole story, but it's enough for most cases.
--Barton
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.c

Loading...