Managing Result Types in SharePoint 2013

SharePoint 2013 includes a new framework for presenting search results to end users called result types. These have several elements that let you define which user interface should be used to display or render the search results in SharePoint 2013 as in the following:
  • Rules. These define when a result type is applied.
  • Property Lists. A result type includes a list of managed properties. A property must be added to the list before it can be included in a display template.
  • Rendering Template. A rendering template defines the screen layout of a result type.
Result type rules

You can create rules based on a number of operators, such as:
  • Equals or not equals.
  • Less than or greater than comparison
  • Logical operators

    • AND
    • OR
    • NOT
You can also create more complex rules by including multiple conditions, as well as managed properties.
 
Result type management

You can create new result types from the Site Collection Administration page by clicking Result Types.This shows all the shipped result types and any customer result types that you have created. When you create a new result type, you provide a name and then specify the conditions required for this result type. The first condition is the result source. You select these from a list of options, such as documents, text, items matching a content type, popular and so on. You then set which types of content you want to match on, such as PDF, text, SharePoint list, or SharePoint site. To create a more complex result type, you can add more conditions. With the conditions set, you can select an action. This defines the display template that you should use to display the result type.

The interface provides options for simple matching, so you can select a file name extension of .doc or .docx for an Office Word document, or you can use managed properties, such as content types, to view results. You can combine both of these elements so that your content-type Proposal and your file name extension .docx combine and are rendered in a customer template that you design for proposal documents only. Result types can be managed at two levels: a search service application and a site or web. There are a number of result types available with SharePoint 2013. These are read-only, so you cannot change them. However, you can use these as the starting point for your own custom result types by copying the originals and making your own changes. There is a hierarchy in result type matching. This hierarchy is:
  • Current web
  • Site collection site
  • Search service application
This means that the results presented are based on the cumulative rule types and then rendered by priority.