【问题标题】:What is SourceId in requests to SharePoint Search API?对 SharePoint 搜索 API 的请求中的 SourceId 是什么?
【发布时间】:2020-09-24 19:19:33
【问题描述】:

我正在尝试在 JS 中使用 SharePoint REST API 实现人员搜索,我发现可以通过在请求正文中直接提供 SourceId 来完成。所以目前我的要求是下一个方式:

function searchEmployees(value) {
  fetchData(
    `${appWebUrl}/_api/search/postquery`, // App URL
    accessTokens.sharepoint, // Authorization: "Bearer ..."
    'POST', // method
    // Body
    { 
      'request': {
        'Querytext': `${value}`,
        'RowLimit': 30,
        'SourceId': 'b09a7990-05ea-4af9-81ef-edfab16c4e31'
      }
    }
  ).then(renderData);
}

但是这个SourceId是在随机的互联网资源中找到的,而不是官方文档。所以基本上接下来的问题是:

  • 什么是SourceId
  • SourceId 的可能值是什么?
  • SourceIds 上有什么好的文档吗?
  • 是否有任何关于使用 SharePoint 搜索人员的好文档?
  • 有没有更好的搜索人的方法? (如果有,为什么会更好?)

【问题讨论】:

    标签: javascript sharepoint sharepoint-api sharepoint-search sharepoint-rest-api


    【解决方案1】:

    SourceId 是您定义的结果源。

    【讨论】:

      猜你喜欢
      • 2022-10-05
      • 2015-04-11
      • 1970-01-01
      • 1970-01-01
      • 2013-05-03
      • 1970-01-01
      • 2012-08-26
      • 1970-01-01
      • 2021-05-23
      相关资源
      最近更新 更多