com.google.appengine.api.search
Class SearchResponse

java.lang.Object
  extended by com.google.appengine.api.search.SearchResponse
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<SearchResult>

public final class SearchResponse
extends java.lang.Object
implements java.lang.Iterable<SearchResult>, java.io.Serializable

Represents a result of executing a SearchRequest. The response contains an OperationResult, a collection of SearchResults, count of Documents matched and a count of Documents returned.

See Also:
Serialized Form

Method Summary
 java.lang.String getCursor()
          A cursor to be used to continue the search after all the results in this search response.
 long getMatchedCount()
           
 OperationResult getOperationResult()
           
 java.util.Collection<SearchResult> getResults()
           
 int getReturnedCount()
           
 java.util.Iterator<SearchResult> iterator()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

iterator

public java.util.Iterator<SearchResult> iterator()
Specified by:
iterator in interface java.lang.Iterable<SearchResult>

getOperationResult

public OperationResult getOperationResult()
Returns:
the result of the search operation

getMatchedCount

public long getMatchedCount()
Returns:
the count of documents matched by the search query. If the value is less than or equal to the corresponding SearchRequest.getMatchedCountAccuracy(), then it is accurate, otherwise it is an approximation

getReturnedCount

public int getReturnedCount()
Returns:
the count of documents returned in this search results collection

getResults

public java.util.Collection<SearchResult> getResults()
Returns:
an unmodifiable collection of search results

getCursor

public java.lang.String getCursor()
A cursor to be used to continue the search after all the results in this search response. For this field to be populated, use SearchRequest.Builder.setCursorType(com.google.appengine.api.search.SearchRequest.CursorType) to set the value to SearchRequest.CursorType.RESPONSE_CURSOR, otherwise getCursor() will return null.

Returns:
cursor to be used to get the next set of results after the end of these results. Can be null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object