【问题标题】:Limit SharePoint search results to selectProperties将 SharePoint 搜索结果限制为 selectProperties
【发布时间】:2017-06-13 10:56:39
【问题描述】:

我想使用 SharePoint Search REST API 获取一些数据。使用这个查询我得到正确的数据:

http://mySharePoint/sites/mySiteCollection/_api/search/query?querytext='*ac*'&rowlimit=100&clienttype='ContentSearchRegular'

但我想将此结果限制为仅在少数属性中搜索,例如:Title == *ac* || Description == *ac* 这可以管理吗?

【问题讨论】:

  • 你完成了吗/GetByTitle('ListName')/items?$top=100 这里还有更多:dev.office.com/sharepoint/docs/sp-add-ins/…
  • 我询问了使用 Search Service 的 Search Rest API。我想通过一个查询从不同的列表中获取数据,然后处理它。

标签: javascript rest api search sharepoint


【解决方案1】:

试试这个查询

http://mySharePoint/sites/mySiteCollection/_api/search/query?querytext='(Title=*ac* OR Description=*ac*)'&rowlimit=100&clienttype='ContentSearchRegular'

下载https://github.com/SharePoint/PnP-Tools/tree/master/Solutions/SharePoint.Search.QueryTool并亲自尝试。

【讨论】:

  • 尝试使用 contains '(Title:ac* OR Description:ac*)'
【解决方案2】:

好的,我发现了问题所在。 SharePoint Search 无法处理单词或后缀中的匹配模式。它只能进行前缀。因此,可以搜索诸如 abc* 之类的内容,但不能搜索 *abc 或 abc

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-24
    • 2017-05-08
    相关资源
    最近更新 更多