The class cast exception is due to the following reasons: In the schema.xml, the type of the boost is specified as string
<fields> <field name="id" type="string" stored="true" indexed="true"/> <!-- core fields --> <field name="segment" type="string" stored="true" indexed="false"/> <field name="digest" type="string" stored="true" indexed="false"/> <field name="boost" type="string" stored="true" indexed="false"/> Now the error has been removed.. FYI there is some issue with SolrDeleteDuplicates, most of the users are getting Null pointer exception.. https://issues.apache.org/jira/browse/NUTCH-1100.. Lewis, i would like to know, what the SolrDeleteDuplicates is doing...? Regards, Som On Thu, Jul 26, 2012 at 8:30 AM, shekhar sharma <shekhar2...@gmail.com>wrote: > Hello, > i am getting class cast exception while indexing the pages using solr. i > am using nutch 1.6 > > SolrIndexer: starting at 2012-07-26 08:02:21 > SolrIndexer: deleting gone documents: false > SolrIndexer: URL filtering: false > SolrIndexer: URL normalizing: false > SolrIndexer: finished at 2012-07-26 08:02:55, elapsed: 00:00:33 > SolrDeleteDuplicates: starting at 2012-07-26 08:02:55 > SolrDeleteDuplicates: Solr url: http://localhost:8983/solr/ > java.lang.ClassCastException: java.lang.String cannot be cast to > java.lang.Float > at > org.apache.nutch.indexer.solr.SolrDeleteDuplicates$SolrRecord.readSolrDocument(SolrDeleteDuplicates.java:128) > at > org.apache.nutch.indexer.solr.SolrDeleteDuplicates$SolrInputFormat$1.next(SolrDeleteDuplicates.java:271) > at > org.apache.nutch.indexer.solr.SolrDeleteDuplicates$SolrInputFormat$1.next(SolrDeleteDuplicates.java:241) > at > org.apache.hadoop.mapred.MapTask$TrackedRecordReader.moveToNext(MapTask.java:192) > at > org.apache.hadoop.mapred.MapTask$TrackedRecordReader.next(MapTask.java:176) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:48) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > > > As you can see the UrlNormalizing and UrlFiltering , both are > false...while doing crawling using Nutch it is true.. > > i am using Nutch trunk(1.6) and Solr trunk (5.0) and i am using > schema-solr4.xml (Came with Nutch source, i renamed to schema.xml) and > copied to example/solr/collections1/conf folder... > > Regards, > SOm >