Skip to main content

Configure Searchable Attributes

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the importance of using searchable attributes.
  • List the five general boost factor rules.
  • Describe when to avoid using autocorrect with searchable attributes.
  • Explain how system objects relate to searchable attributes.

What Are Searchable Attributes?

Brandon Wilson, Cloud Kicks merchandiser, wants to take a look at searchable attributes to help improve the shopper experience. He wants to create searchable attributes for both products and content, and needs to figure out the best approach.

When a shopper enters text into the search field, Salesforce B2C Commerce only looks at the product, catalog, or content attributes that are configured as searchable. It only returns results on products, catalog, or content assets that contain the search term that’s in a searchable attribute. If the searched term is contained in an attribute that isn’t searchable, the product isn’t returned in the results.

Configuring searchable attributes is an important step in creating an amazing shopper experience!

For the Cloud Kicks storefront, Brandon focuses on attributes that highlight key areas. Here are the attributes he wants to set as searchable.

Attribute Type

Searchable Attributes

Product

brand, boot type, outerwear, sandal type, shoe type, sneaker type, top type

Category

size chart

Content

holiday special

For these attributes, Brandon also wants to assign a boost factor and automate autocorrection and autocompletion.

Boost Factor

Brandon can assign a boost factor to increase or decrease the importance of the attribute to the search results. For example, to make the sneaker type attribute more important than the color attribute, he sets the sneaker type boost factor to 2.00, making the sneaker type attribute twice as important as the color attribute, which has a boost factor of 1.00. Here are some general boost factor rules.

  • You can use decimals as boost factors.
  • A boost factor of .01-.99 reduces its impact in the search results.
  • 1.00 is the default and does not change the order of default search results.
  • 1.01–100.00 increases the importance of the field in search results (although we recommend going no higher than 5).
  • Use boost factors less than or equal to 5.00.

The boost factor only works in search and when text relevance is part of the sorting rule. 

Autocorrect

Searchable attribute values use autocorrection and autocompletion by default. If, for example, the searchable attribute color is enabled for autocorrection, in a search, all the color names are corrected and completed. Be careful if you use this, however. You might want to turn it off for an attribute such as product ID, because product ID needs to result in a specific product detail page, and not a different product that has a similar ID.

What Are the Caveats?

Brandon is glad to know that the searchable attributes he selects won’t affect the attributes he selects for search refinement or sorting rules. However, the boost factor he selects for a searchable attribute affects the sort order if he creates a sorting rule that uses text relevance as a sorting criterion.  

Overdoing it can affect site performance. As a best practice, confine searchable attributes to the minimum number necessary for shopper searches. Searchable attributes contribute greatly to the size of an index, which can affect search speed.

Configure Searchable Attributes

Brandon is now ready to configure searchable attributes. Here’s how he does it.

  1. Open Business Manager.
  2. Select site > Merchant Tools > Search > Searchable Attributes. You can create or edit product or content searchable attributes.
    In Business Manager, see the searchable attributes.
  3. Click New in the Product Index Attribute section.
  4. Expand the highlighted field. Only attributes with appropriate data types for search appear.
  5. Select Sandal Type (custom-sandalType). The new attribute has red triangles in each field, indicating that the change is not yet applied.
    In Business Manager, select a new searchable attribute: Sandal Type (custom-sandalType).
  6. Click the Boost Factor field and enter a boost factor: 2.00
  7. Select Autocorrection: Yes
  8. Click Apply. The red triangles in the attribute disappear.
  9. Rebuild the product (or content) Index. Don’t forget!

Create Attributes First

The attributes Brandon wants to configure as searchable must already exist in the system. That means they must be the attribute of a system object, namely, the product, catalog, or content system object. His storefront already includes the product and category attributes he wants to use; but it doesn’t have the content attribute. He needs to add it first.

Here’s how.

  1. Open Business Manager.
  2. Select Administration > Site Development > System Object Type.
  3. Select Content.
  4. Click the Attribute Definitions tab.
  5. Click New.
  6. Enter the ID: holiday-special
  7. Enter the display name: Holiday SpecialIn Business Manager, create a new system content object attribute: holiday-special.
  8. Click Apply.
  9. Select Localizable, Apply, and Yes until the change is applied.
  10. Return to set the attribute as searchable.
    • Click Merchant Tools > Search > Searchable Attributes.
    • In the Content section, click New.
    • Scroll to find the attribute.
      In Business Manager, add a new system content object attribute to the content index.
    • Click Apply. This attribute is now searchable.

Troubleshoot Search Results

Brandon’s configured every search setting and feature available, and sometimes runs into problems with his search results. When that happens, he takes a look at everything from queries and indexes to see how his products are configured. Here are some troubleshooting tips he’s happy to share.

Subject

Tips

Queries and search results

Take a look at how a query is constructed using the Storefront toolkit Search Information tool.

Index

If a particular index feature doesn't seem to work, check to make sure the feature is enabled on the Search > Search Preferences page.

Stemming

If stemming doesn't work in a non-English locale, change the stemmer language setting for the index on the Search Indexes > Language Options page.

Let’s Wrap It Up

In this unit, you learned how to configure searchable attributes, how the boost factor works, and a few caveats to this feature. You also learned that attributes must exist in the system before you can set them as searchable, and you learned some basic search troubleshooting techniques. Now take this final quiz and earn a new badge!

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback