【问题标题】:Setup Nutch 1.3 and Solr 3.1设置 Nutch 1.3 和 Solr 3.1
【发布时间】:2011-12-14 10:28:58
【问题描述】:

我正在尝试让 nutch 1.3 和 solr 3.1 一起工作。

注意:我使用的是 Windows 并安装了 Cygwin。

我安装了 nutch 并进行了基本的爬取(从运行时/本地运行)

bin/nutch 抓取网址 -dir crawl -depth 3

这似乎基于日志 (crawl.log) ... LinkDb:2011-10-24 14:22:47完成,经过:00:00:02 抓取完成:抓取

我已经安装了 solr 并通过 localhost:8983/solr/admin 验证安装

我将 nutch schema.xml 文件复制到了 example\solr\conf 文件夹

当我运行以下命令时

bin/nutch solrindex http://localhost:8983/solr crawl/crawldb crawl/linkdb crawl/segments/*

我收到以下错误 (hadoop.log)

2011-10-24 15:39:26,467 WARN  mapred.LocalJobRunner - job_local_0001
org.apache.solr.common.SolrException: ERROR:unknown field 'content'

ERROR:unknown field 'content'
request: http://localhost:8983/solr/update?wt=javabin&version=2
...
org.apache.nutch.indexer.IndexerOutputFormat$1.close(IndexerOutputFormat.java:48)
    at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:474)
    at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:411)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:216)
2011-10-24 15:39:26,676 ERROR solr.SolrIndexer - java.io.IOException: Job failed!

我错过了什么?

【问题讨论】:

  • 也许你在 crawl/linkdb 之前错过了 -linkdb 标志?

标签: java solr nutch


【解决方案1】:

似乎 schema.xml 中缺少内容字段定义。

例如

<field name="content" type="text" stored="false" indexed="true"/>

示例 schema.xml @http://svn.apache.org/viewvc/nutch/branches/branch-1.3/conf/schema.xml?view=markup 似乎有。您可能需要检查您复制的 schema.xml。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多