【问题标题】:integrate Nutch 1.6 with Solr 4.3 IOException when running <nutch crawl urls -solr http://localhost:8983/solr/> Job Failed. Any ideas?运行 <nutch crawl urls -solr http://localhost:8983/solr/> 作业失败时将 Nutch 1.6 与 Solr 4.3 IOException 集成。有任何想法吗?
【发布时间】:2013-05-16 14:05:40
【问题描述】:

我正在尝试将 Nutch 1.6 与 Solr 4.3 集成(我将 /apache-nutch-1.6/conf/schema-solr4.xml 复制到 collection1/conf/ 并将文件重命名为 schema.xml)。我还尝试了 Nutch1.5.1 与 solr 4.3 集成。在这两种情况下,我在运行时都会收到 IOException:

bash$ nutch crawl urls -solr http://127.0.0.1:8983/solr/

作业失败。有什么想法吗?

我自己想出了一个,必须查看 solr.log 并将下面的这些字段添加到 collection1/conf 下的 schema.xml 中

&lt;field name="host" type="string" stored="false" indexed="true"/&gt; &lt;field name="segment" type="string" stored="true" indexed="false"/&gt; &lt;field name="digest" type="string" stored="true" indexed="false"/&gt; &lt;field name="boost" type="float" stored="true" indexed="false"/&gt; &lt;field name="tstamp" type="date" stored="true" indexed="false"/&gt; 并且成功了。

【问题讨论】:

  • 您应该在您的问题中添加日志。 “作业失败”对于问题的信息不足

标签: solr indexing nutch


【解决方案1】:

是的,您能否从日志中添加更多详细信息。可能的原因可能是您需要在 schema.xml 文件中定义唯一键。像这样

<uniqueKey>id</uniqueKey>.

【讨论】:

    【解决方案2】:

    真的, 我只使用 nutch 1.7 和 solr 4.4.0。 我在 schema.xml 文件中有问题。我发现架构文件中的更改很少,如下所示

    复制您的 usr/nutch 1.7/conf/schema.xml 以粘贴 /usr/local/solr-4.4.0/example/solr/collection1/conf/schema 并在您更改字段 type="text" 后覆盖而不是一个文本字段。 改为

    content= 文本类 改变那个 ChinesePorterFilterFactory 到 SnowballPorterFilterFactory

    添加后

    field name="version" type="long" indexed="true" stored="true"

    field name="text" type="text" indexed="true" stored="false" multiValued="true"

    它对我来说很好用。

    【讨论】:

    • Arul,我正在尝试让 nutch 1.7 和 solr 4.4.0 工作,但出现错误 Indexer: java.io.IOException: Job failed!当我执行“bin/nutch solrindex localhost:8080/solr/# crawl/crawldb -linkdb crawl/linkdb crawl/segments/*”时。我已复制架构文件,但不确定您要求更改哪个字段。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多