具有本地SQL Server和最佳实践的Azure搜索数据源? [英] Azure Search DataSource with on-premise SQL Server and best practices?

查看:55
本文介绍了具有本地SQL Server和最佳实践的Azure搜索数据源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于Azure搜索的文档说我可以将Azure Sql服务器用作数据源(

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

用户表->地址表
用户表-> UserDetails表
等.

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

所有通过外键相互链接.我的搜索应该以UserId结尾,因此我可以链接到UserDetailsPage.aspx?UserId = xxx

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.

推荐答案

,您需要允许搜索服务的IP地址连接到本地DB. 就多个索引器针对同一索引的观点而言,这两种方法都可能有效.您的用户将在搜索什么信息-地址,详细信息或两者兼而有之?如果只是其中之一,则不必索引两个表.

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.

请记住,如果您决定为连接两个表的视图建立索引,则将无法使用SQL集成的更改跟踪,而必须依赖于视图中的行版本或时间戳列.

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

这篇关于具有本地SQL Server和最佳实践的Azure搜索数据源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆