SharePoint REST API 设置SummaryLength属性

  前言

  最近调用搜索服务,发现一个问题,就是全文检索返回的内容不够,只有20个字符。

  正文

  这不,这就开始找这个问题,后来发现,其实进行搜索的时候,有一个关键字可以对其进行控制。

  也就是说Query.SummaryLength属性,限制返回高亮文字的长度。

  我们可以对其进行设置,但是,它也是有限制的,限制就是长度不能超过一万个字符。

  You can change the length of the search result summary using the Query.SummaryLength property.

  More references:

  http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.search.query.query.summarylength(v=office.15).aspx

  http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.search.query.keywordquery_members(v=office.15).aspx

  https://social.technet.microsoft.com/Forums/en-US/ce5b0508-6523-4a43-98f6-37ed8a6c2cd0/hit-highlighted-summary-problems

posted @ 2020-08-19 22:42  霖雨  阅读(346)  评论(0编辑  收藏  举报