Sitecore Experience Platform

Save a search query for an item bucket

Abstract

Save a search on an item bucket, so that every time you click an item bucket, the saved search is run automatically.

When you work with item buckets, you might regularly run the same search query from the same item bucket. In the Content Editor, you can save a search on the item bucket, which means that every time you click an item bucket, the search runs the saved search query automatically.

Note

The search queries that you save on an item bucket are unique to your own Sitecore account. However, your Sitecore administrator should set up all the saved searches and determine whether they should be available to a specific user or to all users.

To save a search query on an item bucket:

  1. In the content tree, navigate to the item bucket where you want to save a search.

  2. On the Home tab, in the Insert group, click Saved Search. Alternatively, you can right-click the item bucket, click Insert and then Saved Search.

  3. In the Message dialog box, enter a suitable name for the saved search and click OK. The saved search item is then added to the content tree as a subitem of the item bucket.

  4. In the content tree, click the saved search item and on the Content tab scroll down to the Item Buckets section.

    Note

    If you do not see the Item Buckets section, in the ribbon, click the View tab and in the View group, select the Standard Fields check box.

  5. Click Build Query above the query you want to build.

    You can build either a:

    • Default Bucket Query – a query that appears in the search field every time you open the search tab. If necessary, you can delete the query from the search field. The default query is text:*, which results in returning everything.

    • Persistent Bucket Filter – a query that appears in the search field every time you open it and that you cannot delete. The default query consists of the location:{ID of the parent item}, which states the location from where the search should be run, and the -template:{ID of the saved search template}, which states that items based on the saved search template should not be displayed.

    2179556DAA174C4D9C9FE5A35DF76DB2.png
  6. In the Build a Search Query dialog box, in the Search field, build your search query by adding the relevant filters and search keywords and then click OK. For example, the search query in the screenshot below consists of the persistent bucket filter for location and author, but you can enter as many filters as you need.

    432D6800410047E4A1DAD4A6BF3F6573.png
  7. To remove any queries from the Default Bucket Query or the Persistent Bucket Filter fields, click Clear above the query field that you want to clear.

    C83C3BD638E34254A07CA40ACA3D22C9.png
  8. Save your changes.

Now, when you click the item bucket in the content tree, the search runs automatically.