package org.apache.nutch.indexer;
1。static OutputFormat
类用来初始化lucene对象并设置lucene各个参数。各个参数从JobConf job参数中获取。
2. public void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter)
对iterator中的数据进行循环,判断当前的数据是否是Inlinks、CrawlDatum,结果将segment和digest,boost加权字段加入索引。
3. public void index
初始化JobConf类对象并设置各种参数。
4. public int run(String[] args)
判断输入的参数是否是四个,含义是<index> <crawldb> <linkdb> <segment>,然后调用index函数
1。static OutputFormat
类用来初始化lucene对象并设置lucene各个参数。各个参数从JobConf job参数中获取。
2. public void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter)
对iterator中的数据进行循环,判断当前的数据是否是Inlinks、CrawlDatum,结果将segment和digest,boost加权字段加入索引。
3. public void index
初始化JobConf类对象并设置各种参数。
4. public int run(String[] args)
判断输入的参数是否是四个,含义是<index> <crawldb> <linkdb> <segment>,然后调用index函数
本文介绍Apache Nutch中的Lucene索引配置过程,包括使用staticOutputFormat类初始化Lucene对象并设置参数,reduce方法处理数据,以及通过index方法初始化JobConf并设置参数。
472

被折叠的 条评论
为什么被折叠?



