Menu

Buckets

What is an Item Bucket?

A bucket is a special type of item in Sitecore that acts as a container for other items.

Most importantly, the underlying structure of items inside a bucket does not matter to the user. Items in a bucket are not displayed in the content tree - instead, users find these items by using Sitecore search.

When to Use a Bucket

Buckets are useful when any of the following are true:

  • Tree structure isn't important. Not all content needs to be organized into an orderly tree structure. Thousands of content items that are easily and uniquely identified by name or description can benefit from being in a bucket.
  • There are more than 100 items under one node. Sitecore's UI starts to have minor performance issues when displaying more than 100 items under a tree node. Buckets can support millions of items.
  • Searching for content is preferred. With a performant and robust search engine behind Sitecore (Solr, Coveo, etc.), searching for content can be significantly quicker than digging through a content tree.

Because buckets rely on the Sitecore Content Search API, they will not work if no search indexing engine is running. Out of the box, all modern versions of Sitecore support Lucene for basic search functionality, so buckets should always work.

Creating & Managing Buckets

To create a bucket, select an existing item in the content tree, then open the "Configure" tab in the ribbon, then click "Bucket."

Creating an item bucket in Sitecore.

Creating an item bucket in Sitecore.

Buckets display like any other item in the content tree, so it is important to visually distinguish them with a different icon or a separate item template altogether.

A bucket has a couple of distingishing features from regular items:

  • There is an Insert Option for "Saved Search," which allows users to quickly find items in a bucket based on previous searches.
  • The bucket item has the "Is Bucket" field checked on its standard template. Quite simply, this identifies the item as a bucket.
Managing bucket settings.

Managing bucket settings.

There are two more actions that may be performed on buckets:

  • Revert removes the bucket designation from an item and removes all items from the internal bucket data structure.
  • Sync re-indexes all items under the bucket. This is used when a configuration change was made to the bucket. For example, if you added a regular item to the bucket and later marked it "bucketable," a Sync action would index it into the bucket.
Bucket 'Revert' and 'Sync' options are available on the Configure tab.

Bucket 'Revert' and 'Sync' options are available on the Configure tab.

Items In Buckets

In order to be placed inside a bucket and be searchable, an item must be made "bucketable" (see below). It is best to do this on the Standard Values of an item's template and use Insert Options to ensure that only bucketable items can be placed in a bucket.

Check the 'IsBucketable' field on an item to make it searchable in a bucket.

Check the 'Bucketable' field on an item to make it searchable in a bucket.

If items are not marked bucketable, they will appear under the bucket as structured content:

A mix of bucketed and non-bucketed items.

A mix of bucketed and non-bucketed items.

Items properly bucketed are hidden from view (in the image above, see the message "There are hidden items in this container."). Clicking on the bucket then brings up the search interface, which allows content authors to search for items:

The search inteface for a bucket.

The search inteface for a bucket.

Viewing All Items In a Bucket

Although the underlying data structure of buckets do not matter to Sitecore users, it is possible to see that structure. On the "View" tab on the Content Editor ribbon, enabling the "Buckets" checkbox will show bucketable items in the content tree:

Viewing the internal structure of a bucket.

Viewing the internal structure of a bucket.