org.apache.jackrabbit.core.query.lucene
Class SortedMultiColumnQueryHits

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.FilterMultiColumnQueryHits
      extended by org.apache.jackrabbit.core.query.lucene.SortedMultiColumnQueryHits
All Implemented Interfaces:
CloseableHits, MultiColumnQueryHits

public class SortedMultiColumnQueryHits
extends FilterMultiColumnQueryHits

SortedMultiColumnQueryHits implements sorting of query hits based on Orderings.


Constructor Summary
SortedMultiColumnQueryHits(MultiColumnQueryHits hits, Ordering[] orderings, org.apache.lucene.index.IndexReader reader)
          Creates sorted query hits.
 
Method Summary
 ScoreNode[] nextScoreNodes()
          Returns the next score nodes in this QueryHits or null if there are no more score nodes.
 void skip(int n)
          Skips a n score nodes.
 
Methods inherited from class org.apache.jackrabbit.core.query.lucene.FilterMultiColumnQueryHits
close, getSelectorNames, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedMultiColumnQueryHits

public SortedMultiColumnQueryHits(MultiColumnQueryHits hits,
                                  Ordering[] orderings,
                                  org.apache.lucene.index.IndexReader reader)
                           throws IOException
Creates sorted query hits.

Parameters:
hits - the hits to sort.
orderings - the ordering specifications.
reader - the current index reader.
Throws:
IOException - if an error occurs while reading from the index.
Method Detail

nextScoreNodes

public ScoreNode[] nextScoreNodes()
                           throws IOException
Returns the next score nodes in this QueryHits or null if there are no more score nodes.

Specified by:
nextScoreNodes in interface MultiColumnQueryHits
Overrides:
nextScoreNodes in class FilterMultiColumnQueryHits
Returns:
the next score nodes in this QueryHits.
Throws:
IOException - if an error occurs while reading from the index.

skip

public void skip(int n)
          throws IOException
Skips a n score nodes.

Specified by:
skip in interface CloseableHits
Overrides:
skip in class FilterMultiColumnQueryHits
Parameters:
n - the number of score nodes to skip.
Throws:
IOException - if an error occurs while skipping.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.