org.apache.nutch.searcher
Class Hit

java.lang.Object
  extended by org.apache.nutch.searcher.Hit
All Implemented Interfaces:
Comparable, org.apache.hadoop.io.Writable

public class Hit
extends Object
implements org.apache.hadoop.io.Writable, Comparable

A document which matched a query in an index.


Constructor Summary
Hit()
           
Hit(int indexNo, int indexDocNo)
           
Hit(int indexNo, int indexDocNo, org.apache.hadoop.io.WritableComparable sortValue, String dedupValue)
           
Hit(int indexDocNo, org.apache.hadoop.io.WritableComparable sortValue, String dedupValue)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 String getDedupValue()
          Return the value of the field that hits should be deduplicated on.
 int getIndexDocNo()
          Return the document number of this hit within an index.
 int getIndexNo()
          Return the index number that this hit came from.
 org.apache.hadoop.io.WritableComparable getSortValue()
          Return the value of the field that hits are sorted on.
 int hashCode()
           
 boolean moreFromDupExcluded()
          True if other, lower-scoring, hits with the same dedup value have been excluded from the list which contains this hit..
 void readFields(DataInput in)
           
 void setIndexNo(int indexNo)
           
 void setMoreFromDupExcluded(boolean more)
          True if other, lower-scoring, hits with the same dedup value have been excluded from the list which contains this hit..
 String toString()
          Display as a string.
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Hit

public Hit()

Hit

public Hit(int indexNo,
           int indexDocNo)

Hit

public Hit(int indexNo,
           int indexDocNo,
           org.apache.hadoop.io.WritableComparable sortValue,
           String dedupValue)

Hit

public Hit(int indexDocNo,
           org.apache.hadoop.io.WritableComparable sortValue,
           String dedupValue)
Method Detail

getIndexNo

public int getIndexNo()
Return the index number that this hit came from.


setIndexNo

public void setIndexNo(int indexNo)

getIndexDocNo

public int getIndexDocNo()
Return the document number of this hit within an index.


getSortValue

public org.apache.hadoop.io.WritableComparable getSortValue()
Return the value of the field that hits are sorted on.


getDedupValue

public String getDedupValue()
Return the value of the field that hits should be deduplicated on.


moreFromDupExcluded

public boolean moreFromDupExcluded()
True if other, lower-scoring, hits with the same dedup value have been excluded from the list which contains this hit..


setMoreFromDupExcluded

public void setMoreFromDupExcluded(boolean more)
True if other, lower-scoring, hits with the same dedup value have been excluded from the list which contains this hit..


toString

public String toString()
Display as a string.

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2006 The Apache Software Foundation