[Koha] Mapping MARC21 to Advanced Search
Rubén Fernández Asensio
enseikou at gmail.com
Sun Aug 19 07:10:02 NZST 2018
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
El 14/08/18 a les 15:48, Barton Chittenden ha escrit:
>
>
> On Mon, Aug 13, 2018 at 9:52 AM, Caroline Cyr-La-Rose
> <caroline.cyr-la-rose at inlibro.com
> <mailto:caroline.cyr-la-rose at inlibro.com>> wrote:
>
> 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
> <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>
>
> (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
More information about the Koha
mailing list