I'm a little confused on the proper format for the solr date fieldtype. When importing from a mySQL database does it need to be in this format?
1995-12-31T23:59:59Z
In my database the date and time fields are in different columns. Right now my query looks like this.
SELECT eb.eventID, concat(CAST(e.startDate AS CHAR),'T ',CAST(e.startTime as CHAR),'Z')
Am I on the right track?
Yes, it does need to be in that format if you use the Solr "DateField" type: http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html
I don't know the proper way to format dates in MySQL but you do want to make sure that the date is in the format yyyy-mm-dd and the time in the format HH:mi:ss.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With