Define a Commerce search scope

Abstract

How to customize the labels and the stock status for the Commerce Search Results rendering.

A Commerce search scope defines the extent of the search and provides the ability to narrow down search results to be more meaningful. This is important because you do not want the search to be so broad that it produces a long list of results making it difficult for a customer to find what they are looking for. Scopes are used by the SXA Search Results and Commerce Search Results renderings. Search scopes are stored in: /sitecore/Content/<tenant>/<site>/Settings/Scopes. For a new scope, you build a search query that enables you to add conditions and tokens or define boosting rules.

To define a Commerce search scope:

  1. In the Content Editor, go to sitecore/Content/<tenant>/<site>/Settings.

  2. To create a Commerce search scope, right-click Scopes and click Insert, Scope.

  3. In the Message dialog box, specify a name for the scope, and click OK.

  4. On the Content tab, in the Scope section, click Build query.

  5. In the Build Search Query dialog box, click in the Search field and specify the conditions you want to include.

    The Build Search Query dialog box.
  6. Click the toggle at the front of the condition to combine 'and', or' and 'not' in the search query.

  7. When you are finished, click OK.