How to custom search results in SharePoint Server 2013

2024-04-22 09:32

本文主要是介绍How to custom search results in SharePoint Server 2013,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

SharePoint Server 2013 and SharePoint Online comes with many default search features that help users find what they’re searching for. But you might want your search results to look a certain way, for example, display information that’s specific to your company or business.

In this blog series, I’ll explain how you can customize the way search results are displayed. To help explain, I’ll use examples from a tool that I use on a daily basis: an internal list of Microsoft publications. 

As you know, Microsoft publishes thousands of articles across TechNet, MSDN and office.com. To assist in the publishing process, we use several SharePoint lists. Each item in a list represents an article or a media file. To quickly find information about a list item, we’ve set up a Search Center that searches across all of the lists.
Throughout this series, I’ll show you how I’ve changed the way search results are displayed from this��?/P>

Default search result

... to this:

Customized search result

In this series, we’ll cover:

  • Understanding how search results are displayed
  • Understanding how item display templates and hit highlighting work
  • How to create a new result type
  • How to display values from custom properties in search results - option 1
  • How to display values from custom properties in search results - option 2
  • How to display values from custom managed properties in the hover panel
  • How to add a custom action to the hover panel
  • How to change the text that is displayed in the Search Box Web Part
    ---
  • Addendum: How to change the order in which search results are displayed in SharePoint Server 2013

 


How search works in a few words


In case you’re not so familiar with how search works, here’s a high level representation that might be useful for this series.

Search overview

  1. Content is stored in lists and libraries. Site columns are used to store values, or in other words information, about each item in a list or library.
  2. When lists and libraries are crawled, site columns and the site column values are added to the search index. 
  3. In the search index, site columns are “transformed��?into managed properties. Site column values are “transformed��?into managed property values
  4. On a search page, a user enters a query in a Search Box Web Part. The query is sent to the search index.
  5. Search results are sent from the search index to a search results page, and displayed in a Search Results Web Part.  The Search Results Web Part uses display templates that specify which managed property values should be displayed.

 

Here’s how to understand this high level representation in the context of Microsoft’s internal Search Center. 

  1. A Microsoft writer creates a list item for an article she'll be writing. Site columns, such asTitle, Content Summary and Technical Subject, are used to store values, or in other words, information, about the article.

List item

  1. The list has been marked for continuous crawl. This means that that the list will be crawled at a set interval, for example, every minute.

    You can see the crawl schedule in List Settings --> Catalog Setting.

Crawl schedule

  1. From Site Settings --> Search Schema you can search for managed properties.

    In my scenario, there’s a managed property named ContentSummaryOWSMTXT, and another one namedowstaxIdTechnicalSubject. They represent the site columns Content Summary andTechnical Subject (for more details about the “transformation��?of site columns into managed properties, see the blog postFrom site column to managed property - What's up with that?).

Two managed properties

  1. On a search page, a user enters a query, for example customize search results.

Entered query

  1. On a search results page, search results are displayed in a Search Results Web Part. The Web Part uses display templates that specify that the values from the managed propertiesContentSummaryOWSMTXT and owstaxIdTechnicalSubject should be displayed in the search results (the display templates specify many other things as well, but for now, let’s just concentrate on the values of these two managed properties). The second search result is the list item created in step 1. We can see that the values from the managed propertiesContentSummaryOWSMTXT and owstaxIdTechnicalSubject are are displayed in the search result.

Search result

You can also see details such as a small icon next to each search result on the page. These icons represent the site to which the article is published, such as Office.com and TechNet . The search result also contains the words "Technical Subject" in front of the value search. I’ll show you how I added the icons and the words in later blog posts. But first, I'll tell you more about how search results are displayed.

这篇关于How to custom search results in SharePoint Server 2013的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/925416

相关文章

AI基础 L9 Local Search II 局部搜索

Local Beam search 对于当前的所有k个状态,生成它们的所有可能后继状态。 检查生成的后继状态中是否有任何状态是解决方案。 如果所有后继状态都不是解决方案,则从所有后继状态中选择k个最佳状态。 当达到预设的迭代次数或满足某个终止条件时,算法停止。 — Choose k successors randomly, biased towards good ones — Close

rtmp流媒体编程相关整理2013(crtmpserver,rtmpdump,x264,faac)

转自:http://blog.163.com/zhujiatc@126/blog/static/1834638201392335213119/ 相关资料在线版(不定时更新,其实也不会很多,也许一两个月也不会改) http://www.zhujiatc.esy.es/crtmpserver/index.htm 去年在这进行rtmp相关整理,其实内容早有了,只是整理一下看着方

red5-server源码

red5-server源码:https://github.com/Red5/red5-server

安装SQL2005后SQL Server Management Studio 没有出来的解决方案

一种情况,在安装 sqlServer2005 时 居然出现两个警告: 1 Com+ 目录要求 2 Edition change check 郁闷!网上说出现两个警告,是肯定装不成功的!我抱着侥幸的态度试了下,成功了。 安装成功后,正准备 “ 仅工具、联机丛书和示例(T)” 但是安装不了,他提示我“工作站组件”安装过了对现有组件无法更新或升级。 解决办法: 1 打开“控

JavaScript正则表达式六大利器:`test`、`exec`、`match`、`matchAll`、`search`与`replace`详解及对比

在JavaScript中,正则表达式(Regular Expression)是一种用于文本搜索、替换、匹配和验证的强大工具。本文将深入解析与正则表达式相关的几个主要执行方法:test、exec、match、matchAll、search和replace,并对它们进行对比,帮助开发者更好地理解这些方法的使用场景和差异。 正则表达式基础 在深入解析方法之前,先简要回顾一下正则表达式的基础知识。正则

插件maven-search:Maven导入依赖时,使用插件maven-search拷贝需要的依赖的GAV

然后粘贴: <dependency>    <groupId>mysql</groupId>    <artifactId>mysql-connector-java</artifactId>    <version>8.0.26</version> </dependency>

ERROR 2003 (HY000): Can't connect to MySQL server on (10061)

在linux系统上装了一个mysql-5.5,启动后本机都是可以访问的,操作都正常,同时建了一个%的用户(支持远程访问), root@debian:/# mysql -u loongson -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id

Oracle和Sql_Server 部分sql语句的区别

比如:A表中, 字段:gxmlflag  number;  比如数据:20210115 字段:gxmldate date ;    比如数据:2021-01-15 09:50:50 一、在Oracle数据库中: 1、insert 和 update 语句: t.gxmlflag = to_char(sysdate,'yyyymmdd'),t.gxmldate=sysdate 比如:update f

【VueJS】live-server 快速搭建服务 及 注意事项

本地开发常常需要搭建临时的服务,第一时间我们会想到用 http-server。 但现在流行修改文件浏览器自动刷新,这里可以使用 live-server 很简单就能启动一个看起来很专业的本地服务。 你只需要全局安装live-server: npm install -g live-server 并在项目根目录执行这条命令: PS E:\AblazeProject\Vue> live-serv

【虚拟机/服务器】Ubuntu Server上配置FTP服务器

当使用FTP工具连接但 Ubuntu Server 未安装 vsftpd 时会出现这样的报错 安装vsftpd sudo apt-get install vsftpd 卸载vsftpd sudo apt-get remove --purge vsftpd 当 Ubuntu Server 未启动 vsftpd 时会出现这样的报错 启动vsftpd sudo service