Azure Search DataSource with on-premise SQL Server and best practices?

こ雲淡風輕ζ 提交于 2020-01-16 02:10:24

问题


Documentation on Azure Search says I can use Azure Sql server as a datasource(https://azure.microsoft.com/en-us/documentation/articles/search-howto-connecting-azure-sql-database-to-azure-search-using-indexers-2015-02-28/). Can I do the same with an on-premise SQL server?

I have a typical relational structure like

User Table -> Address Table
User Table -> UserDetails table
etc..

All linked to each other via foreign keys. My search should end up with an UserId, so I can link to my UserDetailsPage.aspx?UserId=xxx

What will be the best suggested way to build the datasource? Should I Create a view and apply change tracking on it? or Should I create a different datasource for each table and sync the concerned index?

Please shed some light on best practices in a typical relational database scenario.


回答1:


you would need to allow the IP address of your search service to connect to your on-prem DB. In terms of view vs. multiple indexers targeting the same index - both approaches might work. What info will your users be searching on - address, details, or both? If it's only one of those, then you wouldn't have to index both tables.

Keep in mind that if you decide to index a view joining both tables, you won't be able to use SQL integrated change tracking, and will have to rely on a rowversion or timestamp column in the view.

HTH



来源:https://stackoverflow.com/questions/31881304/azure-search-datasource-with-on-premise-sql-server-and-best-practices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!