Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » search » [javadoc | source]
org.apache.lucene.search
public class: Hit [javadoc | source]
java.lang.Object
   org.apache.lucene.search.Hit

All Implemented Interfaces:
    Serializable

Wrapper used by HitIterator to provide a lazily loaded hit from Hits .
Constructor:
 Hit(Hits hits,
    int hitNumber) 
    Parameters:
    hits - Hits returned from a search
    hitNumber - Hit index in Hits
Method from org.apache.lucene.search.Hit Summary:
get,   getBoost,   getDocument,   getId,   getScore,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.Hit Detail:
 public String get(String name) throws IOException, CorruptIndexException 
    Returns the string value of the field with the given name if any exist in this document, or null. If multiple fields exist with this name, this method returns the first value added. If only binary fields with this name exist, returns null.
 public float getBoost() throws IOException, CorruptIndexException 
    Returns the boost factor for this hit on any field of the underlying document.
 public Document getDocument() throws IOException, CorruptIndexException 
    Returns document for this hit.
 public int getId() throws IOException 
    Returns id for this hit.
 public float getScore() throws IOException 
    Returns score for this hit.
 public String toString() 
    Prints the parameters to be used to discover the promised result.