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 summaries under each manuscript in search results #123

Closed
andrew-morrison opened this issue Mar 7, 2018 · 15 comments · Fixed by #173
Closed

Add summaries under each manuscript in search results #123

andrew-morrison opened this issue Mar 7, 2018 · 15 comments · Fixed by #173
Assignees

Comments

@andrew-morrison
Copy link
Contributor

andrew-morrison commented Mar 7, 2018

@holfordm requested the following in a comment on fihristorg/fihrist-mss#44:

I think this could be very helpful, as long as it doesn't clutter the display, and would definitely be worth trialing on medieval. I think we would want to include the information in <origin> as well as author/title, and the logic would be a little different since we tend to use <head> rather than <summary> for the summary description. The logic would be something like

-if there is a <head> just take the content of that
-for authors/titles:
--if there are authors that are children of <msItem>, take the first 2 names; if there are more, or items without authors, add 'etc.'
--if there are no msItems with authors, take the first (1 or 2?) title(s?) and if there are more, add 'etc.'
-for origin: just take the text content of <origin> (adding the semi colon between date and place if necessary)

For example:
MS. Add. A. 5
Nicholas de Auximo, Antoninus of Florence (gap) 15th century; Italian

MS. Add. A. 12
Petrarch, etc. (gap) 15th century, second half; Italian

MS. Add. A. 106
Medical recipes. Religious poems. (gap) 15th century; English, North

MS. Bodl. 34
Life of St. Katherine of Alexandria. Life of St. Margaret of Antioch; etc. (gap) 13th century, early; >English

Christ Church MS. 87
Missal, Use of Sarum; England (London), s. xvin

-in the case of <msPart> probably just say "Composite manuscript" and leave it at that?

@andrew-morrison
Copy link
Contributor Author

I've put a draft implementation of this on the Medieval QA site.

This is the logic:

  • If there are msPart elements, just describe it as a "Composite manuscript".
  • Otherwise, if there is an msDesc/head, use the text of that.
  • Otherwise, if there is an msContents/summary, use that.
  • Otherwise, if there are authors, list the first two of those, appending ", etc." if more than two.
  • Otherwise, if there are work titles, list the first two of those, appending ", etc." if more than two.
  • Otherwise, if nothing can be found, it defaults to "Untitled work or fragment".
  • Then, to whatever has been chosen above, the text of origDate and orgPlace elements are appended. However, there can be long lists of dates or places, especially in multi-part manuscripts, so in those cases it appends "Multiple dates" and/or "Multiple places of origin" instead.

Gaps cannot be added, so instead I've used an em dash. But that can easily be changed to something else.

@holfordm: Please take a look and let me know if this looks useful.

If you want to proceed, there are two options:

  • Currently it is building these summaries in the indexing script. I could commit that, and push the corresponding Blacklight configuration change to the production site, then the next time you run index-all-prd.sh it would add them.
  • Alternatively, I could do what I did for Fihrist, and batch convert all the TEI files so all those that lack a head or summary element would get one. That would mean these summaries would appear at the top of the manuscript description pages, and you could edit them manually.

@holfordm
Copy link
Collaborator

I have passed this on to Martin Kauffmann for his comments. Personally, I think it look excellent and am keen to implement it! Watch this space...

@holfordm
Copy link
Collaborator

  • Martin agrees that this should be implemented.
  • If it is easy to change, we don't think we need the "Contents: " label
  • One additional step in the logic, which I should have mentioned before, is that if a composite manuscript has a head, this should be used as the summary
  • I think it should be kept in the indexing script. Several of the descriptions are already very summary and it will look odd to create an additional summary in the records.
  • A question: can this be extended to the results given under person/place/work pages? (e.g. http://medieval-qa.bodleian.ox.ac.uk/catalog/person_96012549 )
    Thanks again.

@andrew-morrison
Copy link
Contributor Author

In reply to your points:

  • OK, do you want it implemented as soon as possible, or save it for a release when some others new features are also ready (person, work and place records should display links and additional info. where available #34 and works should be links in HTML #127, for example)?
  • Removing the label is possible but would not be easy. It'd require changes to the core Blacklight, which might break (or be broken by) future upgrades.
  • The QA site is now updated with the reordered logic to use the head even for multi-part manuscripts.
  • I've committed the changes to the indexing script. So now if you run index-all-qa.sh the summaries won't disappear from the QA site. It'll also send the summaries to the production Solr, but nothing will appear on the production web site until the Blacklight configuration changes are pushed to there.
  • Unfortunately no, these summaries cannot be added to the person/place/work pages. Users will continue to have to click on each link in order to find out what else those manuscripts contain, besides the person/place/work they're currently viewing.

Also:

  • Empty head elements are now ignored
  • Some of those head elements in multi-part manuscripts are very long, so it now shortens to the first 128 characters (or slightly less if the cut-off is in the middle of a word). MS. Lat. misc. b. 26, for example.
  • I've prevented some redundancy when some or all of the origin is already included. For example, what was displaying as...
    Virgil, Æneid; Italy (Ferrara), 1456 — 1456; Italy (Ferrara)
    ...is now...
    Virgil, Æneid; Italy (Ferrara), 1456
    ...because both the "1456" and "Italy (Ferrara)" are already in the head. But it has to be an exact match. For example what was displaying as...
    Grammatical miscellany; England, 14th century — 14th century; English
    ...is now...
    Grammatical miscellany; England, 14th century — English
    ...because 'England' and 'English' aren't exact matches.

@holfordm
Copy link
Collaborator

  • I don't see a problem with implementing now, but could I request a couple of tweaks?
  1. the head element should already include origin information (in my usage it is different from summary which only includes content information); so if there is a head it shouldn't be necessary to add any information from origin. Sorry for not making that clear before.
  2. is it possible to not display . at the end of titles if one is present? (If not I can remove the . from the data)
  • No problem about the contents: label

@andrew-morrison
Copy link
Contributor Author

I've made those changes and reindexed on QA.

I'll deploy the changes and reindex production at, say, 4pm today, unless I hear otherwise.

That'll also update the live site with a number of @IgnatG's recent changes, including #99.

@andrew-morrison
Copy link
Contributor Author

Deployed to production.

@holfordm
Copy link
Collaborator

There is a minor problem with the way this is working, which is that, if one item with an author accompanies several items without authors, there is currently no "etc." to indicate the existence of the other items.
See http://medieval-qa.bodleian.ox.ac.uk/catalog/manuscript_3015 and its summary for an example.
Not an urgent problem, but it is is easy to fix, that would be great.

@holfordm holfordm reopened this Apr 27, 2018
@andrew-morrison
Copy link
Contributor Author

Done. Here are the summaries which will be changed the next time you re-index.

@holfordm
Copy link
Collaborator

Can I reopen this with references to @andrew-morrison 's comment above that

Unfortunately no, these summaries cannot be added to the person/place/work pages. Users will continue to have to click on each link in order to find out what else those manuscripts contain, besides the person/place/work they're currently viewing.

What would be useful on the person/place/work pages, here and in other catalogues (I know it has been raised by the Fihrist community) would be to have a little supplementary information as well as the manuscript name - in the medieval case, the date and place of origin would be most useful. Digitized mansucripts now have the information "digital images online" added to the shelfmark (as here, http://medieval-qa.bodleian.ox.ac.uk/catalog/person_103646160), so I'm reopening this to ask if date and origin could similarly be added (for composite mss, as in the general summaries, it would have to just say 'composite ms.').

@holfordm holfordm reopened this Jul 23, 2018
@andrew-morrison
Copy link
Contributor Author

That's quite a lot of information to display in the links to manuscripts. And it comes in a lot of different formats (e.g. centuries, individual years, settlements, regions, nationalities, etc.)

Would tooltips be a reasonable compromise? I've implemented that on QA for people only. Take a look at Gregory of Nyssa again and let me know if this is worth extending to places and works.

@ahankinson
Copy link
Contributor

I don't think @title is a valid attribute on <a>.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

@ahankinson
Copy link
Contributor

Oh, nevermind.

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title

Still, it seems a strange place to put this information.

@andrew-morrison
Copy link
Contributor Author

Now displaying as an extra bit of text after the link (all wrapped up in a span tag as only single HTML elements can be passed back from the helper function to the _show_list_default.erb template.)

@andrew-morrison
Copy link
Contributor Author

Now also on work and place pages on QA.

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

Successfully merging a pull request may close this issue.

3 participants