SearchClientOptions(SearchClientOptions+ServiceVersion) Constructor

Definition

Initializes a new instance of the SearchClientOptions class.

public SearchClientOptions (Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions+ServiceVersion.V2023_11_01);
public SearchClientOptions (Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions+ServiceVersion.V2024_05_01_Preview);
new Azure.Search.Documents.SearchClientOptions : Azure.Search.Documents.SearchClientOptions.ServiceVersion -> Azure.Search.Documents.SearchClientOptions
Public Sub New (Optional version As SearchClientOptions.ServiceVersion = Azure.Search.Documents.SearchClientOptions+ServiceVersion.V2023_11_01)
Public Sub New (Optional version As SearchClientOptions.ServiceVersion = Azure.Search.Documents.SearchClientOptions+ServiceVersion.V2024_05_01_Preview)

Parameters

version
SearchClientOptions.ServiceVersion

An optional SearchClientOptions.ServiceVersion to specify the version of the REST API to use. For more, see API versions in Azure Cognitive Search.

If not provided, the version will default to the latest supported by this client library. It is recommended that application authors allow the version to float to the latest and library authors pin to a specific version.

Exceptions

Thrown when the version is not supported by this client library.

Applies to