Class SearchPagedIterable

java.lang.Object
com.azure.core.util.IterableStream<T>
com.azure.core.util.paging.ContinuablePagedIterable<String,T,P>
com.azure.core.http.rest.PagedIterableBase<SearchResult,SearchPagedResponse>
com.azure.search.documents.util.SearchPagedIterable
All Implemented Interfaces:
Iterable<SearchResult>

public final class SearchPagedIterable extends com.azure.core.http.rest.PagedIterableBase<SearchResult,SearchPagedResponse>
Implementation of ContinuablePagedIterable where the continuation token type is SearchRequest, the element type is SearchResult, and the page type is SearchPagedResponse.
  • Constructor Details

    • SearchPagedIterable

      public SearchPagedIterable(SearchPagedFlux pagedFlux)
      Creates an instance of SearchPagedIterable.
      Parameters:
      pagedFlux - The SearchPagedFlux that will be consumed as an iterable.
    • SearchPagedIterable

      public SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever)
      Creates an instance of SearchPagedIterable. The constructor takes a Supplier. The Supplier returns the first page of SearchPagedResponse.
      Parameters:
      firstPageRetriever - Supplier that retrieves the first page
    • SearchPagedIterable

      public SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever, Function<String,SearchPagedResponse> nextPageRetriever)
      Creates an instance of SearchPagedIterable. The constructor takes a Supplier and Function. The Supplier returns the first page of SearchPagedResponse, the Function retrieves subsequent pages of SearchPagedResponse.
      Parameters:
      firstPageRetriever - Supplier that retrieves the first page
      nextPageRetriever - Function that retrieves the next page given a continuation token
  • Method Details

    • getCoverage

      public Double getCoverage()
      The percentage of the index covered in the search request.

      If minimumCoverage wasn't supplied in the request this will be null.

      Returns:
      The percentage of the index covered in the search request if minimumCoverage was set in the request, otherwise null.
    • getFacets

      public Map<String,List<FacetResult>> getFacets()
      The facet query results based on the search request.

      If facets weren't supplied in the request this will be null.

      Returns:
      The facet query results if facets were supplied in the request, otherwise null.
    • getTotalCount

      public Long getTotalCount()
      The approximate number of documents that matched the search and filter parameters in the request.

      If count is set to false in the request this will be null.

      Returns:
      The approximate number of documents that match the request if count is true, otherwise null.
    • getAnswers

      public List<AnswerResult> getAnswers()
      The answer results based on the search request.

      If answers wasn't supplied in the request this will be null.

      Returns:
      The answer results if answers were supplied in the request, otherwise null.