|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.query.lucene.QueryHits
Wraps the lucene Hits
object and adds a close method that allows
to release resources after a query has been executed and the results have
been read completely.
Constructor Summary | |
QueryHits(org.apache.lucene.search.Hits hits,
org.apache.lucene.index.IndexReader reader)
Creates a new QueryHits instance wrapping hits . |
Method Summary | |
void |
close()
Releases resources held by this hits instance. |
org.apache.lucene.document.Document |
doc(int n)
Returns the n th document in this QueryHits. |
int |
id(int n)
Returns the document number for the n th document
in this QueryHits. |
int |
length()
Returns the number of results. |
float |
score(int n)
Returns the score for the n th document in this
QueryHits. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueryHits(org.apache.lucene.search.Hits hits, org.apache.lucene.index.IndexReader reader)
QueryHits
instance wrapping hits
.
hits
- the lucene hits.reader
- the IndexReader in use by hits
.Method Detail |
public final void close() throws IOException
IOException
- if an error occurs while releasing resources.public final int length()
public final org.apache.lucene.document.Document doc(int n) throws IOException
n
th document in this QueryHits.
n
- index.
n
th document in this QueryHits.
IOException
- if an error occurs while reading from the index.public final float score(int n) throws IOException
n
th document in this
QueryHits.
n
- index.
n
th document.
IOException
public final int id(int n) throws IOException
n
th document
in this QueryHits.
n
- index.
n
th
document.
IOException
- if an error occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |