com.arsdigita.search
Interface ResultSet

All Known Implementing Classes:
CachedResultSet

public interface ResultSet

This interface provides an API for accessing the documents matching a search query in an efficient manner. It allows for retrieval of a 'page' of results & associated metadata such as the total number of results & the search duration.

See Also:
Document

Method Summary
 void close()
          Releases any resources associated with this result set.
 long getCount()
          Returns the total number of results in the set
 Iterator getDocuments(long offset, long count)
          Gets an iterator for the page of results between offset and offset+count
 String getEngine()
          Return the query engine used to generate the result set
 long getQueryTime()
          Return the elapsed time for generating this result set from the original query specification.
 

Method Detail

getDocuments

public Iterator getDocuments(long offset,
                             long count)
Gets an iterator for the page of results between offset and offset+count

Parameters:
offset - the first hit, starting from 0
count - the maximum number of results to return
Returns:
an iterator of Document objects
Throws:
java.lang.IllegalOperationException - if close has been called

close

public void close()
Releases any resources associated with this result set. This is a no-op if the result set doesn't have any system resources allocated


getCount

public long getCount()
Returns the total number of results in the set

Returns:
the result count

getQueryTime

public long getQueryTime()
Return the elapsed time for generating this result set from the original query specification.

Returns:
the query time in milliseconds

getEngine

public String getEngine()
Return the query engine used to generate the result set

Returns:
the query engine


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC