Create a default and a persistent search query

Last updated Tuesday, April 12, 2016 in Sitecore Experience Platform for Developer, Administrator
Keywords: Configuration, Search

You can specify a default search that Sitecore runs when users open a new search tab. You can also prevent users from being able to remove parts of a query by making the search query persistent.

Note

You can define both default and persistent queries for an item.

This topic outlines how to:

Define a default search

To define a default search:

  1. In the content tree, navigate to the item you want to create a default search for.
  2. On the Content tab, in the Item Buckets section, in the Default bucket query field, enter a query. For example:

    Picture 1

    You can enter a query manually, paste in a query, or you can build a query in the Build Search Query dialog:

    Picture 4

    When users open a new search tab, it looks, for example, like this:

    Picture 3

When users open a new search tab, they can delete the filters in the query by clicking X. If you do not want users to be able to remove parts of the query, you can make the search query persistent.

To make a search query persistent:

  1. In the content tree, navigate to the item you want to define a persistent query for.
  2. On the Content tab, in the Item Buckets section, in the Persistent bucket filter field, enter a query.

Sitecore supports these filters:

  • tag
  • template
  • location
  • sort
  • custom
  • tag
  • start
  • end

You can add multiple filters with a semicolon between the filters.

Note

Every filter is case sensitive.

For example, to search for the keyword pineapple between a start date of 03/03/2012 and an end date of 04/04/2012, the filter string is:

text:pineapple;start=03/03/2012;end=04/04/2012