为组织中的用户设置管理搜索答案 (预览)
Microsoft 搜索允许管理员将搜索词与特定于其组织的含义或网页相关联,并将这些关联作为搜索答案包括在内。 例如,组织中的用户可能会遇到一个不熟悉的首字母缩略词,该首字母缩略词表示内部项目名称或与团队网页关联的团队名称。 管理员可以在搜索&智能 下,在 Microsoft 365 管理中心中设置 首字母缩写词、书签或 QnA。 这使用户能够使用搜索导航并熟悉其工作。
管理员还可以使用 Microsoft Graph 中的 Microsoft 搜索 API 以 编程方式管理组织中的管理搜索答案 。 当由可用搜索答案资源类型中定义的首字母缩略词或关键字触发时,这些答案将显示在 Microsoft 搜索结果中: 首字母缩略词、 书签和 QnA 资源。
当由定义的首字母缩略词或关键字触发时,这些搜索答案将显示在组织中搜索结果页面的顶部。
示例 1:创建新的首字母缩略词
以下请求将创建一个新的首字母缩略词,该首字母缩略词将在用户搜索时显示在搜索结果页上。
请求
POST https://graph.microsoft.com/beta/search/acronyms
Content-Type: application/json
{
"displayName": "GDPR",
"standsFor": "General Data Protection Regulation",
"description": "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.",
"webUrl": "http://contoso.com/GDPR",
"state": "published"
}
响应
下面是一个响应示例。
HTTP/1.1 200 Ok
Content-Type: application/json
{
"id": "733b26d5-af76-4eea-ac69-1a0ce8716897"
}
示例 2:创建新的书签
以下请求创建一个新的书签,当用户搜索其至少一个关键字时,该书签将显示在搜索结果页上。
请求
POST https://graph.microsoft.com/beta/search/bookmarks
Content-Type: application/json
{
"displayName": "Contoso Install Site",
"webUrl": "http://www.contoso.com/",
"description": "Try or buy Contoso for Home or Business and view product information",
"keywords": {
"keywords": ["Contoso", "install"],
"reservedKeywords": ["Contoso"],
"matchSimilarKeywords": true
},
"state": "published"
}
响应
下面是一个响应示例。
HTTP/1.1 201 CREATED
Location: /733b26d5-af76-4eea-ac69-1a0ce8716897
Content-Type: application/json
{
"id": "733b26d5-af76-4eea-ac69-1a0ce8716897"
}
后续步骤
- 熟悉搜索 API 方案和功能: Microsoft 搜索 API 概述。
- 在 Graph 浏览器 中浏览搜索 API。
- 使用 Microsoft 搜索 API 管理管理答案。
反馈
提交和查看相关反馈