seera sailesh
seera sailesh

Reputation: 7

solr 5.3.1 is giving org.apache.solr.common.SolrException: ERROR: [doc=model id] Error adding field

I was working on rails app and I want to use solr as search engine so I installed latest version of solr and while I was trying to index I was getting this error:

org.apache.solr.common.SolrException: ERROR: [doc=User 6] Error adding field 'published_at_d'='2012-07-13T20:58:58Z' msg=For input string: "2012-07-13T20:58:58Z" at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:176)

Caused by: java.lang.NumberFormatException: For input string: "2012-07-13T20:58:58Z"**

Please suggest possible solution to resolve it. I checked several sites and tried editing my solrconfig.xml file with date formats still it is not working.

Upvotes: 0

Views: 547

Answers (1)

Andrea
Andrea

Reputation: 2764

Check your schema: the

published_at_d

field should have TrieDate as type. Here, it seems it has been defined as TrieLong or some other numeric type and that cause the NaN failure

Upvotes: 1

Related Questions