sul-dlss / vt-arclight

An Arclight-based discovery application for materials from the Virtual Tribunals project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability for the user to search on dates using year, month, day

laurensorensen opened this issue · comments

This came up because of this comment on #290 #290 (comment)
where it was pointed out that dates couldn't be linked out to because they would be linking to individual times instead of on year, month, day and so wouldn't link to any other items except those that also indicate a timestamp in the field.

ArchivesSpace uploader plug-in uploader spreadsheet only accepts date type as "inclusive" and not "single" making it difficult to do this task of linking out, and prevents other searching on dates as well (if I am understanding correctly @jcoyne @marlo-longley).

This ticket is to investigate if this is possible / feasible in this work cycle and start off on work if it is... Not sure who to tag in the assignees here @marlo-longley, so tagging you and Justin.

I'm unclear if a script can be written on the rest API output, but found this link in API documentation - could perhaps set up a parameter like, if the field is only 10 characters (yyyy-mm-dd aka without time or other range) then the type should be changed to "single"...?

Here is an example from the xml from a slack thread that is NOT the 10 characters: normal="1945-11-20T11:35+01:00/1945-11-20T11:47+01:00"

And Slack discussion can be referred to here: https://stanfordlib.slack.com/archives/C040NV8ENCQ/p1669675051171509

Also, I think there would be plenty of support in the wider Arclight community to make it so any date type, including "inclusive" was able to be included in indexing/search.

Hi @laurensorensen -- I think it would help if we can clarify what you mean by "search" here.
Currently, our normalized dates are stored in the YYYY-MM-DD format. We are still working on formatting the items that have time data (See #288) but the principle remains the same. Given this, it's possible to put "1945-11-20" into the search bar, and get all the results that contain that string, including items with date type inclusive. We are also working on hierarchical date faceting (#184) which should provide the ability to navigate the collection by date.

To me, these are forms of date search, so I'm hoping we can nail down exactly the difference between this functionality, and the functionality you are thinking is not currently possible.

@laurensorensen to address your other question in the comment, I don't think the inclusive/single distinction in the date type has much to do with the date search functionality you're describing. What I'm gathering is, in the component metadata for an item, you would like the date field to contain a link out to search results for that date. If the date contains time data, you would like time data to be ignored in the search, and for the results to return a search on simply the Year, Month, and Day. If the date is a range, the search could be for the range's start, or some other logic. In the case of an item with multiple dates (not a range), each date would link out to its own search results.

Whether or not we have the capacity to implement this is a question for the larger team, but I am just trying to summarize what I think you're wanting here. Since Arclight normalizes all dates related to an item into a combined string, it could be difficult, though we are starting to implement our own date normalizer for #288 (also see projectblacklight/arclight#1344)

Comments in our Slack discussion made it seem like linking out to date search in metadata display and that searching on a date would lead to poor results and then it was suggested that we couldn't index because it had a "type" associated with it that ArcLight wouldn't index. Meaning (to me a non-developer) that dates wouldn't be indexed and so wouldn't be searchable, and I guess I made the assumption that because wasn't indexed that then the faceting feature on dates wouldn't work -- but maybe I'm incorrect on that and extrapolated based on past experiences instead of what you all know, which is def more than I do! It sounds like what you said in the first comment that if users have a little guidance (search YYYY-MM-DD) that they would have a fine time searching for a date.

From your second comment: Yes, this is correct: "in the component metadata for an item, you would like the date field to contain a link out to search results for that date. If the date contains time data, you would like time data to be ignored in the search, and for the results to return a search on simply the Year, Month, and Day. If the date is a range, the search could be for the range's start, or some other logic. In the case of an item with multiple dates (not a range), each date would link out to its own search results."

Closing in favor of #302