Skip to content

Subject Fields Index and Display

Ruth edited this page Mar 3, 2022 · 31 revisions

Subjects are a complex problem because they come from a variety of sources, may involve a variety of layouts, and have quite a few meanings. We will want to achieve the following things in search/display of subjects:

  • Searching subjects:
    • When someone keyword searches a term which appears in a subject, records with that subject will appear.
    • Subject-field searches return results with both a full or partial match. e.g. Quilt in subject search field would return records with Quiltmakers and those with NAMES Project AIDS Memorial Quilt (and others). On the other hand a subject search of African American quiltmakers would return only records which had all those words in subject, hence just ones with subject African American quiltmakers.
  • Displaying subjects:
    • Subjects are displayed with an em dash "—" including subfields v, x, y, and z, e.g. a| Aesthetics x| History. becomes Aesthetics—History.
    • Subjects are linked to a search for that subject. Behavior similar to Princeton where one can click History in the above example to see all Aesthetics—History and Aesthetics to see just Aesthetics. Each subsection links to progressively smaller search.
    • Clicking on a subject in display would take the user to the exact search for that subject (faceted search w/o sidebar facet display).

Subject Fields

Of note, while indicators do mean things on each field, they're listed as n/a below if we're not using them for now. Similarly, 650 has more indicators which we're not likely to be using.

MARC field indicator subfields description
600 n/a abcdfklmnopqrtvxyz person's name as a subject, e.g. a book about Assata Shakur vs. by Assata Shakur
610 n/a abfklmnoprstvxyz corporate name as a subject
611 n/a abcdefgklnpqstvxyz meeting name as a subject
630 n/a adfgklmnoprstvxyz uniform title as a subject
647 n/a acdgvxyz named event, e.g. Eruption of Mount St. Helen's (not its actual name)
648 n/a avxyz chronological term as a subject
650 *0 abcdvxyz Library of Congress subject heading
650 *1 abcdvxyz Library of Congress heading for children's literature
650 *2 abcdvxyz Medical subject heading
650 *3 abcdvxyz National Agricultural Library subject
650 *7 abcdvxyz Other subject, with source specified in subfield 2
651 n/a avxyz geographical name as a subject
653 n/a a uncontrolled index term (index only)
654 n/a abvyz topical subject from a faceted vocab (index only)
  • All subject fields listed above should be used in search. (See Subject Fields for Keyword Search)
  • All indexed subject fields should be included in a Subject search on both the main search dropdown (See Subject Search) and Advanced search page. (See Subjects in Advanced Search)
  • For 655, see Genres.
  • Depending on data quality, we may end up making decisions to either include or exclude certain 650|*7| fields depending on their subfield 2.

Subject Search

  • Unstemmed Subject Facet
    • subject_topic_unstem_search
  • Unstemmed Primary Subjects
    • subject_unstem_search
  • Primary Subjects
    • subject_tsim - 600abcdfklmnopqrtvxyz:610abfklmnoprstvxyz:611abcdefgklnpqstvxyz:630adfgklmnoprstvxyz:647acdg:648a:650abcd:651a:653a:654ab
  • Subject Facet subject_topic_facet_ssim - 650|*0|aa:650|*0|x:650|*1|aa:650|*1|x:651|*0|a:651|*0|x:600abcdtq:610abt:610x:611abt:611x
  • Unstemmed Additional Subjects
    • subject_addl_unstem_search
  • Additional Subjects
    • subject_addl_tsim - 600vxyz:610vxyz:611vxyz:630vxyz:647vxyz:648vxyz:650vxyz:651vxyz:654vyz

Subject Fields for Keyword Search

Same fields and mappings with Subject Search.

Subjects in Advanced Search

Depending on user feedback, we may create limited options in Advanced search for searching by: LCSH, MeSH, Ag, and possibly Children's headings individually. Use cases would be that LCSH are the core canonical subjects for most resources, MeSH would help the medical librarians narrow down their resources, Ag would support our various ag resources, and children's headings have a completely different focus and would assist the education librarians. That said, we'll start with full Subject search and see how people find it.

Subject Facet

  • Subject - 650|*0|aa:650|*0|x:650|*1|aa:650|*1|x:651|*0|a:651|*0|x:600abcdtq:610abt:610x:611abt:611x

Subject Display

Subjects are grouped under the overall label Subject and then ordered in display as follows:

  • LCSH display: 650|*0|abcdvxyz
  • MeSH display: 650|*2|abcdvxyz
  • LC Children's display: 650|*1|abcdvxyz
  • Other subjects display: 650|*3|abcdvxyz:650|*6|abcdvxyz:650|*7|abcdvxyz:600abcdfklmnopqrtvxyz:610abfklmnoprstvxyz:611abcdefgklnpqstvxyz:630adfgklmnoprstvxyz:647acdgvxyz:648avxyz:651avxyz

Subjects are indexed as text with a separator replacing v, x, y, and z and creates a hierarchical split for links to search where clicking on History in Aesthetics—History takes you to a search for the full term but Aesthetics is just linked to Aesthetics.

Uncontrolled Subject Display (updated 2022-03-03)

The 653 is an uncontrolled subject field, which means it doesn't behave in hierarchic ways and wouldn't be included in browse. Display 653a, labeled as "Other subjects" in a section below the rest of the subject fields. Link to a general subject search for that text in quotation marks. Example, if the text value was "Children's toys" the link would be to: https://catalog.libraries.psu.edu/?search_field=subject&q=%22Children%27s+toys%22

Subject Browse (updated 2021-08-26)

Because the regular subject_facet allows for all kinds of subject-type fields and they don't belong well together in an ordered list, we're going to limit our subjects to "topic" (long story how topic is a subset of subject). The facet is mostly simple but we'll want to add one set of PSU-specific subjects to it, which will require a test (650|*7| can be a lot of different kinds of subjects and they're specified in subfield 2). It's supposed to be PSt, but since typoes happne, we'll be safer downcasing it to catch any edge cases.

For subject browse facet (subject_browse_facet?), index:

650|*0|abcdgvxyz:650|*1|abcdgvxyz:650|*3|abcdgvxyz:650|*3|abcdgvxyz

ALSO

IF '650|*7|2'.downcase == 'pst' THEN index 650|*7|abcdgvxyz

Sample catkeys for the pst test: 713144, 15419115, 29252939

Clone this wiki locally