Managed Properties 和 Crawl Properties
管理位置:Central Administration-->Application Management-->Manage Service Applications-->Search Service Application -->Search Schema
SharePoint Search中Manged Properties和Crawl Properties都是SharePoint中文档或者Item的metadata, Crawl Properties是在爬取的过程中生成的对应SharePoint中metadata的属性,标明了SharePoint爬取到了哪些metadata的值, 而Managed Properties的定义才指定了 SharePoint中Search Index有哪些数据, SharePoint在爬取的过程中根据有哪些Managed Properties选择生成生么样的数据到search index中,这个生成会根据managed properties的属性配置来。
Managed Properties中常用的属性说明如下:
Searchable: 勾选上之后, 属性对应的值也能被搜索到,比如Author的值是Michael, 如果搜索Key是Michael的话, 该文档也会被搜索到
Queryable: 勾选上之后, 属性以及属性对应的值,可以加到search的query条件中,例如Author的值是Michael,如果想搜索文档的作者是Michael的话,可以在搜索条件中添加 Author:Michael 来针对性的搜索
Retrievable: 勾选上之后,属性的值可以在搜索结果中返回。
Refinable: 勾选上之后,可以添加在search result的refiner中,提供对搜索结果的过滤功能。
Sortable: 勾选上之后, 可以允许搜索结果针对该属性进行排序。
Crawl Properties来自SharePoint,,咱们无法创建,只能根据SharePoint中metadata自动生成。
Managed Properties 在默认的功能中可以创建,配置属性,同时关联一个或者多个Crawl Properties,但是这样的managed properties的值必须和crawl properties的一模一样,如果crawl properties没有对应的或者需要根据逻辑修改crawl properties的值,就比较麻烦了。
还好SharePoint提供了扩展Service,让我们能够通过定义Manged Property.
SharePoint提供了content enrichment web service callout
该web service 提供了自定义managed property value的功能, 不再局限于crawl property对应的值
具体的配置以及web service部署可以参考:
https://www.appliedis.com/a-simple-content-enrichment-service/
注意一下几点:
1. custom managed property需要事先通过powershell创建出来
2. content enrichment service 会增加search service workload,逻辑不宜过于复杂
3. content enrichment service 可以在多个search server中load balance