collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
295 stars 167 forks source link

Browse facet - normalizedDates and date range with no end date #1487

Closed jjs6791 closed 4 months ago

jjs6791 commented 1 year ago

I have a date range field with ongoing values such as 2010 - present, 2017 - present When searching the field if you put in "Now" or the current year, it retrieves those as expected. However, when browsing a normalizedDates facet with normalization set to "decade", the 2020s facet does not retrieve records with the ongoing date value

With 2010 - present, the record returns for the 2010s facet.

jjs6791 commented 1 year ago

I thought this bug was just limited to the above and the 2020s issue. However the browse facet is not coming up for decades that are not the start or end date.

Example - If you have a normalizedDates facet with a record that has dates with a range 1965-1984, the record comes up for 1960s and 1980s, but not 1970s.

collectiveaccess commented 1 year ago

I just tested this and do not see an issue with bounded dates. Eg. A browse for 1970s does find a record with the date range 1965-1984.

The normalized date browse currently does not return unbounded dates. Eg. A browse for 1970s does not find records with, say, the date 1965 - present. This was done to avoid records with open dates "polluting" the result set. In some data sets you have records with dates like after 1560. If you don't filter them out of the browse they show up in all browses for dates after 1560, even ones like 1970s. I can see that this behavior may not be desirable always, so perhaps we should make it configurable.

jjs6791 commented 1 year ago

@collectiveaccess Apologies, the bounded date of 1965-1984 is now showing in 1970s - I think I was dealing with a cache issue

Yes it would be great if you can make the unbounded date configurable so that it shows in decades within the range that aren't the start or end date