我正在使用以下命令对已爬网的数据运行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'
最佳答案
在solr_xx_xx / example / solr / conf / schema.xml中添加了以下行
<field name="cache" type="string" stored="true" indexed="false"/>
而且效果很好。
关于solr - 运行solr索引时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13802036/