No XSLT in customizing the display of search results in 2013

The method of customizing the display of the search results in SharePoint 2013 search has improved drastically from SharePoint 2010. You will no longer have to go through the painful experience of modifying the thousand lines long XSL configuration setting in the tiny text editor on the core search results Web Part.

Screenshot of the XSL editor configuration on the Search Core Results web part

Figure 1: Screenshot of the XSL editor configuration on the Search Core Results web part

In SharePoint 2013 Search, the format and presentation of search results can be controlled by using display templates, which are just HTML templates with placeholders for the actual fields from the search results.

Screenshots of references to search display templates in SharePoint 2013

Figure 2: Screenshots of references to search display templates in SharePoint 2013


Clumsy Search Scope Rules Replaced by Query Transform/KQL

Search scopes and the clumsy rules to define them are gone in SharePoint Search 2013.

Screenshot of search scope rules in SharePoint 2010

Figure 3: Screenshot of search scope rules in SharePoint 2010

Instead of Search Scopes, SharePoint 2013 Search uses Results Sources to define a subset of searchable content. Result Sources use a query transform property to define the items that are included in the result source. You have the option to manually type in the query transform property, which is based on the Keyword Query Language (KQL) with some special syntax for placeholders and other operations or you can use the Query Builder user interface to define your query transform.


Screenshot of the query transform property of a resource source in SharePoint 2013

 Figure 4: Screenshot of the query transform property of a result source in SharePoint 2013

Improved Keyword Query Language

SQL Syntax support has been removed in SharePoint 2013 so Keyword Query Language (KQL) is now the preferred query language for search in SharePoint. The NEAR operator has been improved and the ONEAR and XRANK operators have been added to KQL.

New Search REST API

The SharePoint Search Query web service (http://server/site/_vti_bin/search.asmx) has been deprecated in SharePoint 2013, but a brand new Search REST API (http://server/_api/search/) has been added. The new REST service has many features and is very easy to use. As an example, to search for apples, the URL to execute the query would be as simple as: http://server/site/_api/search/query?querytext='apples'


References

MSDN — Keyword Query Language (KQL) Syntax Reference

http://msdn.microsoft.com/en-us/library/ee558911.aspx

MSDN Blogs — SharePoint 2013 Search REST API

http://blogs.msdn.com/b/nadeemis/archive/2012/08/24/sharepoint-2013-search-rest-api.aspx

Share