SearchPagedResponse Class

  • java.lang.Object
    • com.azure.search.documents.models.SearchPagedResponse

Implements

public final class SearchPagedResponse
implements ContinuablePage<SearchContinuationToken,SearchResult>, Response<List<SearchResult>>

Class representing a page returned by the search API.

Constructor Summary

Constructor Description
SearchPagedResponse(Response<BinaryData> response, SearchServiceVersion serviceVersion)

Creates a new SearchPagedResponse from the paged response.

Method Summary

Modifier and Type Method and Description
List<QueryAnswerResult> getAnswers()

Get the answers property: The answers query results for the search operation; null if the answers query parameter was not specified or set to 'none'.

SearchContinuationToken getContinuationToken()
Long getCount()

Get the count property: The total count of results found by the search operation, or null if the count was not requested.

Double getCoverage()

Get the coverage property: A value indicating the percentage of the index that was included in the query, or null if minimumCoverage was not specified in the request.

IterableStream<SearchResult> getElements()
Map<String,List<FacetResult>> getFacets()

Get the facets property: The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions.

HttpHeaders getHeaders()
HttpRequest getRequest()
SemanticErrorReason getSemanticPartialResponseReason()

Get the semanticPartialResponseReason property: Reason that a partial response was returned for a semantic ranking request.

SemanticSearchResultsType getSemanticPartialResponseType()

Get the semanticPartialResponseType property: Type of partial response that was returned for a semantic ranking request.

int getStatusCode()
List<SearchResult> getValue()

Methods inherited from java.lang.Object

Constructor Details

SearchPagedResponse

public SearchPagedResponse(Response<BinaryData> response, SearchServiceVersion serviceVersion)

Creates a new SearchPagedResponse from the paged response.

Parameters:

response - The response containing search result.
serviceVersion - The service version used to send the search request, used by the getContinuationToken() to ensure iterating through pages remains on the same service version.

Method Details

getAnswers

public List<QueryAnswerResult> getAnswers()

Get the answers property: The answers query results for the search operation; null if the answers query parameter was not specified or set to 'none'.

Returns:

the answers value.

getContinuationToken

public SearchContinuationToken getContinuationToken()

getCount

public Long getCount()

Get the count property: The total count of results found by the search operation, or null if the count was not requested. If present, the count may be greater than the number of results in this response. This can happen if you use the $top or $skip parameters, or if the query can't return all the requested documents in a single response.

Returns:

the count value.

getCoverage

public Double getCoverage()

Get the coverage property: A value indicating the percentage of the index that was included in the query, or null if minimumCoverage was not specified in the request.

Returns:

the coverage value.

getElements

public IterableStream<SearchResult> getElements()

getFacets

public Map<String,List<FacetResult>> getFacets()

Get the facets property: The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions.

Returns:

the facets value.

getHeaders

public HttpHeaders getHeaders()

getRequest

public HttpRequest getRequest()

getSemanticPartialResponseReason

public SemanticErrorReason getSemanticPartialResponseReason()

Get the semanticPartialResponseReason property: Reason that a partial response was returned for a semantic ranking request.

Returns:

the semanticPartialResponseReason value.

getSemanticPartialResponseType

public SemanticSearchResultsType getSemanticPartialResponseType()

Get the semanticPartialResponseType property: Type of partial response that was returned for a semantic ranking request.

Returns:

the semanticPartialResponseType value.

getStatusCode

public int getStatusCode()

getValue

public List<SearchResult> getValue()

Applies to