com.google.appengine.api.search
Class Results<T>
- java.lang.Object
-
- com.google.appengine.api.search.Results<T>
-
- Type Parameters:
T
- The type of search result.
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<T>
public class Results<T> extends java.lang.Object implements java.lang.Iterable<T>, java.io.Serializable
Represents a result of executing a search. The Results include anOperationResult
, a collection of results, and a number of found and returned results.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Cursor
getCursor()
A cursor to be used to continue the search after all the results in this search response.java.util.Collection<FacetResult>
getFacets()
long
getNumberFound()
The number of results found by the search.int
getNumberReturned()
OperationResult
getOperationResult()
java.util.Collection<T>
getResults()
java.util.Iterator<T>
iterator()
java.lang.String
toString()
-
-
-
Method Detail
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<T>
-
getOperationResult
public OperationResult getOperationResult()
- Returns:
- the result of the search operation
-
getNumberFound
public long getNumberFound()
The number of results found by the search. If the value is less than or equal to the correspondingQueryOptions.getNumberFoundAccuracy()
, then it is accurate, otherwise it is an approximation- Returns:
- the number of results found
-
getNumberReturned
public int getNumberReturned()
- Returns:
- the number of results returned
-
getResults
public java.util.Collection<T> getResults()
- Returns:
- an unmodifiable collection of search results
-
getFacets
public java.util.Collection<FacetResult> getFacets()
- Returns:
- an unmodifiable collection of aggregated facets for this search results
-
getCursor
public Cursor getCursor()
A cursor to be used to continue the search after all the results in this search response. For this field to be populated, useQueryOptions.Builder.setCursor(com.google.appengine.api.search.Cursor)
with a value ofCursor.newBuilder().build()
, otherwisegetCursor()
will return null.- Returns:
- cursor to be used to get the next set of results after the
end of these results, or
null
if there are no more results to be expected or if no cursor was configured in theQueryOptions
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-