How to custom search results in SharePoint Server 2013
来源:互联网 发布:json字符串转对象 编辑:程序博客网 时间:2024/06/05 03:35
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>
... to this:
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.
- 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.
- When lists and libraries are crawled, site columns and the site column values are added to the search index.
- In the search index, site columns are “transformed��?into managed properties. Site column values are “transformed��?into managed property values
- On a search page, a user enters a query in a Search Box Web Part. The query is sent to the search index.
- 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.
- 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.
- 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.
- 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 columnsContent 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?).
- On a search page, a user enters a query, for example customize search results.
- 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 andowstaxIdTechnicalSubject 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 andowstaxIdTechnicalSubject are are displayed in the 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
- Custom Search Center in SharePoint 2013
- How to redirect to a Custom Page for Event Receiver in SharePoint 2010
- How to Enable Project Server License in SharePoint?
- How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- How to create your own custom 404 error page and handle redirect in SharePoint
- How to search the available space in SQL server.
- How to do custom statistic in OPNET
- How to create custom price in Magento?
- Change the default search topology in SharePoint Server 2013
- How to get the JSON results in ExtJS
- How to Configure Workflow Infrastructure 2013 in Sharepoint 2013
- How to change service accounts and service account passwords in SharePoint Server 2007 and in Windows SharePoint Services 3.0(Se
- Custom Social Newsfeed in SharePoint 2013
- Custom Managed Navigation in SharePoint 2013
- How to create custom navigation menu in SharePoint with XML data source 使用XML数据源在SharePoint创建自定义导航菜单
- How to open PDF files in sharepoint
- How to Create Mysite in SharePoint 2010
- Spring MVC 中 HandlerInterceptorAdapter过滤器的使用
- [应用模板]单列布局网站
- VLAN原理详解
- 在程序中输出日志, 使用 android.util.Log 类.
- mysql Could not initialize master info structure; more error messages can be found in the MySQL erro
- How to custom search results in SharePoint Server 2013
- 基于visual Studio2013解决算法导论之005原地随机排列数组
- 关于const,static,extern,volatile的用法
- 简明 Vim 练级攻略
- 五个不为人知的ESC键妙用
- nodejs npm install -g 全局安装和非全局安装的区别
- MySQL 获取 数据库 和 表信息 方法小结
- 黑马程序员_IO流(4)
- 动态链接库dll,静态链接库lib, 导入库lib