Contact Us

An effortless manner to locate any data is much needed in most of the bundled compositions. This especially holds true for organizations and individuals operating upon piles of content.

You might encounter an instance where you need to locate a certain segment of an entity. But you want it in an accessible way without any complexities.

In daily life, you sort items according to your capabilities and convenience. The world of search engines is no different. There are patterns in which search engines bring up information to us.

Sitecore Experience Manager has incorporated well-defined features that assist you in classifying their need in content based on a few patterns. The patterns defined here are based on the characteristics of the content or file the user requests or searches.

The classification is made basis the most repetitive used ways that a person has practiced organizing items.

The article provides a step-by-step process to the Facet and how it simplifies searching for you.

 

Facets

"Facets are a way of refining the search results by categorizing the Items returned by search".

In Sitecore, Facets are used to group and classify content items. It's used to aggregate the count of terms in a field to help users filter their search, to get to the specific results.

For example, the date created, the template they are based on, or the language that they are in. Users also use Facets to filter and limit the search results after running multiple searches.

media library

In this example, one of the Facets is called Language, and this Facet has the following filters:

chinese_simplified_prg   Danish

English                 french_france

german_germany      japanese_japan

When users click on the Danish filter, the items with the value of Danish will be displayed. For any given Facet (such as Language), Sitecore creates filters like Danish. These filters are based on data and can get changed if data changes. Sitecore displays a Facet along with its filters according to its relevance to the actual search result.

 

Search Facets in Sitecore

Facet

Description

Author

Groups the results according to the authors who created the items.

Author Template

Groups the results according to a combination of author and template.

Bucket

Groups the results according to the buckets that they are stored in.

Creation Date & Author

Groups the results according to the date that items were created and who authored them.

Date Range

Groups the results in date ranges: Today, Yesterday, 2-4 days ago, and so on.

File Size

Groups the results according to the size of the file. The groups are (numbers in bytes):

small: up to 100000

medium: up to 500000

large: up to 1000000

extra-large: up to 10000000

mega large: up to 100000000

enormous: over 100000000

File Type

Groups the results according to file type.

Image Dimensions

Groups the results according to the dimensions of the images they contain.

In Workflow

Groups the results according to the workflow they are in.

Language

Groups the results according to language.

Language Template

Groups the results according to the languages that the templates are in.

Location

Searches all the bucket locations and groups the results according to which bucket the results are stored in.

Tags

Groups the results according to their tags.

Template

Groups the results according to templates.

Template Author

Groups the results according to a combination of template and author.

Updates Date

Groups the results according to the date that items were last updated.


Creating and Configuring Facets

Facets are stored at: /Sitecore/system/Settings/Buckets/Facets

A facet can be created by right-clicking on a Facets item and selecting Insert Facet in the context menu. After which, you just need to specify a name for your new Facet.

You can create folders for your Facets. This makes it easier for an overview of the Facets and to separate the Facets you created from the Facets that Sitecore delivers.

You can configure the Facets you created in two ways:

  • You can specify item field names. While setting a field name in the Field Name of the Facet item, Sitecore creates a Facet based on this field. You can enter multiple field names as a comma-separated list, after which Sitecore makes hierarchical filters (for example, belts/black, belts/white, and so on.) You specify the field name in lowercase and use the field's name as it is in the index. Fields with different values across items are not good candidates for Facets, and you should avoid using such fields. For example, a field that has a unique value in each item would create a filter for each item.

  • You can specify a reference to a class that implements the ISimpleFacet interface in the Facet Filter field. You have to create this class yourself, and it has to return a string. You can implement logic in this class that determines the filters the Facet should search for.

The intention is that this class reduces the number of filters. This is how some of the Sitecore search Facets are implemented, for example, Date Range or File Size.

 

Global and Local Facets

Facets can be global or local. Global Facets are usually used for searches everywhere in the content tree. The search Facets are global Facets that are delivered by Sitecore. To specify that a Facet is a global Facet, you need to:

  • Select the Global Facet in the Facet section. Local Facets are used for a specific item bucket or an item in the content tree.
  • Now, select Facets in the Facets field of the Indexing section of the item bucket or item.

 

Creating Facets in Sitecore

  • Go to Sitecore Launch Pad
  • Open the Content Editor< content editor
  • Go to the path: /Sitecore/System/Settings/Buckets/Facets facet
  • Expand Facets Item, you can see all the Default Search Facets in Sitecore. redborder
  • Right Click on the Facets item in the content tree
  • Click on the Insert
  • Click on the Facets
  • Enter the Facets Name facet name

After Creating Facet, in the Content Area, you will see the two sections.

One is the Quick Info Section, another is Facet Section. 🡺 Go to the Facet section and fill in the relevant textboxes, shown below.

Box 1 🡺 Enter the Facet name.

Box 2 🡺 Enter the Facet name that you want to display by default.

Box 3 🡺 Facet Filter - A class that implements ISimpleFacet.

Box 4 🡺 Enter the Field name. The lowercase name of the field that is used in the index and that the Facet is based on. You can enter multiple field names in a comma-separated list (title, author).

Box 5 🡺 Enter the minimum number of items that the Facet must appear in before it is shown in the search results.

Box 6 🡺 Select the Global Facet box. See whether or not you want to search for this Facet on every item in every search

different border

In Sum

Facets in Sitecore Experience Manager facilitate the user to filter the search results and avoid the additional period of probing over the directory bundles. The core concept behind Sitecore is to deliver an unproblematic interaction between the piles of data and the user.

Therefore, for situations where one requires the meaningful categorization of content items based upon attributes like language, template, chronology, or others, then employing Facets to its optimum potential is practical.

Get our help with Sitecore upgrade or managed services. Our team of Sitecore experts will guide you on how to improve your content and commerce management.

Need Help?