Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Add HathiTrust access indicator to search results page. #1990

Open
ghost opened this issue May 6, 2020 · 4 comments
Open

Add HathiTrust access indicator to search results page. #1990

ghost opened this issue May 6, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented May 6, 2020

Related to issue #1973 - it would be great to add an indicator in the search results page that these records are available online, since they aren't indexible under the "online" facet.

This could be similar (or even the same as) the current eBook indicator on the result page:

Screen Shot 2020-05-06 at 2 45 55 PM

In theory, it would have to function as an API call like the book jacket images we pull from Google Books on the results page - my only concern would be the rate-limiting the HathiTrust API does...

@pgwillia
Copy link
Member

pgwillia commented May 6, 2020

Is there a way to use the overlap report to determine which titles are Hathi ebooks at index time?

@ghost
Copy link
Author

ghost commented May 6, 2020 via email

@mbarnett
Copy link

mbarnett commented May 6, 2020

Connor's boiling the overlap report down to the actual overlap and moving it into a table in MySQL so that we can do a lookaside query for the OCLC on the record page to inform the JS query to HathiTrust – if the index scripts have DB access, that would be one way to do it.

I don't think we could do this as a JS query on the results page, at least without changing the index work anyways to extract the OCLC during indexing so that there's something to do those JS queries on, or doing a DB query per result, which would be prohibitively bad for performance (it's an N+1 minus the +1, basically). And then you'd still be running up against HathiTrust API limits.

Easier to flag the Solr result during indexing and not do a bunch of secondary queries, imo.

@ghost
Copy link
Author

ghost commented May 6, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants