博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
Java Eden
输入您的搜索字词
提交搜索表单
我的商店
javamail.cublog.cn
管理博客
发表文章
留言
收藏夹
博客圈
音乐
相册
· iphone
导入文章
文章
· java技术
· 搜索引擎
}
· lucene
· nutch
· 数据库技术
}
· MySQL
· 操作系统
· Map
· web编程
}
· JavaScript
· news
· 互联网动态
首页
关于作者
姓名:胡小林 职业:程序员 年龄:26 位置:北京
||
<<
>>
||
我的分类
文章列表 - nutch
站内搜索引擎Nutch配置全过程
<DIV> <DIV><IFRAME align=center marginWidth=0 marginHeight=0 src="http://203.81.20.102:8080/12580/ad/ad_480_60.html" frameBorder=0 width=480 scrolling=no height=60></IFRAME></DIV> <DIV class=t_msgfont><B><FONT style="FONT-SIZE: 10.5pt"><FONT size=2></FONT></FONT></B> </DIV> <DIV class=t_msgfont><B><FONT style="FONT-SIZE: 10.5pt"><FONT size=2>下载:</FONT></FONT></B><BR><FONT size=2>可以去Apache的官方网页</FONT><A href="http://www.apache.org/dyn/closer.cgi/lucene/nutch/" target=_blank><FONT size=2><FONT color=#800080>http://www.apache.org/dyn/closer.cgi/lucene/nutch/</FONT></FONT></A><FONT size=2> 下载最新版的Nutch,目前最新版是nutch-0.9,65M大小。</FONT><BR>解压缩进入bin/就能用<BR><B><FONT size=2><FONT color=#000000><B><FONT style="FONT-SIZE: 10.5pt">安装辅助软件(运行环境):</FONT></B></FONT></FONT></B><BR><FONT size=2>Nutch是用java写的一个开源项目,所以要使它正常运行必须安装JDK(也为了能修改nutch),Java 1.4.x以上版本,设置环境变量NUTCH_JAVA_HOME为java虚拟机的安装目录。</FONT……
查看全文
发表于:2007-10-22 ┆
阅读(483)
┆
评论(0)
Crawl the Nutch -- Map Reduce
<DL class=body> <DT class=post-head> <DD class="post-body last"> <DIV class=image-wrapper></DIV> <DIV class=content-wrapper> <DIV class=postTitle><A href="http://blog.csdn.net/CSharpProgrammer/archive/2006/07/05/881793.aspx"><IMG height=13 alt=Image src="http://blog.csdn.net/images/zhuan.gif" width=15 border=0><FONT color=#247cd4> Crawl the Nutch -- Map Reduce</FONT></A></DIV> 初见于Google Lab的Paper, <A href="http://labs.google.com/papers/mapreduce.html"><FONT color=#247cd4>http://labs.google.com/papers/mapreduce.html</FONT></A>, 论文中表明在有大量集群支撑的情况下,可以快速的在海量文档中进行数据处理。现在你有一堆数据,你需要按记录修改、查询、插入和删除,一种办法是你为这些 记录建立索引,比如放入数据库,还有一种办法就是--MapReduce。这种处理方式实际上是在数据存放的时候不建立索引,等实际处理数据的时候再将这 些数据读入内存进行排序,并可以用Partitioner将数据分在不同的机器上同时进行处理,因此可以方便的实现集群计算,我猜想在一台机器上存放的数 据容量以能够全部……
查看全文
发表于:2007-10-06 ┆
阅读(229)
┆
评论(0)
Nutch 搜索结果高亮 和摘要长度解决
<DIV>高亮显示比较简单,网上也有很多介绍代码。修改如下: <P>将 org.apache.nutch.searcher.Summary 第 54行 代码 修改为:</P> <P> public String toString() { return "<span style='color:red'>" + super.toString() + "</span>"; }</P> <P>增加索引长度花了我比较长的时间 , 不过后来发现原来有两个参数是专门调整索引长度的 ,刚看代码的时候没有注意到 ,在org.apache.nutch.searcher.Summarizer 的36行左右 有</P> <P> /** The number of context terms to display preceding and following matches.*/<BR> private static final int SUM_CONTEXT =<BR> NutchConf.get().getInt("searcher.summary.context", 5);</P> <P> /** The total number of terms to display in a summary.*/<BR> private static final int SUM_LENGTH =<BR> NutchConf.get().getInt("searcher.summary.length", 100);</P> <P>这两个 是 Term 的长度 , 第一个参数是 SUM_CONTEXT 在摘要中间最多有 5个 高亮显示的关键词(注:这里的NutchConf.get().getInt()第二个参数 5表……
查看全文
发表于:2007-10-06 ┆
阅读(347)
┆
评论(0)
搜索引擎nutch分页功能
<DIV>搜索引擎nutch在查询搜索结果时,只有下一页功能。现在实现了分页功能,并把是show all hits删去<BR><BR>1.删去show all hits<BR>修改:<BR> int hitsPerSite = 0; // max hits per site<BR>2.分页功能<BR> <table align="center"><BR> <tr><BR> <td><BR> <%<BR> if (start >= hitsPerPage) // more hits to show<BR> {<BR> %><BR> ……
查看全文
发表于:2007-10-06 ┆
阅读(368)
┆
评论(0)
Nutch 互联网数据抓取
<DIV> <H3 class=h4>Whole-web: Fetching</H3> <P>Starting from 0.8 nutch user agent identifier needs to be configured before fetching. To do this you must edit the file <SPAN class=codefrag>conf/nutch-site.xml</SPAN>, insert at minimum following properties into it and edit in proper values for the properties: </P><PRE class=code><property> <name>http.agent.name</name> <value></value> <description>HTTP 'User-Agent' request header. MUST NOT be empty - ……
查看全文
发表于:2007-10-06 ┆
阅读(303)
┆
评论(0)
nutch0.9中使用je分词
<DIV>最简单的方法,修改Nutch源码使用je分词,此外还有利用Nutch的插件功能实现je分词,在此不做介绍。</DIV> <DIV> </DIV> <DIV> 注:本文挡为最基本的分词方式,分词后原有高级搜索部分功能无效。<BR> 如果各位仍然需要高级搜索功能,请参见Nutch0.9分词研究中的思路加以修改。<BR>Nutch源码在Nutch的 src/java/ 文件夹中。<BR>将如下文件中的同一方法使用以下方法替换<BR>org.apache.nutch.analysis.NutchDocumentAnalyzer.java中<BR> public TokenStream tokenStream(String fieldName, Reader reader) {<BR> MMAnalyzer myanalyzer=new MMAnalyzer();<BR> return myanalyzer.tokenStream(fieldName, reader); <BR> }<BR>org.apache.nutch.analysis.NutchAnalysis.java中<BR> final public Query parse(Configuration conf) throws ParseException,IOException {<BR> Query query = new Query(conf);<BR> StringReader input;<BR> input=new java.io.StringReader(queryString);<BR> org.apache.lucene.analysis.TokenStream tokenizer=new M……
查看全文
发表于:2007-10-06 ┆
阅读(819)
┆
评论(2)