public final class SearchPagedResponse extends Object implements ContinuablePage<SearchRequest,SearchResult>, Response<List<SearchResult>>
Page. Each page contains additional information returned by the API request. In the Search API case the additional
information is: count - number of total documents returned. Will be returned only if isIncludeTotalResultCount is set
to true coverage - coverage value.| Constructor and Description |
|---|
SearchPagedResponse(SimpleResponse<com.azure.search.implementation.models.SearchDocumentsResult> documentSearchResponse)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
SearchRequest |
getContinuationToken()
Gets the reference to the next page.
|
Long |
getCount()
The approximate number of documents that matched the search and filter parameters in the request.
|
Double |
getCoverage()
The percentage of the index covered in the search request.
|
IterableStream<SearchResult> |
getElements()
Gets an
IterableStream of elements in the page. |
Map<String,List<FacetResult>> |
getFacets()
The facet query results based on the search request.
|
HttpHeaders |
getHeaders()
Gets the headers from the HTTP response.
|
HttpRequest |
getRequest()
Gets the HTTP request which resulted in this response.
|
int |
getStatusCode()
Gets the HTTP response status code.
|
List<SearchResult> |
getValue()
Gets the deserialized value of the HTTP response.
|
public SearchPagedResponse(SimpleResponse<com.azure.search.implementation.models.SearchDocumentsResult> documentSearchResponse)
documentSearchResponse - an http response with the resultspublic Double getCoverage()
If minimumCoverage wasn't supplied in the request this will be null.
minimumCoverage was set in the
request, otherwise null.public Map<String,List<FacetResult>> getFacets()
If facets weren't supplied in the request this will be null.
facets were supplied in the request, otherwise null.public Long getCount()
If count is set to false in the request this will be null.
count is true, otherwise
null.public int getStatusCode()
ResponsegetStatusCode in interface Response<List<SearchResult>>public HttpHeaders getHeaders()
ResponsegetHeaders in interface Response<List<SearchResult>>public HttpRequest getRequest()
ResponsegetRequest in interface Response<List<SearchResult>>public List<SearchResult> getValue()
ResponsegetValue in interface Response<List<SearchResult>>public IterableStream<SearchResult> getElements()
ContinuablePageIterableStream of elements in the page.getElements in interface ContinuablePage<SearchRequest,SearchResult>IterableStream containing the elements in the page.public SearchRequest getContinuationToken()
ContinuablePagegetContinuationToken in interface ContinuablePage<SearchRequest,SearchResult>null if there isn't a next page.Copyright © 2020 Microsoft Corporation. All rights reserved.