org.apache.nutch.indexer.field
Class BasicFields.Scorer
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.indexer.field.BasicFields.Scorer
- All Implemented Interfaces:
- Closeable, Configurable, JobConfigurable, Mapper<Text,Writable,Text,ObjectWritable>, Reducer<Text,ObjectWritable,Text,FieldsWritable>
- Enclosing class:
- BasicFields
public static class BasicFields.Scorer
- extends Configured
- implements Mapper<Text,Writable,Text,ObjectWritable>, Reducer<Text,ObjectWritable,Text,FieldsWritable>
The Scorer job sets the boost field from the NodeDb score.
It also runs the second part of redirect logic. Determining the highest
scoring url for pages that contain redirects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFields.Scorer
public BasicFields.Scorer()
configure
public void configure(JobConf conf)
- Configures the job.
- Specified by:
configure
in interface JobConfigurable
close
public void close()
- Specified by:
close
in interface Closeable
map
public void map(Text key,
Writable value,
OutputCollector<Text,ObjectWritable> output,
Reporter reporter)
throws IOException
- Wraps values in ObjectWritable.
- Specified by:
map
in interface Mapper<Text,Writable,Text,ObjectWritable>
- Throws:
IOException
reduce
public void reduce(Text key,
Iterator<ObjectWritable> values,
OutputCollector<Text,FieldsWritable> output,
Reporter reporter)
throws IOException
- Sets a document boost field from the NodeDb and determines the best
scoring url for pages that have rediects. Uses the highest scoring url
as the display url in the index.
- Specified by:
reduce
in interface Reducer<Text,ObjectWritable,Text,FieldsWritable>
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation