public final class SortedLuceneQueryHits extends AbstractQueryHits
| Constructor and Description |
|---|
SortedLuceneQueryHits(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.search.Query query,
org.apache.lucene.search.Sort sort,
long resultFetchHint)
Creates a new
QueryHits instance wrapping hits. |
| Modifier and Type | Method and Description |
|---|---|
int |
getSize()
This default implementation returns
-1. |
ScoreNode |
nextScoreNode()
Returns the next score node in this QueryHits or
null if
there are no more score nodes. |
void |
skip(int n)
Skips
n hits. |
closepublic SortedLuceneQueryHits(org.apache.lucene.search.IndexSearcher searcher,
org.apache.lucene.search.Query query,
org.apache.lucene.search.Sort sort,
long resultFetchHint)
throws IOException
QueryHits instance wrapping hits.searcher - the index searcher.query - the query to execute.sort - the sort criteria.resultFetchHint - a hint on how many results should be pre-fetched from the
lucene index.IOException - if an error occurs while reading from the index.public int getSize()
-1.getSize in interface CloseableHitsgetSize in class AbstractQueryHits-1.public ScoreNode nextScoreNode() throws IOException
null if
there are no more score nodes.IOException - if an error occurs while reading from the index.public void skip(int n)
throws IOException
n hits.skip in interface CloseableHitsskip in class AbstractQueryHitsn - the number of hits to skip.IOException - if an error occurs while skipping.Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.