MRenvoize/Editing record.abs

From Koha Wiki
Jump to navigation Jump to search

Koha's record.abs is a complicated file to update.

It takes the form:

melm 245$a      Title-cover:w,Title-cover:p,Title-cover:s,Title:w,Title:p,Title:s
melm 245$c      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s
melm 245$d      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s
melm 245$e      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s
melm 245$9      Cross-Reference:w,Koha-Auth-Number
melm 245        Title:w,Title:p

Lets identify the parts!

  • melm 245$a -> This is the Marc Tag we are working with... more specific (i.e melm 245$a) should come above less specific (i.e melm 245) in the file.
  • Title-cover -> This is the zebra index name the field should be indexed under. It should appear as a comma delimited list of Indexes for which you wish the element to appear within.
  • :w -> This is the zebra index type associated with the index name you want your marc field to be indexed in. (:w = Word, :p = Phrase, :s = String, :n = Number, default = Phrase)

Specifics

Default rules: You can assign a 'default' rule for an entire Marc Tag (i.e. melm 245). However, the default is overridden by more specific rules!

Example

Lets go through the above example line by line (starting at the bottom first).

melm 245        Title:w,Title:p

Default Rule: All Subfields of Marc Tag 245 are added to the Title:w and Title:p Zebra Search Indexes.

melm 245$9      Cross-Reference:w,Koha-Auth-Number

Specific Rule: This overrides the default rule! It removes subfield $9 from Title:w and Title:p Zebra Search Indexes, and adds subfield $9 to Cross-Reference:w and Koha-Auth-Number Zebra Search Indexes instead!

melm 245$c      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s
melm 245$d      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s
melm 245$e      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s

Specific Rules: These rules override the default rule! They remove subfields $e, $d and $c from the Title:w and Title:p Zebra Search Indexes, and add them instead to Author, Author-in-order:w, Autohr-in-order:p and Author-in-order:s Zebra Search Indexes instead!

melm 245$a      Title-cover:w,Title-cover:p,Title-cover:s,Title:w,Title:p,Title:s

Specific Rules: This rule overrides the default rule! It remove subfield $a from the Title:w and Title:p Zebra Search Indexes, and adds it instead to Title-cover:w,Title-cover:p,Title-cover:s,Title:w,Title:p and Title:s Zebra Search Indexes instead!

So what's the overall result of the above declarations: