Package com.azure.search.documents.util
Class SearchPagedIterable
java.lang.Object
com.azure.core.util.IterableStream<SearchResult>
com.azure.core.util.paging.ContinuablePagedIterable<String,SearchResult,SearchPagedResponse>
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 Summary
ConstructorsConstructorDescriptionSearchPagedIterable(SearchPagedFlux pagedFlux) Creates an instance ofSearchPagedIterable.SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever) Creates an instance ofSearchPagedIterable.SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever, Function<String, SearchPagedResponse> nextPageRetriever) Creates an instance ofSearchPagedIterable. -
Method Summary
Modifier and TypeMethodDescriptionThe percentage of the index covered in the search request.The debug information that can be used to further explore your search results.The facet query results based on the search request.The semantic search results based on the search request.The approximate number of documents that matched the search and filter parameters in the request.Methods inherited from class com.azure.core.util.paging.ContinuablePagedIterable
iterableByPage, iterableByPage, iterableByPage, iterableByPage, iterator, stream, streamByPage, streamByPage, streamByPage, streamByPageMethods inherited from class com.azure.core.util.IterableStream
ofMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SearchPagedIterable
Creates an instance ofSearchPagedIterable.- Parameters:
pagedFlux- TheSearchPagedFluxthat will be consumed as an iterable.
-
SearchPagedIterable
Creates an instance ofSearchPagedIterable. The constructor takes aSupplier. TheSupplierreturns the first page ofSearchPagedResponse.- Parameters:
firstPageRetriever- Supplier that retrieves the first page
-
SearchPagedIterable
public SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever, Function<String, SearchPagedResponse> nextPageRetriever) Creates an instance ofSearchPagedIterable. The constructor takes aSupplierandFunction. TheSupplierreturns the first page ofSearchPagedResponse, theFunctionretrieves subsequent pages ofSearchPagedResponse.- Parameters:
firstPageRetriever- Supplier that retrieves the first pagenextPageRetriever- Function that retrieves the next page given a continuation token
-
-
Method Details
-
getCoverage
The percentage of the index covered in the search request.If
minimumCoveragewasn't supplied in the request this will benull.- Returns:
- The percentage of the index covered in the search request if
minimumCoveragewas set in the request, otherwisenull.
-
getFacets
The facet query results based on the search request.If
facetsweren't supplied in the request this will benull.- Returns:
- The facet query results if
facetswere supplied in the request, otherwisenull.
-
getTotalCount
The approximate number of documents that matched the search and filter parameters in the request.If
countis set tofalsein the request this will benull.- Returns:
- The approximate number of documents that match the request if
countistrue, otherwisenull.
-
getSemanticResults
The semantic search results based on the search request.If semantic search wasn't requested this will return a
SemanticSearchResultswith no values.- Returns:
- The semantic search results if semantic search was requested, otherwise an empty
SemanticSearchResults.
-
getDebugInfo
The debug information that can be used to further explore your search results.- Returns:
- The debug information that can be used to further explore your search results.
-