We have switched our Sitecore instance from Lucene to Solr with SXA 1.4. Lucene works fine with the 'yyyyMMdd' date format but Solr needs 'yyyy-MM-DDTHH:mm:ssZ', so querying is not working when we filter on date.

The date field is a facet item in SXA, so we are limited to what we can do about this.

Is there a way to configure this in SXA 1.4?


There is a default date format in a code and in certain criteria logic should use the format from this setting

<setting name="ContentSearch.DateFormat" value="yyyy-MM-dd'T'HH:mm:ss'Z'"/>

file: Sitecore.XA.Foundation.Search.Solr.config.disabled

If for some reason it is not taken into account and you can see that queries in Search.log.*.txt files still use Lucene format then please contact Sitecore support.

To help them, you can mention following information:

Description: Search results are not filtered correctly by date range.
Hotfix ID: 11697-1
  • Thanks @Alan, yes the format in the XA's Solr override is not being taken into account. I get ["Invalid Date String:'20180301'"]. I'll contact Sitecore Support. Thanks again
    – TamerM
    Apr 8 '18 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.