nutch 爬虫 - 如何设置每个主机的最大内链数

发布于 2024-09-25 23:20:03 字数 61 浏览 8 评论 0原文

如何设置每个主机索引的最大页数? 我不想索引网站的所有百万个页面,我只想索引前 100000 个找到的页面。

How can i set maximum number of pages to index per host?
i don't want to index all million pages of site, i want to index only first 100000 found pages.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若有似无的小暗淡 2024-10-02 23:20:03

当深度 = 10 和 topN = 1000 时,索引中的文档不会超过 10000 个(如果不重新抓取)。 “深度”参数指示 Nutch 将运行多少次迭代。 “topN”参数控制在一次迭代期间最多获取多少个 url。因此,将“深度”乘以“topN”即可得出将索引的网址数量的近似值。这是一个近似值,因为您的 url 可能会超时或返回 404。

如果您不想重新抓取,请确保将“db.fetch.interval.default”设置为足够高的值爬网作业完成。如果在该时间间隔到期时爬网作业尚未完成,那么您将开始重新爬网某些 url,因此索引的 url 数量将小于深度*topN。

With depth=10 and topN=1000, you will not have more than 10000 documents in your index (if you don't re-crawl). The 'depth' parameter indicates how many iterations Nutch will run. The 'topN' parameter controls how much urls at maximum will be fetched during one iteration. So multiplying 'depth' by 'topN' gives an approximation of how many urls will be indexed. It is an approximation because you might have urls that will timed-out or return a 404.

If you don't want to re-crawl, make sure the 'db.fetch.interval.default' is set with a high enough value for the crawl job to complete. If the crawl job is not completed when that interval expires, then you will start re-crawling some urls and so the number of urls indexed will be less than depth*topN.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文