Closed sshetenhelm closed 4 weeks ago
We are currently sorting by year_isim
from the solr record. The examples of the results "starting over" is because those objects do not have a year_isim
attached to the solr record, so the sorting is then defaulting to the id and the year isn't being taken into account at all. The date being displayed for these records is coming from date_ssim
, not year_isim
, which is why it isn't sorting by those years.
PR for adding date_ssim
as a fallback sorting field: https://github.com/yalelibrary/yul-dc-blacklight/pull/1064
The successful year sorting results is because all of those records have a year_isim
in their solr records.
I don't think we can add Volume/Container to the Year sorting because some of these values do not include a year and some have the year at the end or middle of the string. Example is something like "Box 1" or "v.5 no.1 2006 Jan/Feb". In these examples, the sorting would sort based on the letters, not year.
Waiting for Summer's feedback
So to clarify for my own understanding:
The date sorting works using year_isim.
With the current PR, if there is no year_isim, then date_ssim will be used for sorting.
The reason the Legal Affairs journals appear to sort correctly in Descending is because of the order of the individual object OIDs, and not the dates. That's why the results appear the same in Ascending--since all records share the same dates (the years 2002-2006), they will display in the same order regardless of date of individual issue.
And we can't do Container/Volume because of variances in descriptive practices across records.
Is all of the above correct?
The date sorting works using year_isim.
With the current PR, if there is no year_isim, then date_ssim will be used for sorting.
Jan 1900
instead of just the year. The reason the Legal Affairs journals appear to sort correctly in Descending is because of the order of the individual object OIDs, and not the dates. That's why the results appear the same in Ascending--since all records share the same dates (the years 2002-2006), they will display in the same order regardless of date of individual issue.
And we can't do Container/Volume because of variances in descriptive practices across records.
The PR does fix the last linked example in the ticket where the results were the same in asc/desc:
https://github.com/yalelibrary/yul-dc-blacklight/pull/1064
Great, this is really helpful. So it seems like moving forward with the PR you've posted is fine, and I'll have to regroup with our metadata for digital objects group about inconsistent data. Let's move this ticket into Team Review and just address that PR since these are mostly metadata issues as opposed to "bugs."
Looks good on test. Let's bump to UAT please.
Works as expected on UAT. Thanks!
Ready to close :)
In Blacklight, there are discrepancies between the behavior of Sort by Year, Ascending and Sort by Year, Descending.
Sometimes Sort by Year, Descending appears to work as expected and take into account the Volume/Container. Example: https://collections.library.yale.edu/catalog?f%5BcallNumber_ssim%5D%5B%5D=YL+05+L48+tall&sort=year_isim+desc%2C+id+desc%2C+archivalSort_ssi+asc
However, sometimes sorting in search results works as expected but then “starts over” in Descending Order when a publication name is changed: https://collections.library.yale.edu/catalog?f%5Bproject_identifier_tesi%5D%5B%5D=28&per_page=100&q=&search_field=all_fields&sort=year_isim+desc%2C+id+desc%2C+archivalSort_ssi+asc
Even though Descending seemed to work as expected, for these same materials, Sort by Year, Ascending does not seem to include Volume/Container. Example: https://collections.library.yale.edu/catalog?f%5BcallNumber_ssim%5D%5B%5D=YL+05+L48+tall&sort=year_isim+asc%2C+id+desc%2C+archivalSort_ssi+asc
Sometimes Sort by Year, Ascending gives the same results as Sort by Year, Descending. Example: https://collections.library.yale.edu/catalog?f%5Bproject_identifier_tesi%5D%5B%5D=28&per_page=100&q=&search_field=all_fields&sort=year_isim+asc%2C+id+desc%2C+archivalSort_ssi+asc
We would like
Acceptance