Package 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:
Serializable,Iterable<T>
public class Results<T> extends Object implements Iterable<T>, 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 Description CursorgetCursor()A cursor to be used to continue the search after all the results in this search response.Collection<FacetResult>getFacets()longgetNumberFound()The number of results found by the search.intgetNumberReturned()OperationResultgetOperationResult()Collection<T>getResults()Iterator<T>iterator()StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
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 Collection<T> getResults()
- Returns:
- an unmodifiable collection of search results
-
getFacets
public 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
nullif there are no more results to be expected or if no cursor was configured in theQueryOptions.
-
-