org.apache.jackrabbit.core.query.lucene.hits
Interface Hits

All Known Implementing Classes:
AdaptingHits, ArrayHits, BitSetHits, HitsIntersection, ScorerHits

public interface Hits

Representation of a set of hits


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.
 

Method Detail

set

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.


next

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

Throws:
IOException

skipTo

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.

Throws:
IOException


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