Before we start, please read these documents Introduction to Azure Cognitive Search and Data sources gallery - Azure Cognitive Search.
Referred from these documents above you should understand the relationship between Azure Search service, Index and Data source. The Search Service saves un-indexed data from data sources to its indexes, then client application could search the results from index through queries. The highlight part in below image shows the process of the indexing.
But how about the data sources under private network, how could we set the connection between them? According to our document Connect through a private endpoint - Azure Cognitive Search | Microsoft Docs we have shared private endpoint as the outbound of Search service.
Below is the test I did to explain how we use shared private endpoint between Azure search with SQL Database.
So I approved it, after that I backed to my Search Service shared private access again, this shared private endpoint showed connection state “Approved”.
What’s the reason? Here please be careful, before we add this SQL DB as the data source of Search Service, we need to test the connection through that button “Test connection”. Here we test between the Azure portal and Azure SQL database. Like this error messages in the screenshot, we need to add the client IP of portal in SQL server firewall list.
Thus, I added the Client Ip in my SQL server firewall list. After that tested add data source again. It passed the test connection and added my table in the SQL DB.
{
"name": "indexer",
"dataSourceName": "sql-datasource",
"targetIndexName": "index",
"parameters": {
"configuration": {
" executionEnvironment ": "private"
}
},
"fieldMappings": []
}
In conclusion to add a SQL Database from private network please remember these steps in below:
If you want to add other data source like Storage Account, it doesn’t have the step to test connection. Then it’s not necessary to add Azure portal IP in the firewall list to set up Search Service data source.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.