SearchWorks icon indicating copy to clipboard operation
SearchWorks copied to clipboard

collection title doesn't always show on search results page

Open andrewjbtw opened this issue 2 years ago • 1 comments

When an SDR item is in a collection, the search result display for that item is supposed to show the collection title, like this:

Screenshot 2023-05-09 at 3 52 12 PM

But there are numerous cases where an item is in a collection but the "collection" display just shows a blank, like this:

Screenshot 2023-05-09 at 3 53 02 PM

I've looked at a number of collections now and haven't seen a clear pattern of why some items have collection titles showing and why some are blank. Often some items don't show a title while other items in the same collection do.

I don't know how many items this affects. A few have been "fixed" via re-release from Argo but that's not a scalable solution. Some examples:

I'm not all that familiar with Blacklight but I looked at the JSON returned by adding .json to some of the URLs. There does appear to be a correlation between the data in the JSON for collection_with_title and whether or not the title appears in the results.

Taking the example of Education Data Science (EDS) Capstone Projects, Graduate School of Education:

When the collection title doesn't appear, the JSON looks like this:

        "collection": [
          "tp622mj4093"
        ],
        "collection_with_title": [
          "Education Data Science (EDS) Capstone Projects, Graduate School of Education"
        ],

When the collection title does appear, the JSON looks like this:

        "collection": [
          "tp622mj4093"
        ],
        "collection_with_title": [
          "tp622mj4093-|-Education Data Science (EDS) Capstone Projects, Graduate School of Education"
        ],

Additional context It's possible the issue will be traced back to the SDR release process but so far I haven't been able to find any indication that release failed in some way. It's worth noting that the collection druid and title do appear to have made it over to purl and SW. The context widget on the SW item page always has the collection, in every case I've looked at:

Screenshot 2023-05-09 at 4 11 58 PM

It's only the results page display that is missing the collection title.

andrewjbtw avatar May 09 '23 23:05 andrewjbtw

It doesn't look like this code has changed in 5 years, but these documents were created earlier this year:

https://github.com/sul-dlss/searchworks_traject_indexer/blame/40b83cd9a8549f321e5613969c27b18afbe161bd/lib/traject/config/sdr_config.rb#L307-L311

Update: maybe here? https://github.com/sul-dlss/searchworks_traject_indexer/blob/40b83cd9a8549f321e5613969c27b18afbe161bd/lib/traject/config/sdr_config.rb#L436

jcoyne avatar May 10 '23 13:05 jcoyne