Recursive Search

If the Salesforce B2C Commerce recursive searching is enabled, the search feature does the following:

  • Searches within a catalog tree (by category)
  • Allows refinement options for products within a whole category tree
  • Uses hierarchical drill-down

By default, the SiteGenesis application is configured to always use recursive search. Salesforce recommends enabling recursive search as a best practice.

Recursive search enables a true hierarchical drill-down with category refinements calculated per catalog level, as shown in this example:

Recursive search enables the customer to drill down through the entire hierarchy of categories, to the lowest level, automatically. Without recursive search, the drill-down into DVD, for example, would have shown a product count of two (categories: Action and Comedy). The drill-down into Action would also have shown a product count of two (categories: Adventure and Drama). With recursive search enabled, the product count for Action is 1,736 (the sum of 1,000 Adventure movies and 736 Drama movies).

When the customer selects the DVD Movie category, the result set shows category drill-down options representing the next catalog level below DVD Movie, in this example, representing film genres (Action and Comedy). When the customer drills down into the Action category, the search returns the Action subgenres Adventure and Drama. It's important to note that the product count for the Action category matches the sum of the product counts for the Action subgenres.

If recursive search isn't enabled, the search feature doesn't allow refinements and doesn't search beneath the top category for results.

Enabling Recursive Search

Recursive search is automatically set for the SiteGenesis application. However, if you are developing your own site from scratch, you must enable recursive search.

To Enable Recursive Search for Products:

  1. Open UX Studio.
  2. Open the Search pipelet.
  3. Click the Search (bc_api) node to select it.
  4. Set the RecursiveCategorySearch property in the Search pipelet to true.
Note: The RecursiveCategorySearch property only has an effect when a category is included in the query.

To Enable Recursive Search for Content:

  1. Open UX Studio.
  2. Open the Search pipelet.
  3. Click the Search (bc_api) node to select it.
  4. Set the RecursiveFolderSearch property in the Search pipelet to true.