The enclosing "entity" must specify the transformer, as in:
<entity name="slashdot"
pk="link"
url="http://rss.slashdot.org/Slashdot/slashdot"
processor="XPathEntityProcessor"
forEach="/RDF/channel | /RDF/item"
transformer="DateFormatTransformer">
Compare your DIH config with the wiki:
http://wiki.apache.org/solr/DataImportHandler#HttpDataSource_Example
-- Jack Krupansky
-----Original Message-----
From: jayantu
Sent: Friday, August 17, 2012 5:42 PM
To: solr-user@lucene.apache.org
Subject: Solr RSS DIH dateTimeFormat does work
I have DIH for indexing RSS feeds. the problem is that the date format
expected by solr is 1995-12-31T23:59:59Z while the way i see the date that
comes in rss feed is 'Wed, 15 Aug 2012 14:11:27 EDT' so I used the
dateTimeFormat transformer like this:
<field column="pubDate" xpath="/rss/channel/item/pubDate"
dateTimeFormat="EEE, dd MMM yyyy HH:mm:ss z" locale="en"
dataSource="dsurl"/>
The filed "pubDate" is defined as type date in the schema file. Even after
this I still get the Solr Exception as:
org.apache.solr.common.SolrException: ERROR:
[doc=rss.cnn.com/~r/rss/cnn_allpolitics/~3/R2L1CPDPBJU/] Error adding field
'pubDate'='Wed, 15 Aug 2012 14:11:27 EDT'
What might be the issue?
--
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-RSS-DIH-dateTimeFormat-does-work-tp4001911.html
Sent from the Solr - User mailing list archive at Nabble.com.