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

As a front-end user, when I sort documents by shelfmark I want it sorted in logical, human-readable order instead of by string so that I can more easily find the records I'm interested in. #1162

Closed
4 tasks done
rlskoeser opened this issue Oct 6, 2022 · 2 comments
Assignees

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented Oct 6, 2022

testing notes

Test the shelfmark sort for the document search on the public site; it should sort numerically the way a human would expect rather than sorting as text/strings (i.e. 10 should come after 2-9). Shelfmark sorting should ignore upper/lower case, and should sort embedded numbers numerically.

You can browse all records ordered by shelfmark (and jump through pagination as desired): all documents sorted by shelfmark (test site)

It may be helpful to test with a shelfmark filter active, e.g.: documents where shelfmark includes 10j11 (test site)

What I recommend is that we implement natural sorting for shelfmarks in Solr. I know how it needs to be done but didn't want to do too many changes at once, and I wasn't sure how essential this is. If you want to create an issue, I can add notes to the documentation / example config that I found (or maybe even add it quickly in next week!)

Originally posted by @rlskoeser in #863 (comment)

dev notes

Should be able to do almost exactly this (except drop the leading article replacement):
https://stackoverflow.com/questions/15164342/how-to-sort-text-string-in-solr-using-a-natural-sort-order

  • define a new field type and dynamic field in the solr schema (e.g. natsort, *_natsort)
  • configure a copy field from full shelfmark to shelfmark_natsort
  • update search code to use the new field for sorting
  • document in deploynotes that it requires a reindex

Originally posted by @rlskoeser in #863 (comment)

@rlskoeser rlskoeser changed the title shelfmark sort in document search should use natural sorting As a front-end user, when I sort documents by shelfmark I want it sorted in logical, human-readable order instead of by string so that I can more easily find the records I'm interested in. Oct 12, 2022
@rlskoeser rlskoeser self-assigned this Oct 12, 2022
@rlskoeser rlskoeser added the 🗜️ awaiting testing Implemented and ready to be tested label Oct 12, 2022
@kseniaryzhova
Copy link

@rlskoeser sort works logically, thank you! Only concern is the sorting by shelfmark for joins (also logical, but can be confusing if the first shelfmark on the join is not what you searched for). Kicking over to Performant as it will probably need help text/more time to improve!

@rlskoeser rlskoeser removed the 🗜️ awaiting testing Implemented and ready to be tested label Oct 13, 2022
@richmanrachel
Copy link

Good call to close for now. Was writing an idea for help-text, but then realized that only Geniza researchers would likely search this way (so Alan and others can muddle through for now).

I think with Performant, it would be ideal if the shelfmark sort privileged whatever was in the search bar (so assuming someone wants to page through T-S AS, they would put T-S AS in the search and then sort by shelfmark). Then joins between T-S AS ___ + AIU would appear in the search results with the T-S AS join in the place that the T-S AS fragment would appear if it were not a join.

@kseniaryzhova - does that make sense?

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

No branches or pull requests

3 participants