SELECT  DATE_FORMAT( ts.insertDate,'%Y-%m-%d-%k:%i:%S') as insertDate, 

Try to use the above DATE_FORMAT you will get the date as 
2012-03-24-14:07:59 
-----Original Message-----
From: forwardswing [mailto:wangweiz...@sohu.com] 
Sent: Tuesday, May 08, 2012 2:22 PM
To: solr-user@lucene.apache.org
Subject: How to change the default format for tstamp?

When i use Nutch1.2 & Solr1.4,from Nutch i use the following command to
commit the index to Solr:
bin/nutch crawl urls -dir .......

But there is an error in Solr:
 ERROR : org.apache.solr.core.SolrCore  -
org.apache.solr.common.SolrException: Error while creating field
'tstamp{type=date,properties=stored}' from value '20120508013912168'

After the checking for Solr's source code,i found that Solr didnot recognize
this string format.
So i want to change the tstamp value's format to "2012-05-08-01:39:12.168Z"

Who can help me ?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-change-the-default-format-for-tstamp-tp3970751.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to