nutch 学习:编译,plugin

本文介绍如何在Eclipse中开发Nutch插件并进行部署。包括编译svn2.jar,修改mytestplugin,配置相关属性如http.agent.name及plugins加载等步骤,并最终将nutch*.war复制到webapps完成部署。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 在eclipse 中 部署 ,svn
2. jar ,自己编译,部署到服务器,运行 ok.
3. 拷贝creativecomoon plugin 目录。
修改 mytestplugin
编译 ,jar ,拷贝到服务器

<property>
<name>http.agent.name</name>
<value>aliali</value>

</property>

<property>
<name>http.robots.agents</name>
<value>aliali,*</value>
<description>The agent strings we'll look for in robots.txt files,
comma-separated, in decreasing order of precedence. You should
put the value of http.agent.name as the first agent name, and keep the
default * at the end of the list. E.g.: BlurflDev,Blurfl,*
</description>
</property>


4.加载 plugins



<property>
<name>plugin.includes</name>

<value>nutch-extensionpoints|protocol-http|urlfilter-regex|mytestplugin|parse-(text|html|js)|index-basic|query-(basic|site|url)|s
ummary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)
</value>
</property>

<property>
<name>urlfilter.regex.file</name>
<value>regex-urlfilter.txt</value>
<description>Name of file on CLASSPATH containing regular expressions
used by urlfilter-regex (RegexURLFilter) plugin.</description>

5. ok, plugin ok.

至此,可以调试和修改 nutch.


6. 部署 war,
copy nutch*.war 到 webapps.
修改 classes/nutch-site.xml , searcher.dir
7. luke index , ok ,search is ok.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值