org.apache.jackrabbit.core.query.lucene.hits
Class ScorerHits

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.hits.ScorerHits
All Implemented Interfaces:
Hits

public class ScorerHits
extends Object
implements Hits

Wraps a Scorer in a Hits instance.


Constructor Summary
ScorerHits(org.apache.lucene.search.Scorer scorer)
           
 
Method Summary
 int next()
          Return the doc number of the next hit in the set.
 void set(int doc)
          Marks the document with doc number doc as a hit.
 int skipTo(int target)
          Skips to the first match beyond the current whose document number is greater than or equal to the given target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScorerHits

public ScorerHits(org.apache.lucene.search.Scorer scorer)
Method Detail

set

public void set(int doc)
Marks the document with doc number doc as a hit. Implementations may throw an exception if you call set() after next() or skipTo() has been called.

Specified by:
set in interface Hits

next

public int next()
         throws IOException
Return the doc number of the next hit in the set. Subsequent calls never return the same doc number.

Specified by:
next in interface Hits
Throws:
IOException

skipTo

public int skipTo(int target)
           throws IOException
Skips to the first match beyond the current whose document number is greater than or equal to the given target. Returns -1 if there is no matching document number greater than target.

Specified by:
skipTo in interface Hits
Throws:
IOException


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