It would be best to properly format the date before sending it to Solr, but
you can use an update request processor to transfirm the date, such as:
ParseDateFieldUpdateProcessorFactory.
See:
http://lucene.apache.org/solr/4_7_2/solr-core/org/apache/solr/update/processor/ParseDateFieldUpdateProcessorFactory.html
There are some examples in my Solr 4.x Deep Dive e-book.
-- Jack Krupansky
-----Original Message-----
From: Niranjan
Sent: Monday, April 21, 2014 12:01 PM
To: solr-user@lucene.apache.org
Subject: While Indexing in Solr getting "SolrException: Invalid Date
String:'12/20/13'
Hi All,
I am trying to index a metatag "topic_date" of format "mm/dd/yy".
But I am getting an exception of Invalid date string.
I tried to google it but I could see that in solr the date time format is
YYYY-MM-DDThh:mm:ssZ.
I tried configuring the time format in schema as below:
<field name="metatag.wc_topic_date" type="date" datetimeformat="MM/DD/YY"
stored="true" indexed="true" multivalued="false"/>
But getting the same error.
Is my configuration wrong.
Please help me How can I achieve indexing my date field in my own specified
format (MM/DD/YY).
Thanks in advance!!!
Regards,
Niranjan
--
View this message in context:
http://lucene.472066.n3.nabble.com/While-Indexing-in-Solr-getting-SolrException-Invalid-Date-String-12-20-13-tp4132371.html
Sent from the Solr - User mailing list archive at Nabble.com.