SearchPagedResponse Class

public final class SearchPagedResponse
extends PagedResponseBase<Void,SearchResult>

Represents an HTTP response from the search API request that contains a list of items deserialized into a 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 Summary

Constructor Description
SearchPagedResponse(Response<List<SearchResult>> response, String continuationToken, Map<String,List<FacetResult>> facets, Long count, Double coverage)

Deprecated

Use SearchPagedResponse#SearchPagedResponse(Response, String, Map, Long, Double, List, SemanticErrorReason, SemanticSearchResultsType, DebugInfo, SemanticQueryRewritesResultType)

Constructor

SearchPagedResponse(Response<List<SearchResult>> response, String continuationToken, Map<String,List<FacetResult>> facets, Long count, Double coverage, List<QueryAnswerResult> queryAnswers, SemanticErrorReason semanticErrorReason, SemanticSearchResultsType semanticSearchResultsType)

Deprecated

Use SearchPagedResponse#SearchPagedResponse(Response, String, Map, Long, Double, List, SemanticErrorReason, SemanticSearchResultsType, DebugInfo, SemanticQueryRewritesResultType)

Constructor

SearchPagedResponse(Response<List<SearchResult>> response, String continuationToken, Map<String,List<FacetResult>> facets, Long count, Double coverage, List<QueryAnswerResult> queryAnswers, SemanticErrorReason semanticErrorReason, SemanticSearchResultsType semanticSearchResultsType, DebugInfo debugInfo, SemanticQueryRewritesResultType semanticQueryRewritesResultType)

Constructor

Method Summary

Modifier and Type Method and Description
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.

DebugInfo getDebugInfo()

Get the debugInfo property: Debug information that applies to the search results as a whole.

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.

SemanticSearchResults getSemanticResults()

The semantic search results based on the search request.

List<SearchResult> getValue()

Methods inherited from PagedResponseBase

Methods inherited from java.lang.Object

Constructor Details

SearchPagedResponse

@Deprecated
public SearchPagedResponse(Response<List<SearchResult>> response, String continuationToken, Map<String,List<FacetResult>> facets, Long count, Double coverage)

Deprecated

Use SearchPagedResponse#SearchPagedResponse(Response, String, Map, Long, Double, List, SemanticErrorReason, SemanticSearchResultsType, DebugInfo, SemanticQueryRewritesResultType)

Constructor

Parameters:

response - The response containing information such as the request, status code, headers, and values.
continuationToken - Continuation token for the next operation.
facets - Facets contained in the search.
count - Total number of documents available as a result for the search.
coverage - Percent of the index used in the search operation.

SearchPagedResponse

@Deprecated
public SearchPagedResponse(Response<List<SearchResult>> response, String continuationToken, Map<String,List<FacetResult>> facets, Long count, Double coverage, List<QueryAnswerResult> queryAnswers, SemanticErrorReason semanticErrorReason, SemanticSearchResultsType semanticSearchResultsType)

Deprecated

Use SearchPagedResponse#SearchPagedResponse(Response, String, Map, Long, Double, List, SemanticErrorReason, SemanticSearchResultsType, DebugInfo, SemanticQueryRewritesResultType)

Constructor

Parameters:

response - The response containing information such as the request, status code, headers, and values.
continuationToken - Continuation token for the next operation.
facets - Facets contained in the search.
count - Total number of documents available as a result for the search.
coverage - Percent of the index used in the search operation.
queryAnswers - Answers contained in the search.
semanticErrorReason - Reason that a partial response was returned for a semantic search request.
semanticSearchResultsType - Type of the partial response returned for a semantic search request.

SearchPagedResponse

public SearchPagedResponse(Response<List<SearchResult>> response, String continuationToken, Map<String,List<FacetResult>> facets, Long count, Double coverage, List<QueryAnswerResult> queryAnswers, SemanticErrorReason semanticErrorReason, SemanticSearchResultsType semanticSearchResultsType, DebugInfo debugInfo, SemanticQueryRewritesResultType semanticQueryRewritesResultType)

Constructor

Parameters:

response - The response containing information such as the request, status code, headers, and values.
continuationToken - Continuation token for the next operation.
facets - Facets contained in the search.
count - Total number of documents available as a result for the search.
coverage - Percent of the index used in the search operation.
queryAnswers - Answers contained in the search.
semanticErrorReason - Reason that a partial response was returned for a semantic search request.
semanticSearchResultsType - Type of the partial response returned for a semantic search request.
debugInfo - Debug information that applies to the search results as a whole.
semanticQueryRewritesResultType - Type of the partial response returned for a semantic query rewrites request.

Method Details

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.

getDebugInfo

public DebugInfo getDebugInfo()

Get the debugInfo property: Debug information that applies to the search results as a whole.

Returns:

the debugInfo value.

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.

getSemanticResults

public SemanticSearchResults getSemanticResults()

The semantic search results based on the search request.

If semantic search wasn't requested this will return a SemanticSearchResults with no values.

Returns:

The semantic search results if semantic search was requested, otherwise an empty SemanticSearchResults.

getValue

public List<SearchResult> getValue()

Applies to