运行solr索引时出错

时间:2012-12-10 13:35:37

标签: solr hadoop nutch

我正在使用以下命令在nutch已爬网数据上运行solrindex:

bin/nutch solrindex <prep><code>http://127.0.0.1:8983/solr/ /app/hadoop/tmp/crawled_pages/crawldb -linkdb /app/hadoop/tmp/crawled_pages/linkdb /app/hadoop/tmp/crawled_pages/segments/*

我收到以下错误,但我无法解决此问题。

org.apache.solr.common.SolrException: ERROR: [doc=http://www.bbc.co.uk/portugueseafrica/arquivo/index.shtml] unknown field 'cache'

ERROR: [doc=http://www.bbc.co.uk/portugueseafrica/arquivo/index.shtml] unknown field 'cache'

request: <prep><code>http://127.0.0.1:8983/solr/update?wt=javabin&version=2
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:430)
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
        at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
        at org.apache.nutch.indexer.solr.SolrWriter.write(SolrWriter.java:124)
        at org.apache.nutch.indexer.IndexerOutputFormat$1.write(IndexerOutputFormat.java:55)
        at org.apache.nutch.indexer.IndexerOutputFormat$1.write(IndexerOutputFormat.java:44)
        at org.apache.hadoop.mapred.ReduceTask$OldTrackingRecordWriter.write(ReduceTask.java:457)
        at org.apache.hadoop.mapred.ReduceTask$3.collect(ReduceTask.java:497)
        at org.apache.nutch.indexer.IndexerMapReduce.reduce(IndexerMapReduce.java:195)
        at org.apache.nutch.indexer.IndexerMapReduce.reduce(IndexerMapReduce.java:51)
        at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:519)
        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:420)
        at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:260)
2012-12-10 10:05:49,198 ERROR solr.SolrIndexer - java.io.IOException: Job failed!

有没有人遇到过类似的问题?

我不明白这个错误的根本原因是什么..

org.apache.solr.common.SolrException: ERROR: [doc=http://www.bbc.co.uk/portugueseafrica/arquivo/index.shtml] unknown field 'cache'

1 个答案:

答案 0 :(得分:0)

在solr_xx_xx / example / solr / conf / schema.xml

中添加了以下行
<field name="cache" type="string" stored="true" indexed="false"/>

它工作正常。