4

In my SOLR index, all my datetime fields have encoding in them and not date data.

I have compared my configs with a vanilla Sitecore 9.0.1 and find no differences. So it seems like it must be a schema issue in SOLR.

I have the right dynamic field in my schema

<dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>

enter image description here

  • How is tdate defined in your schema.xml file? Check the <fieldType name="tdate" – TamerM Dec 5 '18 at 9:51
  • Can you also go to your index's schema-browser, select the date field and add a screenshot of the details to your question, this would probably help – TamerM Dec 5 '18 at 9:55
6

The problem here is that you are using Luke to look at the raw data that Solr is putting in the Lucene index. Solr is a layer that sits above Lucene index, and it may choose to encode values however it sees fit.

To see the data in a more appropriate format, I recommend using the Solr web UI. You can access it by visiting the Solr URL in your web browser (something like https://localhost:8983/solr, depending where it is installed), selecting your core on the left in the Core Selector dropdown, selecting Query on the left, and then clicking Execute Query. In this UI, you can also craft Solr queries to select particular data.

Note that in the attached screenshot, my __smallcreateddate_tdt is showing the expected readable datetime format.

enter image description here

  • You are exactly right. – Chris Auer Dec 5 '18 at 17:54

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.