SearchResults


interface SearchResults : Closeable


Encapsulates results of a search operation.

Each search operation returns a list of SearchResult objects, referred to as a "page", limited by the size configured by setResultCountPerPage.

To fetch a page of results, call getNextPageAsync.

All instances of SearchResults must call close after the results are fetched.

This class is not thread safe.

Summary

Public functions

Unit
ListenableFuture<(Mutable)List<SearchResult!>!>

Retrieves the next page of SearchResult objects.

Public functions

close

Added in 1.1.0-alpha06
fun close(): Unit

getNextPageAsync

Added in 1.1.0-alpha06
fun getNextPageAsync(): ListenableFuture<(Mutable)List<SearchResult!>!>

Retrieves the next page of SearchResult objects.

The page size is configured by setResultCountPerPage.

Continue calling this method to access results until it returns an empty list, signifying there are no more results.

Returns
ListenableFuture<(Mutable)List<SearchResult!>!>

a ListenableFuture which resolves to a list of SearchResult objects.