pulibrary / bibdata

Local API for retrieving bibliographic and other useful data from Alma (Ruby 3.2.0, Rails 7.1.3.4)
BSD 2-Clause "Simplified" License
16 stars 7 forks source link

Figgy ARKs resolving to Voyager IDs instead of Alma IDs #1720

Open hectorcorrea opened 2 years ago

hectorcorrea commented 2 years ago

It looks like some of our records in the catalog were indexed with a Figgy cache that still had Voyager IDs instead of Alma IDs.

For example the electronic_access_1display field for MMS ID 9956597633506421 was indexed as follow:

{
  "https://catalog.princeton.edu/catalog/5663086#view":["Index"],
  "iiif_manifest_paths":{
    "http://arks.princeton.edu/ark:/88435/zk51vm39g":"https://figgy.princeton.edu/concern/scanned_resources/10a91d1b-bba8-418a-9590-0718149fa0cd/manifest"
    }
}

Notice that it points to an old Voyager ID 5663086.

However if we look at the cache for this record in bibdata-alma-worker1 it has the new ID (9956630863506421):

$ cat /opt/marc_liberation/current/tmp/figgy_ark_cache/ark__88435_zk51vm39g
:idI")10a91d1b-bba8-418a-9590-0718149fa0cd:ET:source_metadata_identifierI"9956630863506421;T:internal_resourceI"ScannedResource;T

This related to #1659

Note that the although the links with the old Voyager IDs do resolve correctly in the browser (i.e. going to https://catalog.princeton.edu/catalog/5663086#view redirects to the proper URL) these Voyager IDs cause problems when using them to find items in Figgy since Figgy does not recognize them anymore. OL makes a GraphQL call to Figgy with the ID in the URL and therefore we must update the cache to get the new Alma IDs in the URL and use those when making the GraphQL call to Figgy. As quick fix I've added a check to OL to bypass this issue (see https://github.com/pulibrary/orangelight/pull/2776) but we should fix the data.

christinach commented 2 years ago

the rake task to generate the figgy_ark_cache errors. The figgy ark cache that is used still has the voyager ids. As a result we build the domain catalog url with the voyager id. This url is included in the electronic_access_1display field and is used in the Available Online section to display the Digital content or Selected images text anchor with this link. The issue is that when the user will click on the link it will not navigate them down to the viewer but it will render a new webpage to resolve the voyager id to the current Alma id.

kevinreiss commented 9 months ago

Noting the ark_cache we have now is still and using Voyager IDs.