Class SearchResponse (1.2.0)

public sealed class SearchResponse : IMessage<SearchResponse>, IEquatable<SearchResponse>, IDeepCloneable<SearchResponse>, IBufferMessage, IMessage, IPageResponse<SearchResponse.Types.SearchResult>, IEnumerable<SearchResponse.Types.SearchResult>, IEnumerable

Response message for [SearchService.Search][google.cloud.retail.v2.SearchService.Search] method.

Inheritance

Object > SearchResponse

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

SearchResponse()

public SearchResponse()

SearchResponse(SearchResponse)

public SearchResponse(SearchResponse other)
Parameter
NameDescription
otherSearchResponse

Properties

AttributionToken

public string AttributionToken { get; set; }

A unique search token. This should be included in the [UserEvent][google.cloud.retail.v2.UserEvent] logs resulting from this search, which enables accurate attribution of search model performance.

Property Value
TypeDescription
String

CorrectedQuery

public string CorrectedQuery { get; set; }

If spell correction applies, the corrected query. Otherwise, empty.

Property Value
TypeDescription
String

Facets

public RepeatedField<SearchResponse.Types.Facet> Facets { get; }

Results of facets requested by user.

Property Value
TypeDescription
RepeatedField<SearchResponse.Types.Facet>

NextPageToken

public string NextPageToken { get; set; }

A token that can be sent as [SearchRequest.page_token][google.cloud.retail.v2.SearchRequest.page_token] to retrieve the next page. If this field is omitted, there are no subsequent pages.

Property Value
TypeDescription
String

QueryExpansionInfo

public SearchResponse.Types.QueryExpansionInfo QueryExpansionInfo { get; set; }

Query expansion information for the returned results.

Property Value
TypeDescription
SearchResponse.Types.QueryExpansionInfo

RedirectUri

public string RedirectUri { get; set; }

The URI of a customer-defined redirect page. If redirect action is triggered, no search will be performed, and only [redirect_uri][google.cloud.retail.v2.SearchResponse.redirect_uri] and [attribution_token][google.cloud.retail.v2.SearchResponse.attribution_token] will be set in the response.

Property Value
TypeDescription
String

Results

public RepeatedField<SearchResponse.Types.SearchResult> Results { get; }

A list of matched items. The order represents the ranking.

Property Value
TypeDescription
RepeatedField<SearchResponse.Types.SearchResult>

TotalSize

public int TotalSize { get; set; }

The estimated total count of matched items irrespective of pagination. The count of [results][google.cloud.retail.v2.SearchResponse.results] returned by pagination may be less than the [total_size][google.cloud.retail.v2.SearchResponse.total_size] that matches.

Property Value
TypeDescription
Int32

Methods

GetEnumerator()

public IEnumerator<SearchResponse.Types.SearchResult> GetEnumerator()

Returns an enumerator that iterates through the resources in this response.

Returns
TypeDescription
IEnumerator<SearchResponse.Types.SearchResult>

Explicit Interface Implementations

IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()
Returns
TypeDescription
IEnumerator