SharePoint 2016 Search 定制开发简介系列七-Search Database

Custom BCS Connectors---Database

SharePoint使用index connectors来爬取数据到search index中, index connector告诉SharePoint Search爬取哪些数据内容以及怎么爬取某个数据源的内容,在SharePoint 2010之前的版本,SharePoint使用基于protocol handler的index connector, Sharepoint 2010 之后,SharePoint提供了Connector Framework允许定制自定义的解决方案,自定义的解决方案可以定义如何爬取数据,例如database的爬取就可以自己定义爬取的查询语句。

本文着重介绍Database如果作为external的数据源在SharePoint中完成爬取和搜索,适用于SharePoint Built-In的database 搜索功能,不包含任何自定义的逻辑,例如不适用于对权限有相关要求的场景,对权限有要求的场景我们在下一节中着重介绍。

 

下面介绍如何创建Database 类型的index connector

1. 通过SharePoint Designer 2013创建external content type

使用管理员打开SharePoint Designer并打开sharepoint site: http://localhost:101/,点击External Content Type创建新的external content type,  点击如下链接,关联database

Add Connection,选择SQL Server

填写数据库链接信息,并选择Connect with User's Identity(需要保证打开sharepoint designer 2013的账号能够访问数据库)

搜索数据库的权限需要New Read Item Operation和New Read List Operation,一直Next(如果没有identifier,需要指定一个),创建完成即可。

保存该External Content Type。

2. 创建Content Source

Central Administration-->Application Management-->Manage service Application-->Search Service Application-->Content Source

保存之后,跑full crawl。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值