Search code examples
azureazure-cognitive-search

Azure Search - Error in creating indexer


I am following this MSDN link to create an azure indexer but it is showing below error. I am able to create the datasource and index but not indexer. It says it is not able to parse connection string but there is no where I can provide connection string.

Invoke-WebRequest : {"error":{"code":"","message":"Connection string could not be parsed. It must be in one of the following formats: 'DefaultEndpointsProtocol=https;AccountName=[your storage account];AccountKey=[your account key];' or 'BlobEndpoint=[your blob endpoint URI];SharedAccessSignature=[your account shared access token];' or 'ContainerSharedAccessUri=[your container shared access token with read and list permissions]'"}} At line:15 char:17 + ... $response = Invoke-WebRequest -Uri $indexerApiUrl -Headers $RequestHe ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest ) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands .InvokeWebRequestCommand


Solution

  • The error refers to the connection string you used to create the datasource. That connection string is fully validated only when creating the indexer. Update your datasource with a valid connection string, and try creating the indexer again.