Configuring date slider or range facet in solr search?

I’m configuring Solr with the Advanced Search and Advanced Search adapter for Solr modules. I’m struggling to figure out how to add a date range facet or filter. When I try, my search page shows no items and no facets on page load.

With the internal sql search engine, I can create a working date range facet with the ‘Slider for a range of values’ input and setting the min/max values in the facet’s options. But not so much in Solr.

My date values are indexed as _s, _ss, _txt, _dt, and _dts. I’ve tried _dts and _ss. The dcterms:created field uses the numeric timestamp data type.

This is my facet configuration:

And this is my date index config for _dts:

What could I do differently to enable date range faceting in solr?

And if I set min/max parameters, then how would I format these for solr?

Hi @adehner ,

I’m not an expert on the inner workings of Advanced Search and Solr, so I cannot explain the exact cause for the issues that you’re facing. I did not get it to work with full dates, but here’s the method I used to work around it and apply the range slider on year.

In Search Manager - Solr cores - mapping:

Now you can use this field in the facet config:

Perform a Solr reindex. If you have access to the Solr backend, you could verify that the field is indeed formatted as integer and contains the year.

The range slider is now functional in the Omeka frontend advanced search page.

Please note that the range slider is not working in Chrome. I’ve created an issue for that.

Best regards,
Maarten Coonen