2.16.0 (latest) 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

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

Reference documentation and code samples for the Retail v2 API class SearchResponse.

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> SearchResponse

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[SearchResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SearchResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[SearchResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt), [IPageResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.IPageResponse-1.md.txt)[SearchResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.md.txt)[SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult.md.txt), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)[SearchResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.md.txt)[SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult.md.txt), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Retail.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.md.txt)

## Assembly

Google.Cloud.Retail.V2.dll

## Constructors

### SearchResponse()

    public SearchResponse()

### SearchResponse(SearchResponse)

    public SearchResponse(SearchResponse other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `SearchResponse` |

## Properties

### AppliedControls

    public RepeatedField<string> AppliedControls { get; }

The fully qualified resource name of applied
[controls](https://cloud.google.com/retail/docs/serving-control-rules).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldstring` |   |

### 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** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ConversationalSearchResult

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

This field specifies all related information that is needed on client
side for UI rendering of conversational retail search.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SearchResponseTypesConversationalSearchResult` |   |

### CorrectedQuery

    public string CorrectedQuery { get; set; }

Contains the spell corrected query, if found. If the spell correction type
is AUTOMATIC, then the search results are based on corrected_query.
Otherwise the original query is used for search.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ExperimentInfo

    public RepeatedField<ExperimentInfo> ExperimentInfo { get; }

Metadata related to A/B testing experiment associated with this
response. Only exists when an experiment is triggered.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldExperimentInfo` |   |

### Facets

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

Results of facets requested by user.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldSearchResponseTypesFacet` |   |

### InvalidConditionBoostSpecs

    public RepeatedField<SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec> InvalidConditionBoostSpecs { get; }

The invalid
\[SearchRequest.BoostSpec.condition_boost_specs\]\[google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs\]
that are not applied during serving.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldSearchRequestTypesBoostSpecTypesConditionBoostSpec` |   |

### 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** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### PinControlMetadata

    public PinControlMetadata PinControlMetadata { get; set; }

Metadata for pin controls which were applicable to the request.
This contains two map fields, one for all matched pins and one for pins
which were matched but not applied.

The two maps are keyed by pin position, and the values are the product ids
which were matched to that pin.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PinControlMetadata` |   |

### QueryExpansionInfo

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

Query expansion information for the returned results.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SearchResponseTypesQueryExpansionInfo` |   |

### RedirectUri

    public string RedirectUri { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Results

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

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldSearchResponseTypesSearchResult` |   |

### TileNavigationResult

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

This field specifies all related information for tile navigation that will
be used in client side.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SearchResponseTypesTileNavigationResult` |   |

### 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** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

## Methods

### GetEnumerator()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IEnumeratorSearchResponseTypesSearchResult` |   |