1

我正在使用以下命令对 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'
4

1 回答 1

0

在 solr_xx_xx/example/solr/conf/schema.xml 中添加了以下行

<field name="cache" type="string" stored="true" indexed="false"/>

它工作得很好。

于 2013-07-15T12:03:25.693 回答