简体   繁体   English

获取搜索结果项的列表标题

[英]Get List Title of a search result item

I want to get the the display title of the list, related to search result item in SharePoint search. 我想获取与SharePoint搜索中的搜索结果项相关的列表的显示标题。

Result have OriginalPath and ParentLink values. 结果具有OriginalPath和ParentLink值。 But those are links to the list with internal name. 但是这些是带有内部名称的列表链接。 But i could not find either display title or GUID of the list. 但是我找不到显示标题或列表的GUID。

Please let me know how get either display title or GUID of the list. 请让我知道如何显示列表的标题或GUID。

You can use the SharePoint REST service to get the search results in a XML format which return all the fields and their values. 您可以使用SharePoint REST服务以XML格式获取搜索结果,该结果将返回所有字段及其值。

Querying with the Search REST service - https://msdn.microsoft.com/en-in/library/office/jj163876.aspx 使用Search REST服务进行查询-https: //msdn.microsoft.com/zh-cn/library/office/jj163876.aspx

You can construct the GET request URL with the query parameters as follows: 您可以使用查询参数构造GET请求URL,如下所示:

http://server/_api/search/query?query_parameter=value&query_parameter=value http:// server / _api / search / query?query_parameter = value&query_parameter = value

The SharePoint 2013 Search Query Tool is a handy tool to quickly get the search results in XML format - https://sp2013searchtool.codeplex.com/ SharePoint 2013搜索查询工具是一种方便的工具,可以快速获取XML格式的搜索结果-https: //sp2013searchtool.codeplex.com/

Found this post which describes how to get the list title of a search result item in a display template. 找到了这篇文章 ,其中描述了如何在显示模板中获取搜索结果项的列表标题。

Since there is no managed property which contains the list title by default, the display template adds the list title to each item by retrieving it via a REST call using the web URL and the list ID. 由于默认情况下没有托管属性包含列表标题,因此显示模板通过使用Web URL和列表ID通过REST调用检索列表标题来将列表标题添加到每个项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 根据搜索查询从多个提到的列表中获取项目计数 - Get item Count from multiple mentioned list based on search query 如何获得链接以编辑共享点列表中的项目 - How to get a link to edit an item in sharepoint list 远程事件接收器-如何在更新或添加列表项之前获取列表项的附件 - Remote Event Receiver-How to get attachment of list item before updating or adding list item 如何在特定文件夹中搜索项目并使用 sharepoint online REST API 获取其属性? - How search for item in specific folder and get its properties with sharepoint online REST API? 是否将版本项视为列表项? - Is version item considered as a list item? 获取大型 SharePoint 列表中的第一项匹配条件 - Get first item matching condition in large SharePoint list 如何使用 pnp powershell 获取 SharePoint 在线列表中最后修改项目的项目 ID? - How to get item ID of the last modified item in the SharePoint online list using pnp powershell? Microsoft Graph REST API v1.0 获取列表项(10.000.000 列表项来自 SharePoint 列表) - Microsoft Graph REST API v1.0 Get listItem(10.000.000 List Item from a SharePoint list) 使用 SPFX 和 PNP/JS 获取特定列表项并在 SharePoint Online Webpart/Widget 中显示 - Get a specific list item with SPFX and PNP/JS and show it in SharePoint Online Webpart/Widget 如果不存在则创建列表项 - Create list item if not exists
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM