SearchResults

public classSearchResultsextendsObject
implementsCloseable

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, callgetNextPage().

All instances ofSearchResults must callclose() 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 ofSearchResult objects.

Inherited Method Summary

Public Methods

public voidclose()

public Task<List<SearchResult>> getNextPage()

Retrieves the next page ofSearchResult 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.