Class SearchIndexerClientBuilder

java.lang.Object
com.azure.search.documents.indexes.SearchIndexerClientBuilder
All Implemented Interfaces:
AzureKeyCredentialTrait<SearchIndexerClientBuilder>, ConfigurationTrait<SearchIndexerClientBuilder>, EndpointTrait<SearchIndexerClientBuilder>, HttpTrait<SearchIndexerClientBuilder>, TokenCredentialTrait<SearchIndexerClientBuilder>

This class provides a fluent builder API to help aid the configuration and instantiation of SearchIndexerClients and SearchIndexerAsyncClients. Call buildClient and buildAsyncClient respectively to construct an instance of the desired client.

The following must be provided to construct a client instance.

  • The Azure Cognitive Search service URL.
  • An AzureKeyCredential that grants access to the Azure Cognitive Search service.

Instantiating an asynchronous Search Indexer Client

 SearchIndexerAsyncClient searchIndexerAsyncClient = new SearchIndexerClientBuilder()
     .credential(new AzureKeyCredential("{key}"))
     .endpoint("{endpoint}")
     .buildAsyncClient();
 

Instantiating a synchronous Search Indexer Client

 SearchIndexerClient searchIndexerClient = new SearchIndexerClientBuilder()
     .credential(new AzureKeyCredential("{key}"))
     .endpoint("{endpoint}")
     .buildClient();
 
See Also: