继续回到查询
作者:admin 日期:2006-10-03
Nutch 初始化完毕之后,查询的所有准备条件已经完成,搜索会执行到一下方法:
public Hits search(Query query, int numHits,
int maxHitsPerDup, String dedupField,
String sortField, boolean reverse)
throws IOException
在NutchBean 中的所有查询 方法最终都会转换到这个方法来。需要注意的是,如果是采用分布的查询服务器,则searcher 是 DistributedSearch.Client 类型的,否则 类型就是 IndexSearcher ;
IndexSearcher 是 Searcher 接口的一个实现 ,这个接口只有两个查询方法:
Tags: 搜索引擎 Nutch Lucene
北京线点科技 致力于以数据和搜索为核心的业务 (全文检索、舆情监控、搜索引擎产品)http://www.xd-tech.com
- 1






