【问题标题】:step by step indexing into apache solr逐步索引到 apache solr
【发布时间】:2015-09-21 16:27:56
【问题描述】:

我已经开始使用 apache nutch 进行爬行,并且我一直按照 apache wiki nutch 教程中显示的步骤进行操作。如说明中所示,我能够在端口 8983 上设置 solr 服务器。我现在尝试使用上述工具进行索引,但出现以下错误:

Indexer: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/update. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:512)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124)
at org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:168)
at org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:146)
at org.apache.nutch.indexwriter.solr.SolrIndexWriter.commit(SolrIndexWriter.java:164)
at org.apache.nutch.indexer.IndexWriters.commit(IndexWriters.java:125)
at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:149)
at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:222)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:231)

我是第一次使用 solr,所以在这方面的任何帮助都会很棒,因为我没有找到其他适合我的解决方案。

【问题讨论】:

  • 您正在运行的查询是什么?
  • 我正在尝试将 nutch 与 solr 集成,并将抓取数据从 nutch 发送到 solr 我正在使用 nutch 教程中的说明进行练习

标签: apache solr


【解决方案1】:

最可能的问题是 /solr/update。最新版本的 Solr 不再支持默认集合(/solr/update 之间缺少名称)。

因此,如果您使用的是最新的 (5.x) Solr,则需要该 URL 来反映您创建的集合名称。因此,请查看 Nutch 教程或文档,了解如何在 URL 中提供明确的集合名称。

【讨论】:

    【解决方案2】:

    我在运行 Apache Nutch 1.11 和 Apache Solr 5.3.1 时遇到了同样的错误。通过在 solr.server.url

    中包含核心名称(以下示例中的 test_core)解决了该问题
    bin/crawl -i -D solr.server.url=http://localhost:8983/solr/test_core urls/ TestCrawl/  2
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-13
      • 2013-07-28
      相关资源
      最近更新 更多