2013-02-14 113 views
2

我都在this tutorial喜歡,但有一些truble。當我嘗試調用Nutch的抓取後./nutch solrindex http://127.0.0.1:8080/solr/ crawl/crawldb -linkdb crawl/linkdb crawl/segments/*命令我得到一個異常索爾索引失敗

> WARNING: job_local_0001 org.apache.solr.common.SolrException: Bad 
> Request 
> 
> Bad Request 
> 
> request: http://127.0.0.1:8080/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.close(SolrWriter.java:142) 
>   at org.apache.nutch.indexer.IndexerOutputFormat$1.close(IndexerOutputFormat.java:48) 
>   at org.apache.hadoop.mapred.ReduceTask$OldTrackingRecordWriter.close(ReduceTask.java:466) 
>   at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:530) 
>   at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:420) 
>   at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:260) 

我應該怎麼做才能解決這個問題呢?

P.s. Solr正在工作。我使用了solr 4.1和nutch 1.6。

+0

索爾日誌中的錯誤是什麼? – Jayendra 2013-02-17 10:16:29

+0

我已經解決了這個問題。我將 slawter 2013-02-17 11:51:39

+0

你可以在堆棧溢出的電子郵件地址與我聯繫 – Jayendra 2013-02-17 18:03:27

回答

1

當你有任何異常時,你應該打開日誌並檢查日誌中的異常。在我的情況下,我修改schema.xml並插入一些新的字段與type="text",但在我的schema.xml是另一種類型,稱爲text_general,它很容易修復後日志閱讀。