Class QueryHitsAdapter
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.QueryHitsAdapter
-
- All Implemented Interfaces:
CloseableHits
,MultiColumnQueryHits
public class QueryHitsAdapter extends Object implements MultiColumnQueryHits
-
-
Constructor Summary
Constructors Constructor Description QueryHitsAdapter(QueryHits hits, Name selectorName)
Creates a new adapter forhits
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases resources held by this hits instance.Name[]
getSelectorNames()
int
getSize()
ScoreNode[]
nextScoreNodes()
Returns the next score nodes in this QueryHits ornull
if there are no more score nodes.void
skip(int n)
Skips an
score nodes.
-
-
-
Method Detail
-
nextScoreNodes
public ScoreNode[] nextScoreNodes() throws IOException
Returns the next score nodes in this QueryHits ornull
if there are no more score nodes.- Specified by:
nextScoreNodes
in interfaceMultiColumnQueryHits
- Returns:
- the next score nodes in this QueryHits.
- Throws:
IOException
- if an error occurs while reading from the index.
-
getSelectorNames
public Name[] getSelectorNames()
- Specified by:
getSelectorNames
in interfaceMultiColumnQueryHits
- Returns:
- the selector names that correspond to the
ScoreNode
s returned byMultiColumnQueryHits.nextScoreNodes()
.
-
close
public void close() throws IOException
Releases resources held by this hits instance.- Specified by:
close
in interfaceCloseableHits
- Throws:
IOException
- if an error occurs while releasing resources.
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceCloseableHits
- Returns:
- the number of results or
-1
if the size is unknown.
-
skip
public void skip(int n) throws IOException
Skips an
score nodes.- Specified by:
skip
in interfaceCloseableHits
- Parameters:
n
- the number of score nodes to skip.- Throws:
IOException
- if an error occurs while skipping.
-
-