elasticsearch - 索引使用Elasticsearch从Apache Nut抓取的数据?

标签 elasticsearch ubuntu-14.04 nutch aws-ec2

我在AWS ec2 ubuntu实例上有Apache Nuch 1.7和Elasticsearch 1.4.4。我使用Nutch抓取数据,但如何使用Elasticsearch索引数据?没有与此相关的官方文档。

最佳答案

在您的nutch-site.xml中添加以下属性:

<property>
        <name>plugin.includes</name>
        <value>protocol-http|urlfilter-regex|parse-(html|tika)|index-(basic|anchor)|indexer-elastic|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
</property>

以上将使elasticsearch成为索引器。
以下是指定elasticsearch的主机
<property>
        <name>elastic.host</name>
        <value>localhost</value>
</property>

您可以设置的其他可选属性是elastic.port,elastic.cluster等。

现在,您指定已经抓取了数据,现在想要对其进行索引,因此可以使用
./bin/nutch index <crawldb> -dir <segment_dir>

这将索引段中所有已爬网的数据。您可以检查文档的elasticsearch索引。

关于elasticsearch - 索引使用Elasticsearch从Apache Nut抓取的数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29363782/

相关文章:

elasticsearch - 搜索名称列表并对每种字母类型进行分类

将 mysql 升级到 v5.7 后,PHP 在 Ubuntu 中出现问题

ruby - 无法启动 Rails 服务器 - "Failed to watch"错误 - Bash - Ubuntu - Windows 10

java - 在 Nutch 源代码中启动 Solr 索引

Solr 6 和 Nutch 2.3.1 集成

json - 从Elasticsearch返回单个聚合值

微服务架构中的 Elasticsearch,设计问题

java - nutch有网络服务API吗?

Elasticsearch:每月获得顶级嵌套文档,没有顶级重复

android - 无法在 Android Studio 上运行应用程序项目