org.apache.nutch.indexer.field
Class BasicFields.Scorer

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by 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.


Constructor Summary
BasicFields.Scorer()
           
 
Method Summary
 void close()
           
 void configure(JobConf conf)
          Configures the job.
 void map(Text key, Writable value, OutputCollector<Text,ObjectWritable> output, Reporter reporter)
          Wraps values in ObjectWritable.
 void reduce(Text key, Iterator<ObjectWritable> values, OutputCollector<Text,FieldsWritable> output, Reporter reporter)
          Sets a document boost field from the NodeDb and determines the best scoring url for pages that have rediects.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFields.Scorer

public BasicFields.Scorer()
Method Detail

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