org.apache.lucene.search
Class Hits

java.lang.Object
  |
  +--org.apache.lucene.search.Hits

public final class Hits
extends Object

A ranked list of documents, used to hold search results.


Method Summary
 Document doc(int n)
          Returns the nth document in this set.
 int length()
          Returns the total number of hits available in this set.
 float score(int n)
          Returns the score for the nth document in this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

length

public final int length()
Returns the total number of hits available in this set.

doc

public final Document doc(int n)
                   throws IOException
Returns the nth document in this set.

Documents are cached, so that repeated requests for the same element may return the same Document object.


score

public final float score(int n)
                  throws IOException
Returns the score for the nth document in this set.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.