Configure search results

Current version: 9.2

You can configure search results in Sitecore to help users easily find items. You can specify how Sitecore displays search results and what happens when a user selects an item in a search result.

Specify a field to display in search results

You can specify which fields Sitecore displays in search results.

To specify that a field should be displayed in the search results:

  1. Open the template for the item.

  2. On the View tab, in the View group, select the Standard Fields check box.

  3. In the content tree, expand the template and select the field that you want to display in the search results.

  4. On the Content tab, scroll down to the Search Results section:

  5. In the Search Results section, select the Is Displayed in Search Results check box.

Note

These values are cached. Therefore, you must clear the cache after you have made changes to this setting by resetting the cache in /sitecore/admin/cache.aspx.

Specify an image for search results

Sitecore displays an image with each content item listed in a search result. By default, Sitecore uses the icon of the template of the item. You can specify that Sitecore shows another image field from a template in search results.

To specify which image field Sitecore displays in search results:

  1. Open the template for the item.

  2. On the View tab, in the View group, select the Standard Fields check box.

  3. In the content tree, navigate to the template and expand it.

  4. Select the image field that you want to appear in the search results.

  5. On the Content tab, scroll down to the Search Results section.

  6. In the Search Results section, select the Is Displayed in Search Results check box.

The image that Sitecore displays in this field is shown in the search results.

Note

These values are cached. Therefore, you must clear the cache after you have made changes to this setting by resetting the cache in /sitecore/admin/cache.aspx.

Specify how Sitecore shows search results

Sitecore comes with different views that you can use to display search results.

The three default views are:

  • List – The default view. Sitecore shows items as a plain list.

  • Grid – Sitecore shows item information in rectangular cells that are laid out in rows, and each row contains several columns of cells.

  • Image – Sitecore shows item images in a grid. If an item is an image, this image is shown. Other items are represented by their icons.

You can also specify the following views, but you must enable them first:

  • ID – The ID view is useful for developers and administrators. You can use it as a quick way of assigning multiple values to a list. When you click the ID view for a search, you get a list of item IDs that you can copy and paste into a multilist field, for example.

  • Lock – Similar to the Grid view but also shows whether the items in the result set are locked or not.

  • Media – Similar to the image view, but for media such as videos.

  • Preview – Show a preview of each item in the result (what the item looks like in context on the website.)

  • Table – Show the items in the result as a table.

  • Tag – This view orders items in the result by tags.

To enable a view:

  1. In the Content Editor, navigate to /sitecore/system/settings/Buckets/Views and select the view that you want to enable.

  2. In the View Details section, select the Enabled check box.

  3. If you want this to be the default view, select the Default check box. You must enable the default view.

To select views for an item:

  1. Select the item in the Content Editor.

  2. On the Content tab, scroll down to the Item Buckets section.

  3. In the Enabled views field, select the views you want to enable.

  4. Select a view in the Defaultview field.

Specify how Sitecore opens an item in a search result

When users click an item in a search result, the default behavior is that Sitecore opens the item in a new tab in the Content Editor and makes this the selected tab.

To specify how Sitecore opens items from search results:

  1. Open the /sitecore/System/Settings/Buckets/Item Buckets Settings item.

  2. In the Show Search Results In field, select:

    • New Tab – Sitecore opens the item in a new tab and makes this the selected tab. This is the default behavior.

    • New Content Editor – Sitecore opens the item in a new instance of the Content Editor.

    • New Tab Not Selected – Sitecore opens the item in a new tab but it is not made the selected tab.

Specify the number of items shown in a page

Sitecore displays search results with 20 items per page by default.

To specify the number of items shown per page in search results:

  1. Open the Sitecore.Buckets.config file in the Website\App_Config\Include folder.

  2. Change the number in the following setting:

    <setting name="BucketConfiguration.DefaultNumberOfResultsPerPage" value="20"/>

Exclude the current item from search in item buckets

When you search within an item bucket, by default the item you search from (the item that is selected when the search starts) is included is the search results when it matches the search.

To exclude the current item from the search results:

  • In the Sitecore.Buckets.config file, set the BucketConfiguration.ExcludeContextItemFromResult setting to true.

Do you have some feedback for us?

If you have suggestions for improving this article,