public class LuceneQueryHits extends Object implements QueryHits
Constructor and Description |
---|
LuceneQueryHits(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.search.Query query) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases resources held by this hits instance.
|
int |
getSize() |
ScoreNode |
nextScoreNode()
Returns the next score node in this QueryHits or
null if
there are no more score nodes. |
void |
skip(int n)
Skips a
n score nodes. |
public LuceneQueryHits(org.apache.lucene.index.IndexReader reader, org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.Query query) throws IOException
IOException
public ScoreNode nextScoreNode() throws IOException
null
if
there are no more score nodes.nextScoreNode
in interface QueryHits
IOException
- if an error occurs while reading from the index.public void close() throws IOException
close
in interface CloseableHits
IOException
- if an error occurs while releasing resources.public int getSize()
getSize
in interface CloseableHits
public void skip(int n) throws IOException
n
score nodes.skip
in interface CloseableHits
n
- the number of score nodes to skip.IOException
- if an error occurs while skipping.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.