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

Improve results sort for Testimonia #330

Closed
davidamichelson opened this issue Sep 14, 2022 · 7 comments
Closed

Improve results sort for Testimonia #330

davidamichelson opened this issue Sep 14, 2022 · 7 comments

Comments

@davidamichelson
Copy link
Collaborator

We would like to improve the default results listing for Testimonia browse and search.

Currently the list sorts by author, alphabetical. That is fine, can we also have a secondary sort so that within the results for each author the results are then sorted alphabetical by title and then numerically by citation number in the title.

For example this record: https://caesarea-maritima.org/testimonia/118.tei

Has:

<TEI>
<teiHeader>
<fileDesc>
<titleStmt>
<title xml:lang="en" level="a">
Eusebius of Caesarea,
<title level="m">Historia ecclesiastica</title>
7.32.24
</title>

The author is Eusebius of Caesarea, the title is Historia ecclesiastica, the passage citation is 7.32.24. We could mark these in more detail if that would help.

The current browse results are here:
https://caesarea-maritima.org/testimonia/browse.html?lang=&alpha-filter=E
Screen Shot 2022-09-14 at 1 13 25 PM

We would like the order to be (instead):
Eusebius of Caesarea, Ecclesiastical History 2.10.1
" τὴν Καισάρειαν ", and " Caesarea " are place names attested in Eusebius of Caesarea's Ecclesiastical History 2.10.1. This testimonium was written circa 312 - 324 CE. This work was likely written in Caesarea.URI: https://caesarea-maritima.org/testimonia/93
Eusebius of Caesarea, Ecclesiastical History 5.23.3
" Καισαρείᾳ ", and " the diocese of Caesarea " are place names attested in Eusebius of Caesarea's Ecclesiastical History 5.23.3. This testimonium was written circa 312 - 324 CE. This work was likely written in Caesarea.URI: https://caesarea-maritima.org/testimonia/98
Eusebius of Caesarea, Historia ecclesiastica 7.15
" Καισαρείᾳ ", and " Caesarea " are place names attested in Eusebius of Caesarea's Historia ecclesiastica 7.15. This testimonium was written circa 312 - 324 CE. This work was likely written in Caesarea.URI: https://caesarea-maritima.org/testimonia/115
Eusebius of Caesarea, Historia ecclesiastica 7.32.24
" Καισαρείᾳ ", and " Caesarea " are place names attested in Eusebius of Caesarea's Historia ecclesiastica 7.32.24. This testimonium was written circa 312 - 324 CE. This work was likely written in Caesarea.URI: https://caesarea-maritima.org/testimonia/118
Eusebius of Caesarea, Martyrs of Palestine 8.8
" Καισαρέων ", and " Cæsarea, " are place names attested in Eusebius of Caesarea's Martyrs of Palestine 8.8. This testimonium was written circa 315 – 316 CE. This work was likely written in Caesarea.URI: https://caesarea-maritima.org/testimonia/192
Eusebius of Caesarea, Theophany fr. 6
" Καισάρειαν τῆς Παλαιστίνης ", and " Caesarea Palestinae " are directly attested at Eusebius of Caesarea, Theophany fr. 6. This passage was written circa 335-337 CE possibly in Caesarea.URI: https://caesarea-maritima.org/testimonia/91

@wsalesky
Copy link
Collaborator

@davidamichelson you would need to mark the passage citation, maybe as tei:no?

@davidamichelson
Copy link
Collaborator Author

@wsalesky It turns out we have the information we need for sort in profileDesc/creation, see for example https://github.com/srophe/caesarea-data/blob/159c0057818521ffdb534f836158140b78835e35/data/testimonia/tei/105.xml#L244-L245

So the question is, what is easiest for you. Should we write this information into title too, or could your sort use profileDesc/creation directly? Not sure what would be fastest/simplest for indexing. I know using profileDesc/creation would be a departure from how we normally use titleStmt/title in the app to sort entries. Thoughts?

@wsalesky
Copy link
Collaborator

I can use what is in the profileDesc. I will test it tonight.

@wsalesky wsalesky mentioned this issue Sep 28, 2022
@wsalesky
Copy link
Collaborator

This should be fixed. Close if yes. @davidamichelson

@wlpotter
Copy link
Collaborator

@wsalesky the per-work sort-string value has now been added to data in /TEI/teiHeader/profileDesc/creation/ref/@n. Let me know if you need any other data edits for this issue

@wlpotter wlpotter removed their assignment Oct 14, 2022
wsalesky added a commit that referenced this issue Oct 18, 2022
wsalesky added a commit that referenced this issue Oct 18, 2022
Fix indexing and improve sort. #330
@wsalesky
Copy link
Collaborator

Fixed. Close if working as you expect. @wlpotter @davidamichelson

@wlpotter
Copy link
Collaborator

Yes, this looks great!

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

No branches or pull requests

3 participants