# Retail v2 API - Class SearchServiceClientImpl (2.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.15.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.14.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.SearchServiceClientImpl)

    public sealed class SearchServiceClientImpl : SearchServiceClient

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

SearchService client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [SearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient) \> SearchServiceClientImpl

## Inherited Members

[SearchServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_DefaultEndpoint) [SearchServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_DefaultScopes) [SearchServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_ServiceMetadata) [SearchServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_CreateAsync_System_Threading_CancellationToken_) [SearchServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_Create) [SearchServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_ShutdownDefaultChannelsAsync) [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)

## Assembly

Google.Cloud.Retail.V2.dll

## Remarks

Service for search.

This feature is only available for users who have Retail Search enabled.
Enable Retail Search on Cloud Console before using this feature.

## Constructors

### SearchServiceClientImpl(SearchServiceClient, SearchServiceSettings, ILogger)

    public SearchServiceClientImpl(SearchService.SearchServiceClient grpcClient, SearchServiceSettings settings, ILogger logger)

Constructs a client wrapper for the SearchService service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchService.SearchServiceClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceSettings` The base [SearchServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override SearchService.SearchServiceClient GrpcClient { get; }

The underlying gRPC SearchService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchService.SearchServiceClient` |   |

**Overrides** [SearchServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_GrpcClient)

### LocationsClient

    public override LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

**Overrides** [SearchServiceClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_LocationsClient)

## Methods

### Search(SearchRequest, CallSettings)

    public override PagedEnumerable<SearchResponse, SearchResponse.Types.SearchResult> Search(SearchRequest request, CallSettings callSettings = null)

Performs a search.

This feature is only available for users who have Retail Search enabled.
Enable Retail Search on Cloud Console before using this feature.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult` | A pageable sequence of [SearchResponse.Types.SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult) resources. |

**Overrides** [SearchServiceClient.Search(SearchRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_Search_Google_Cloud_Retail_V2_SearchRequest_Google_Api_Gax_Grpc_CallSettings_)

### SearchAsync(SearchRequest, CallSettings)

    public override PagedAsyncEnumerable<SearchResponse, SearchResponse.Types.SearchResult> SearchAsync(SearchRequest request, CallSettings callSettings = null)

Performs a search.

This feature is only available for users who have Retail Search enabled.
Enable Retail Search on Cloud Console before using this feature.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult` | A pageable asynchronous sequence of [SearchResponse.Types.SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult) resources. |

**Overrides** [SearchServiceClient.SearchAsync(SearchRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SearchServiceClient#Google_Cloud_Retail_V2_SearchServiceClient_SearchAsync_Google_Cloud_Retail_V2_SearchRequest_Google_Api_Gax_Grpc_CallSettings_)