Encapsulates results of a search operation.
Each
AppSearchClient.search(String, SearchSpec, String)
operation returns a list of
SearchResult
objects, referred to as a "page", limited by the size configured by
SearchSpec.Builder.setResultCountPerPage(int)
.
To fetch a page of results, call getNextPage()
.
All instances of SearchResults
must call close()
after the results are fetched.
This class is not thread safe.
This class is specific to GMSCore AppSearch module and will not be synced to Framework.
Public Method Summary
void |
close()
|
Task<List<SearchResult>> |
getNextPage()
Retrieves the next page of
SearchResult
objects.
|
Inherited Method Summary
Public Methods
public void close ()
public Task<List<SearchResult>> getNextPage ()
Retrieves the next page of SearchResult
objects.
The page size is configured by
SearchSpec.Builder.setResultCountPerPage(int)
.
Continue calling this method to access results until it returns an empty list, signifying there are no more results.