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 voidclose()Releases resources held by this hits instance.Name[]getSelectorNames()intgetSize()ScoreNode[]nextScoreNodes()Returns the next score nodes in this QueryHits ornullif there are no more score nodes.voidskip(int n)Skips anscore nodes.
-
-
-
Method Detail
-
nextScoreNodes
public ScoreNode[] nextScoreNodes() throws IOException
Returns the next score nodes in this QueryHits ornullif there are no more score nodes.- Specified by:
nextScoreNodesin 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:
getSelectorNamesin interfaceMultiColumnQueryHits- Returns:
- the selector names that correspond to the
ScoreNodes returned byMultiColumnQueryHits.nextScoreNodes().
-
close
public void close() throws IOExceptionReleases resources held by this hits instance.- Specified by:
closein interfaceCloseableHits- Throws:
IOException- if an error occurs while releasing resources.
-
getSize
public int getSize()
- Specified by:
getSizein interfaceCloseableHits- Returns:
- the number of results or
-1if the size is unknown.
-
skip
public void skip(int n) throws IOExceptionSkips anscore nodes.- Specified by:
skipin interfaceCloseableHits- Parameters:
n- the number of score nodes to skip.- Throws:
IOException- if an error occurs while skipping.
-
-