closed livingstoneonline/livingstoneonline#4

Browse by Catalogue: Date Facets

awisnicki

We need a date facet on the left side with only the year list. Years should be given in chronological order based on the following MODS field:

mods:dateCreated encoding='iso8601'

Note: sometimes the date can be a range:

<mods:dateCreated encoding='iso8601'>1866-12-26/1867-03-01</mods:dateCreated>

Note: sometimes the date is wholly unknown and although a made up value is provided for mods:dateCreated encoding='iso8601', a different MODS field says “date unknown”:

<mods:dateCreated>Date unknown</mods:dateCreated>

Is there anything we could do so that if the mods:dateCreated field says “Dake unknown” it trumps mods:dateCreated encoding='iso8601' field and in the facet all such dates would appear under a “Date unknown” category?

Also see the mockups I sent.

nigelgbanks

Looked into it, and have some code incoming.

awisnicki

Will be done as part of the re-write of the Browse by Catalogue page.

nigelgbanks

We now create a ranged facet for date values:

  1. Single dates (i.e. 1874) have a single date value (1874).
  2. Range dates (i.e 1800/2000) have many date values one for each year (1800, 1801, 1802).

This allows us to search for ranges, though some objects have huge ranges (i.e. 1800/2000) which causes them to show up in most ranged searches.

Deployed to stage and ready for review.

awisnicki

This looks good. Thank you!

For huge date ranges, I could try to at least narrow down these ranges in the MODS. So that's one option to improve this element. However, before I do something like that, here are two questions:

For dates, could we do something like 1) automatic sorting where if the MODS field that gives the text version of the date says "Date Unknown", those items are automatically sorted last in the relevant table column, and then behind the scenes sorting by the beginning date in the ISO date ranges happens as a second priorty? and then separately 2) these items would appear under "Date unknown" in the date facet rather than under a specific year?

nigelgbanks

The sort is being performed by a Solr Date field (we can't sort on mixed fields, like Strings and Dates, we can only sort on either String or Dates). We can force a record to appear lower or higher by giving it a date, that's either earlier or later relative to all the others.

The only work around for this would be to choose some date that's way off in the future say 9999-01-01 or whatever the limit would be, and forcing "Unknown Dates" to have that as their date value, in total I think there are currently 57 records which have "Unknown Dates", some of them have small date ranges like 1838/1873, so information would be lost.

That being said we can't really have both, so it's either objects show up in a single date (which we can label "Unknown Date", or they can exist in a range, say 1838 to 1873.

awisnicki

OK, I'll investigate this, make a decision on how to handle it, and be back in touch.

awisnicki

I've resolved this. There were 50 odd records with "Date unknown" in the MODS, so for the ISO field of those records I, first, changed all unknown Livingstone items to the single date of 1873, so they would display after all his items for which dates are known and, second, for all other Livingstone-related items I made an educated guess in terms of a single date. Please resync the MODS records from Github, and you'll get the newest files.

There are still Livingstone items that have a definitive date range, for instance a journal that we know he wrote between 1866 and 1872, so those date ranges I've left (in all cases, those ranges will only be a few years). For those items, I would be happy in showing them for each relevant year, so the example journal could show up under 1866, 1867, 1868, 1869, 1870, 1871, 1872. And so forth.

nigelgbanks

I've updated the MODS records on production, stage is no longer pointing to production though (as the index changed significantly for other recent issues).

nigelgbanks

This will have to wait for a checking when we deploy to production.

awisnicki

Having seen this on prod, I think it's better that for remaining date ranges, we just go with the first date in the range for sorting, etc.

Also, selecting the year is producing a wonky result in the dropdown. See attached screen shot. I think we'd better set it so that once a date is selected, in the dropdown it's truncated only to the date itself (not going into number of results). screen shot 2016-05-19 at 8 13 31

awisnicki

The second item in my last comment (remove number of results) is duplicated by another ticket, so please ignore what's written in this ticket on that point and let's use this ticket only for the following:

Having seen this on prod, I think it's better that for remaining date ranges, we just go with the first date in the range for sorting, etc.

nigelgbanks

We're currently going with the first date in the range for sorting, shall we close this ticket?

awisnicki

Yes, good thank you! Closing this ticket, but one question: When it sorts by the ISO date field, what is the next field by which it sorts, and after that, etc? Is there a way for me to control the order?

nigelgbanks

It's sorts by "score" second which roughly translates to whatever closest matches against the search terms, we can change it to a particular field if you like though like title (if so create a new ticket).

On Tue, May 31, 2016 at 8:10 PM, awisnicki notifications@github.com wrote:

Closed #4 https://github.com/livingstoneonline/livingstoneonline/issues/4.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/livingstoneonline/livingstoneonline/issues/4#event-677470423, or mute the thread https://github.com/notifications/unsubscribe/AAdvzdLgrgO-tOpImGm_ho-GznVgxIeyks5qHIeqgaJpZM4ISN6m .

##

Nigel Banks nigel.g.banks@gmail.com