Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LCSH detector #113

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Add LCSH detector #113

merged 2 commits into from
Oct 4, 2024

Commits on Oct 4, 2024

  1. Implement detector for LCSH values

    ** Why are these changes being introduced:
    
    We have noticed a significant volume of search traffic that looks like
    multi-level LCSH headings, like "Geology -- Massachusetts". These likely
    come from the Bento UI, which makes subject values like this clickable.
    
    It makes sense to try and write a detector for this pattern, especially
    as it would be the first detector which would resolve to an
    Informational (or subject-based) search.
    
    ** Relevant ticket(s):
    
    * https://mitlibraries.atlassian.net/browse/tco-71
    
    ** How does this address that need:
    
    This writes a new Detector::Lcsh class, which uses a regex to look for a
    ' -- ' separator. The class is patterned off of the StandardIdentifier
    class. I initially wrote this as part of that class, but this doesn't
    really belong there - the pattern isn't an identifier in that sense, and
    further work to identify subjects (particularly single-level subjects
    like "Geology" rather than just "Geology -- Massachusetts") will go
    beyond just using a regex for detections.
    
    Adding this class has follow-on changes to the Term, Metrics, and
    GraphQL areas of the application.
    
    Outside the app code, there are a variety of tests, changes to the db
    seeds, and a new migration to record the item counts that come from the
    metrics work.
    
    There will be a future ticket to look up the detected string in the set
    of subject headings, to return more than just a string in the GraphQL.
    Right now the GraphQL response is pretty useless, just sending the
    search string back. It would be good to include include something else.
    
    ** Document any side effects to this change:
    
    The Detectors Type file has its methods alphabetized.
    
    I'm not sure if Detectors::Lcsh should instead be Detectors::LCSH?
    matt-bernhardt committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    f6ea1f5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77626cb View commit details
    Browse the repository at this point in the history