org.compass.spring.web.mvc
Class CompassSearchResults

java.lang.Object
  extended by org.compass.spring.web.mvc.CompassSearchResults

public class CompassSearchResults
extends Object

The results object returned by CompassSearchController when the search operation on Compass is executed.

Holds the time it took to perform the search operation (in milliseconds), an array of CompassHit (which might be all the hits, or only paginated hits) and an array of Pages if using the pagination feature..

Author:
kimchy

Nested Class Summary
static class CompassSearchResults.Page
          A class which holds the page data if using the pagination feature.
 
Constructor Summary
CompassSearchResults(CompassHit[] hits, long searchTime)
           
 
Method Summary
 CompassHit[] getHits()
          Returns the hits that resulted from the search operation.
 CompassSearchResults.Page[] getPages()
          Returns the pages that construct all the results.
 long getSearchTime()
          Returns the time that it took to perform the search operation (in milliseconds).
 void setPages(CompassSearchResults.Page[] pages)
          Sets the pages that contruct all the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompassSearchResults

public CompassSearchResults(CompassHit[] hits,
                            long searchTime)
Method Detail

getHits

public CompassHit[] getHits()
Returns the hits that resulted from the search operation. Might hold all the hits (not using pagination) or only the hits that belong to the selected page (if using pagination).

Returns:
The hits

getSearchTime

public long getSearchTime()
Returns the time that it took to perform the search operation (in milliseconds).

Returns:
How long it took to perform the serarch in milli-seconds.

getPages

public CompassSearchResults.Page[] getPages()
Returns the pages that construct all the results.

Returns:
The pages that holds all the results

setPages

public void setPages(CompassSearchResults.Page[] pages)
Sets the pages that contruct all the results.

Parameters:
pages -


Copyright (c) 2004-2006 The Compass Project.