Understanding context in Search

In Sitecore Search, context refers to a dynamic set of attributes and conditions that determine how search results are generated and presented. Context enables Search to deliver relevant content by tailoring search results based on user behavior, location, device, and other environmental factors.

You can configure results using context, preview a page in context, or use context to configure widget variation rules, such as boost, bury, and blacklist.

There are two types of context in Search:

  • Visitor context – attributes sent with a search request such as the type of device a visitor uses, the page viewed, and the geographical location. These values are sent in the Context object.

  • Site context – conditions you define in widget rules that determine when and how content is displayed.

The following table lists the contexts available for configuration in Search:

Context name

Expected values

Enabled by default

Content Type

A system attribute indicating the type of content.

"Article", "video", "pdf", and so on.

Yes

Filter Applied

Indicates whether any filters were applied in the search request payload.

True or false.

No

Id

A system attribute representing the unique identifier of the content item.

String or GUID. For example, "12345".

Yes

Keywords

The user's search input, equivalent to widget.items.search.query.keyphrase.

Any string. For example, "Sitecore".

No

Locale

The language/region setting based on domain configuration.

Locale codes. For example, "en-US", "fr-FR".

No

Pages

Indicates the specific page(s) in Searchwhere the widget is published.

Page names or IDs. For example, "homepage".

No

Review Rating

A system attribute showing the rating score of a content item.

Numeric. For example, 1, 3.5, 5.

Yes

Custom Attributes

Any additional attributes marked as Available for site context during configuration.

Varies. For example, "author", "region".

No

(Configurable)

Do you have some feedback for us?

If you have suggestions for improving this article,