Faceted Browse and Numeric Data for date range searches

Using the Numeric Data module, I have added year data to my records. In the Faceted Browse module, I now want to filter all of my records that have a date interval between 1950 and 1959, manifested by having ‘1950s’ as a drop down. So if a record has 1952, or 1952-1954 as its date value, it would be picked up by the ‘1950s’ query. Is this possible? I can only seem to enter single years, not ranges, in the Faceted Browse category interface, which ends up in a yearly list rather than a neat range.

I also have an issue when I add a list of values into a Facet (e.g. Colour photograph, B/W photograph, Slide). I choose the correct ‘Format’ property (as I can load the values from the list) and have chosen ‘Multiple (list)’ as the Type option. However, whilst the front-end allows me to tick multiple values from this list, it only returns a record if that record contains ALL of the checked values, rather than building to the query. Elsewhere, the Resource Template facet type works exactly as I’d expect, allowing me to choose ‘Image’ and ‘Sound’ values and shows me both results, accumulating. What might I have missed here?

Thanks!

Before I answer, it’s important to note that Faceted Browse is just a layer on top of the existing advanced search. It is limited to what the advanced search is capable of doing.

So if a record has 1952, or 1952-1954 as its date value, it would be picked up by the ‘1950s’ query. Is this possible?

It’s not possible with the existing facet types. I suppose it could be possible with a new, custom facet type, using a combination of the advanced search’s “Date comes on or after” and “Date comes on or before” search parameters. There’s documentation on how to create a custom facet type, if you’re so inclined.

Elsewhere, the Resource Template facet type works exactly as I’d expect, allowing me to choose ‘Image’ and ‘Sound’ values and shows me both results, accumulating. What might I have missed here?

This is expected. Like in the advanced search, the resource templates are an inclusive search. And although properties have an “AND” and “OR” selection in the advanced search, it is not possible to make that distinction in a consistent, predictable way in a faceted context. For this reason the value facet type uses an exclusive search, which fits most use-cases (but not yours, unfortunately).

Hi, thanks for the answer! The custom facet option is a little beyond me, unfortunately. It sounds like the option is almost there, however! A workaround can be to Free Text search ‘1950-1959’, assuming all the dates are correctly entered. It’s not as intuitive for the user, but perhaps I can find a way to insert a help note for this.

And for the other issue I’ll use a dropdown instead – in combination with the Resource Template facet this might be enough to filter our items to a good-enough degree.

At least I know that these aren’t issues stemming from how I’ve implemented my installation.
Thanks!

I made a faceted browse page called Browse by Decade. I created Categories 1960s, 1970s, etc. For each Category I searched the Date field for “starts with” and a value of the first three digits. For instance for 1960s my query is

dcterms:date starts with 196

Seems to work fine.