public interface SearchResults
implements Closeable

Encapsulates results of a search operation.

Each, SearchSpec) 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.


Public methods

abstract void close()
abstract ListenableFuture<List<SearchResult>> getNextPage()

Retrieves the next page of SearchResult objects.

Inherited methods

Public methods


public abstract void close ()


public abstract ListenableFuture<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.

ListenableFuture<List<SearchResult>> a ListenableFuture which resolves to a list of SearchResult objects.