nutch - 为什么 Nutch Solrdedup 无法删除重复网页

标签 nutch

我有两个内容相同但 URL 不同的网页。一个 URL 以 http://www.example.com 开头,另一个以 http://example.com 开头。在我使用 Solrdedup 删除 Solr 中的重复数据之后。我发现那两个人还留在那里。有谁知道这是怎么回事吗?

最佳答案

nutch 模式将 id (= url) 定义为唯一键。如果这不适合你,那就改变它。 schema.xml 中的相应行是:

<uniqueKey>url</uniqueKey>

但更好的解决方案可能是执行以下操作:如果您可以通过以下方式访问您的服务器

http://www.example.com

并由

http://example.com

您应该考虑使用正则表达式 URL 过滤器仅抓取其中一个以防止重复。

关于nutch - 为什么 Nutch Solrdedup 无法删除重复网页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9448267/

相关文章:

java - Nutch API 建议

lucene - Nutch - 如何通过小块爬行?

apache - Apache Nutch重新启动爬网

apache - 如何为 Apache Nutch 2.x 创建自定义索引编写器?

java - "Fatal Error"以下 nutch 教程 "markup in the document following the root must be well formed"

apache - Nutch - 作业失败 - 错误 mapred.FileOutputCommitter - Mkdirs 无法创建文件

performance - 优化 hadoop 集群上的 nutch 性能

solr - 将 URL 参数添加到 Nutch/Solr 索引和搜索结果

hadoop - 在 HDP 上编译错误 Nutch

nutch - 如何在找到的页面上抓取外部链接?