当前位置: 首页 > 知识库问答 >
问题:

弹性搜索与Nutch集成

公良英资
2023-03-14

我试着遵循这里列出的Nutch+ES指南

https://gist.github.com/xrstf/b48a970098a8e76943b9

https://qbox.io/blog/scring-the-web-wit-nutch-for-elasticsearch

然而,我无法让他们的组合工作。基本上,我在Nutch上执行了以下命令:

nutch inject <file_containing_url>
nutch generate -topN 1
nutch fetch -all
nutch parse -all
nutch updatedb -all

现在,我想将获取的数据索引到ES中,我按照指南进行了操作:

nutch index elasticsearch -all

但是,在此命令执行完毕后,ElasticSearch中没有任何更改。runtime/local/logs下的日志显示:

elastic.ElasticIndexWriter - Processing remaining requests [docs = 0, length = 0, total docs = 0]
    <property>
        <name>plugin.includes</name>
        <!-- do **NOT** enable the parse-html plugin, if you want proper HTML parsing. Use something like parse-tika! -->
        <value>protocol-httpclient|urlfilter-regex|parse-(text|tika|js)|index-(basic|anchor|more)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)|indexer-elastic</value>
    </property>
    <property>
        <name>elastic.host</name>
        <value>10.5.140.112</value> <!-- where is ElasticSearch listening -->
    </property>
      <property>
        <name>elastic.cluster</name>
        <value>nutch</value>
      </property>

      <property>
        <name>elastic.index</name>
        <value>nutch</value>
      </property>

      <property>
        <name>elastic.port</name>
        <value>9300</value>
      </property>

共有1个答案

欧阳俊明
2023-03-14

我不知道我是否完全理解了这一点,也不确定以下步骤是否有所帮助,但最终我成功地将一些页面索引到了ES:

以下是我所做的:

我发现嵌入在root_nutch_folder/src/plugins/中的ES客户端java是1.4.1版本。我将其升级到1.7.5(匹配我的ES本地服务器版本),遵循indexer-ellastic文件夹中指定的howto_upgrade_es.txt文件。然而,我不认为这有助于解决问题,因为是nutch没有告诉ES索引任何东西,而不是ES客户机-服务器通信问题。

 类似资料:
  • 我正在用弹性搜索和PostgreSQL构建一个SpringBoot应用程序。我使用PostgreSQL进行写作,使用弹性搜索进行阅读。但我坚持了一些观点 我们是否需要为弹性搜索和PostgreSQL编写单独的模型(POJO)类?因为我们正在使用Elasticsearch chRepostory进行弹性搜索和JpaRepostory。 弹性搜索的注释也不同,PostgreSQL的注释在模型类上也不同

  • 我在研究弹性搜索查询。我不能理解这个问题: 我读过这篇文章,但不清楚:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-term-query.html 1-第二个“term”是什么? 2-boost的用法是什么? 3-如何使用一个或多个term进行查询: 名为“title”的字段必须包含:

  • 问题内容: 我一直在按照http://wiki.apache.org/nutch/Nutch2Tutorial上的说明进行操作,以查看是否可以通过ElasticSearch进行安装。我已经成功完成了爬网,没有任何实际问题,但是当我尝试将结果加载到elasticsearch中时,我遇到了麻烦。 我发出命令: 它等待了很长时间,然后返回一个错误:线程“ main” java.lang.RuntimeE

  • 我可以搜索正常的查询。包含来自elasticsearch uri search的字段值或排序,但无法运行uri search的术语聚合查询。 我怎么能做到这一点? 术语聚合查询是: curl-u-elastic-XGET'127.0.0.1:9200/indexname/typename/\u搜索?pretty'-d'{“size”:0,aggs:{“groupu by_field”:{“term

  • 我有一个用于elastic search的qbox实例(关于qbox elasticsearch的更多详细信息可以通过自定义tcp端口在http://qbox.io/找到)。当我试图通过nutch访问实例进行索引时,我得到以下错误:

  • 我有大量相同类型的实体,每个实体都有大量属性,并且我只有以下两种选择来存储它们: 将每个项存储在索引中并执行多索引搜索 将所有enties存储在单个索引中,并且只搜索1个索引。 一般而言,我想要一个时间复杂度之间的比较搜索“N”实体与“M”特征在上述每一种情况!