org.apache.nutch.searcher
Class Hit

java.lang.Object
  extended byorg.apache.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 indexNo, int indexDocNo)
           
Hit(int indexNo, int indexDocNo, WritableComparable sortValue, String dedupValue)
           
Hit(int indexDocNo, 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.
 WritableComparable getSortValue()
          Return the value of the field that hits are sorted on.
 int hashCode()
           
 boolean moreFromDupExcluded()
          True iff other, lower-scoring, hits with the same dedup value 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 setMoreFromDupExcluded(boolean more)
          True iff other, lower-scoring, hits with the same deup value 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)

Hit

public Hit(int indexNo,
           int indexDocNo,
           WritableComparable sortValue,
           String dedupValue)

Hit

public Hit(int indexDocNo,
           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 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 iff 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 iff other, lower-scoring, hits with the same deup value have been excluded from the list which contains this hit..


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

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


Copyright © 2006 The Apache Software Foundation