nutch脚本

刚看完crawl脚本,大致理解nutch 2.3的执行过程后,回过头来看看nutch脚本都能干些什么。

> $bin/nutch

Usage: nutch COMMAND
where COMMAND is one of:
-inject inject new urls into the database
-hostinject creates or updates an existing host table from a text file
-generate generate new batches to fetch from crawl db
-fetch fetch URLs marked during generate
-parse parse URLs marked during fetch
-updatedb update web table after parsing
-updatehostdb update host table after parsing
-readdb read/dump records from page database
-readhostdb display entries from the hostDB
-index run the plugin-based indexer on parsed batches
-elasticindex run the elasticsearch indexer - DEPRECATED use the index command instead
-solrindex run the solr indexer on parsed batches - DEPRECATED use the index command instead
-solrdedup remove duplicates from solr
-solrclean remove HTTP 301 and 404 documents from solr - DEPRECATED use the clean command instead
-clean remove HTTP 301 and 404 documents and duplicates from indexing backends configured via plugins
-parsechecker check the parser for a given url
-indexchecker check the indexing filters for a given url
-plugin load a plugin and run one of its classes main()
-nutchserver run a (local) Nutch server on a user defined port
-webapp run a local Nutch web application
-junit runs the given JUnit test
or
-CLASSNAME run the class named CLASSNAME
Most commands print help when invoked w/o parameters.

三件事:
一、爬取
1、指定爬取种子:inject、hostinject
2、爬取:generate、fetch、parse
3、更新爬取库:updatedb、updatehostdb
4、索引:index、elasticindex、solrindex

二、前台搜索服务
1、web服务:nutchserver、webapp

三、工具
1、查看爬取库:readdb、readhostdb
2、加载和执行插件:plugin
3、解析和索引检测:parsechecker、indexchecker
4、索引整理:solrdedup、solrclean、clean
5、其它:junit、CLASSNAME


◆大致ok了。如果你要搭建一个搜索服务,那么nutch可以为你做的事情就上边这些。当然,通过plugin来扩展来完成更多需求是一个很不错的选择。
◆但从架构方面来看,个人觉得nutch提供的前台搜索服务是多余的,或许就该当个tester用吧。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值