Open amoeba opened 6 years ago
In the UI, we combine the concept of publication date (pubDate
) and upload date (dateUploaded
) since not all metadata docs have a pubDate
specified. So querying only the pubDate
would seem a bit too restrictive and too technical (i.e. some users may not understand the difference between an upload date and publish date).
This is also done in the citations - if there is no pubDate
in the metadata, then the dateUploaded
is used in the citation instead. So if we queried only for the pubDate
, then some results would be filtered out that seemingly shouldn't be. For example, a dataset may have a citation with the year 2017 as the publication year because it was uploaded in 2017 and has no pubDate in the metadata. If a user filtered by pubDate == 2017
, then that dataset would not be a result because technically, there is no pubDate
value in the index.
I like the idea of using the precanned filters in a dropdown like the Reddit example.
Reducing the granularity to the day would be doable as well, if we decided users would use that feature.
Right on, that all makes sense. Thanks for the detailed explanation!
So @mpsaloha and I were talking in #arctica on Slack and he asked if it was possible to look for datasets uploaded after a specific date, e.g., 2018-02-1. I didn't think this was possible so I looked at the queries the Year section of the Search sidebar sends. When I check the "Publish year" box:
The relevant part of the Solr query that's sent is:
which shows it's searching both
datePublished
anddateUploaded
so it appears this does basically what's wanted. I also tested whether a specific day could be entered, rather than just a year, and it appears you can't (results in Solr error). @mpsaloha 's use case here would be to let a scientist see what's new, i.e., what's been uploaded in the last day/week/month. I think this is a pretty valid use case.What do we think about a change or two:
Allow a final temporal resolution to be queried. Could use...
At the very least, I found the current behavior a confusing because "Publish Year" queried both pubDate and dateUploaded.