4 == General knowledge ==
6 Evergreen respects the full LoC standards when it comes to the Authority MARC. Authority headings are found in an authority record denoted by the 1XX field. Of which, there should only be one. The "related" bib record depends on the last two characters in the 1XX field.
8 All of the core definitions are here:
16 authority.control_set_authority_field acsaf
17 join authority.heading_field ahf on (ahf.id=acsaf.heading_field)
20 -- And showing all* authority fields (some that do not connect to heading_field)
25 authority.control_set_authority_field
40 | Heading -- Personal Name
44 | Heading -- Corporate Name
48 | Heading -- Meeting Name
52 | Heading -- Uniform Title
56 | Heading -- Topical Term
60 | Heading -- Geographic Name
64 | Heading -- Genre/Form Term
68 | See From Tracing -- Personal Name
72 | See From Tracing -- Corporate Name
76 | See From Tracing -- Meeting Name
80 | See From Tracing -- Uniform Title
84 | See From Tracing -- Topical Term
88 | See From Tracing -- Geographic Name
92 | See From Tracing -- Genre/Form Term
96 | See Also From Tracing -- Personal Name
100 | See Also From Tracing -- Corporate Name
104 | See Also From Tracing -- Meeting Name
108 | See Also From Tracing -- Uniform Title
112 | See Also From Tracing -- Topical Term
116 | See Also From Tracing -- Geographic Name
120 | See Also From Tracing -- Genre/Form Term
127 == Connection to bibs ==
129 Evergreen requires manual linking from bibs to authorities. This can be done from the Bib MARC edit interface. But there is a script that attempts to make some connections automatically (*authority_control_fields.pl*). This script is generally setup to run nightly, linking all of the bibs that were updated for the previous 24 hours.
131 Table *authority.bib_linking* table also retains the connection map.
133 When a connection is made, Evergreen will update the appropriate field in the MARC record (650, 100, etc) to match the Authority record (1XX) field. It will also append the magic *$0* field onto the bib record denoting which authority control record ID is controling that field. This makes it possible for Evergreen to update the controlled field when the authority record gets updated.
135 == Database functions ==
137 === authority.reingest_authority_full_rec ===
139 This function parses *authority.record_entry* and populates *authority.full_rec*.
141 === authority.propagate_changes ===
143 This gets called when an already-existing authority record gets updated. This will speed through all of the linked bibs (*authority.bib_linking* table contains the links) and make sure that the controlled field(s) within the bib record get the field language updated to match the heading from the authority record (1XX field in authority record).
145 === metabib.browse ===
147 Function responsible for returning related authority search results. It's possible for authority records to turn up in search results even without a linked bib.
149 === metabib.staged_browse ===
151 A secondary function that metabib.browse calls. This includes a section for authority record:
153 Excerpt from *metabib.staged_browse* function
163 SELECT INTO unauthorized_entry *
164 FROM metabib.browse_entry_simple_heading_map mbeshm
165 INNER JOIN authority.simple_heading ash ON ( mbeshm.simple_heading = ash.id )
166 INNER JOIN authority.control_set_authority_field acsaf ON ( acsaf.id = ash.atag )
167 JOIN authority.heading_field ahf ON (ahf.id = acsaf.heading_field)
168 WHERE mbeshm.entry = rec.id
169 AND ahf.heading_purpose = 'variant';
176 == Authority integration in search ==
178 As mentioned above, Evergreen will integrate browse search results from Authority control records. Standard search does not include Authority records. The Authority heading 1XX fields are the "main" search results from Authority records. However, the 4XX fields are "variant" fields and are also included as the "See" search result.
180 Search references table: *metabib.browse_entry_simple_heading_map*. This table links to *authority.simple_heading*. *authority.simple_heading* links to *authority.control_set_authority_field* which defines the different authority control fields and their "purpose". Only fields that are defined as "variant" will be included in the "See" results.
183 === Making more authority fields "See" ===
185 As mentioned above, Evergreen has a feature that will cause some search results to give the user a *"See"* result. Giving the user a clue that their search term is "related" or is a *"variant"* of the search results. By default, only the 4XX fields are included for the "See" results. If you would like to add more defined authority record fields in the *"See"* results, you will need to update the definition of the defined field. The database functions: *metabib.browse* and *metabib.staged_browse* have a hard-coded definition of *"variant"*. Your desired fields need to be defined as *"variant"*.
187 Example of adding the "5XX" fields to the "See" search results
194 update authority.heading_field
196 heading_purpose='variant'
202 authority.control_set_authority_field acsaf
203 join authority.heading_field ahf on (ahf.id=acsaf.heading_field)
205 acsaf.tag ~'^5..' and
206 acsaf.tag !='555' and
207 heading_purpose='related'
214 == Subject vs. Author vs. Title vs. Series ==
216 You might notice that when you import/create new authority records, you are not prompted to choose an index. Evergreen "figures out" the search index to which the authority record belongs. It does this based up on the heading field. You'll notice that some authority records have a 1XX field like "150" or "100". The second and third digit "means" which index it's for.
218 Though, I don't think that Evergreen pays much respect to the 008, I think it's worth mentioning.
220 There are some indicators in the 008 field defined by LoC:
222 link:https://www.loc.gov/marc/authority/ad008.html[Library of Congress Auth 008 def]
224 === 008 characters "14", "15", "16" definitions: ===
233 | Heading use-main or added entry
236 | Heading use-subject added entry
239 | Heading use-series added entry
244 === Value definition ===
264 NOTE: Evergreen will choose the destinition index for the authority record index based upon the 1XX heading definition.
266 === Putting Authority records into different indexes ===
268 You might find yourself wanting the Browse Subject index to also include some of the search terms that are found only in the Author index. Or visa versa. The "glue" that puts makes the connection between an index and an Authority heading can be queried like this:
274 acsaf.tag "Authority Tag",acsaf.name,cmf.field_class
276 authority.control_set_bib_field acsbf
277 join authority.control_set_authority_field acsaf on (acsbf.authority_field=acsaf.id)
278 join authority.control_set_bib_field_metabib_field_map acsbfmfm on(acsbfmfm.bib_field=acsbf.id)
279 join config.metabib_field cmf on (cmf.id=acsbfmfm.metabib_field)
285 select b.*,a.id,a.tag,a.name,m.field_class,m.label,m.name,m.id from
286 authority.control_set_bib_field b
287 JOIN authority.control_set_authority_field a ON (b.authority_field = a.id),
288 config.metabib_field m,
289 authority.control_set_bib_field_metabib_field_map map
291 map.bib_field=b.id and
292 map.metabib_field=m.id
298 NOTE: The main connection (glue) table is *authority.control_set_bib_field_metabib_field_map*
300 ==== And now the insert ====
310 -- Traditional AUTHOR getting applied to SUBJECT
311 INSERT INTO authority.control_set_bib_field_metabib_field_map (bib_field, metabib_field)
312 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
313 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
314 WHERE a.tag = '110' AND m.name = 'topic_browse'
318 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
319 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
320 WHERE a.tag = '100' AND m.name = 'topic_browse'
324 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
325 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
326 WHERE a.tag = '111' AND m.name = 'topic_browse'
330 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
331 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
332 WHERE a.tag = '130' AND m.name = 'topic_browse'
336 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
337 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
338 WHERE a.tag = '151' AND m.name = 'topic_browse'
342 -- Traditional SUBJECT getting applied to AUTHOR
343 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
344 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
345 WHERE a.tag = '150' AND m.name = 'corporate'
349 SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
350 FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
351 WHERE a.tag = '130' AND m.name = 'corporate'
359 === Auxillary "axis" table ===
361 Evergreen has another table that makes refernces to "axis" (subject, author, title, topic) but it's not directly for the purpose of browse search results.
366 -- Show axis mappings
367 select abaafm.*,acsaf.tag from
368 authority.browse_axis_authority_field_map abaafm,
369 authority.control_set_authority_field acsaf
371 acsaf.id=abaafm.field
376 It can't hurt to also make the same connections in this table to mirror what you did above.
381 -- Edit axis mappings
384 -- Author headings (110) mapped to "subject"
385 insert into authority.browse_axis_authority_field_map(axis,field)
388 -- Subject headings (150) mapped to "Author"
389 insert into authority.browse_axis_authority_field_map(axis,field)