Nutch 每条索引记录的字段
url: 作为唯一标标识值,由BasicIndexingFilter类产生。
segment: 由Indexer类产生。Nutch抓回来的页面内容放在segments目录,lucene只会索引,不会store原文内容,因此在查询时要以 segment与url作为外键,由FetchedSegments类根据hitsDetail从segments目录获得content。
boost:优先级,由Indexer类调用插件计算产生。
title:显示标题,在BasicIndexingFilter插件中被索引和存储。
content: 主要的被搜索项,在BasicIndexingFilter插件中被索引。
anchor: 锚文本
digest:MD5摘要
大多数Field是自身的信息,boost字段却要注意,它是根据该网页的入链接计算的。入链接越多,该值越大。该值并非简单等于入链接,而是计算公式如下:ln(e + n), 其中的n即入链接数目。the number of inbound links.
In our example, only page B links to page A, so there is only one inbound link, and the boost works out as ln(e + 1) = 1.3132616 ...
什么时候Page Scores不是1.0呢?Nutch自带了一个工具 LinkAnalysisTool 用来像PageRank那样根据入链接数目为每个页面计算一个得分(以及入链接页面的权重)。
很好的一篇文章: