net.nutch.searcher
Class Hit

java.lang.Object
  extended bynet.nutch.searcher.Hit
All Implemented Interfaces:
Comparable, Writable

public class Hit
extends Object
implements Writable, Comparable

A document which matched a query in an index.


Constructor Summary
Hit()
           
Hit(int indexDocNo, float score, String site)
           
Hit(int indexNo, int indexDocNo, float score, String site)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 int getIndexDocNo()
          Return the document number of this hit within an index.
 int getIndexNo()
          Return the index number that this hit came from.
 float getScore()
          Return the degree to which this document matched the query.
 String getSite()
          Return the name of this this document's website.
 int hashCode()
           
 boolean moreFromSiteExcluded()
          True iff other, lower-scoring, hits from the same site have been excluded from the list which contains this hit..
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void setIndexNo(int indexNo)
           
 void setMoreFromSiteExcluded(boolean more)
          True iff other, lower-scoring, hits from the same site have been excluded from the list which contains this hit..
 String toString()
          Display as a string.
 void write(DataOutput out)
          Writes the fields of this object to 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,
           float score,
           String site)

Hit

public Hit(int indexDocNo,
           float score,
           String site)
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.


getScore

public float getScore()
Return the degree to which this document matched the query.


getSite

public String getSite()
Return the name of this this document's website.


moreFromSiteExcluded

public boolean moreFromSiteExcluded()
True iff other, lower-scoring, hits from the same site have been excluded from the list which contains this hit..


setMoreFromSiteExcluded

public void setMoreFromSiteExcluded(boolean more)
True iff other, lower-scoring, hits from the same site have been excluded from the list which contains this hit..


write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Throws:
IOException

toString

public String toString()
Display as a string.


equals

public boolean equals(Object o)

hashCode

public int hashCode()

compareTo

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


Copyright © 2004 The Nutch Organization.