Search and Navigation in SAP Commerce Cloud - Business Users
This article covers how a business user can modify and take advantage of the search and navigation features available in SAP Commerce Cloud. It is one of many articles in a larger in-depth series on search and navigation.
Table of Contents
- Navigation nodes can be placed in your application to help users find specific links, categories, and pages quickly. Typically, they exist in the header and/or footer.
- Navigation nodes can be created and modified in SmartEdit as covered in the product documentation.
Indexes and Scoring
The list of indexed attributes can be set in the Backoffice. The Solr index can include any or all product attributes, whether those attributes are assigned through typing or classification. In the Backoffice, users can also set which of the indexed attributes are used for spell check and autocomplete (when entering a search term) and for faceting (when refining a keyword search).
In the accelerator, Solr will natively filter keyword search results based on user and user group restrictions, Online To and Online From dates, languages, and catalog versions; all of which can coexist in a single Solr index.
Indexed attributes can be weighted through Free Text Queries in the Backoffice, and/or through XML configuration. These weights will determine the priority of these attributes when Solr evaluates keyword matches.
Any attribute or media item that needs to be shown on a search results page will need to be included in the index.
Configurable Search Bar
By selecting the Search Bar Component in the SmartEdit, users can configure the behavior of keyword searches, including:
Whether keyword suggestions will be shown, and if so, how many.
Whether product suggestions will be shown, and if so, how many.
Whether product suggestions, if shown, will include product imagery.
How many characters the customer can type before Solr makes autosuggestions.
How many seconds Solr will wait, once the minimum number of characters is entered, before making autosuggestions.
Whether to show facets. Facets allow customers to refine their search result sets after navigating to a category page or performing a keyword search.
Any attribute set as a facet in Backoffice will be made available during faceted search. These can be limited on a per-category basis in the Commerce Search Perspective in the Backoffice.
You are also able to create your own suggestion templates.
Stopwords and Synonyms
Stopword functionality allows the creation of the list of irrelevant words that will be ignored when performing a search and therefore provide more relevant results. An example of words that could be ignored when a search is performed: "the," "these" or "product."
Synonym functionality allows improving search experience by extending results with products that don't match the search criteria directly. An example could be: Displaying "jeans" products to the customer that searched for "trousers." This is possible by defining these words as synonyms. On top of the standard Solr solution, SAP Commerce Cloud allows you to manage stopwords in the Backoffice. After stopwords are created, these have to be exported to Solr and a full index run.
It is worth noting that stopwords and synonyms work only with fields that are set up in the schema.xml Hybris filter (HybrisStopWordsFilterFactory). It won't work for string type fields that don't use filters at all.
When exporting stopwords and synonyms, SAP Commerce Cloud needs to have access to all Solr nodes (including slave nodes). Optionally, replication configuration may be changed to replicate SAP Commerce Cloud stopword and synonym files from master to slaves.
Keyword redirects allow overriding default behavior of the search mechanism. When a phrase typed by a customer matches a keyword defined in the system, the customer will be redirected to a specified URL.
The redirect mechanism supports these types of match types: EXACT, STARTS_WITH, ENDS_WITH, CONTAINS, REGEX (see this documentation for more information).
Here are a few typical examples of how to use this functionality:
Typing "help" in search box may redirect to an FAQ or Contact Us page.
Typing for a brand may show a special CMS landing page instead of standard results.
Typing an exact product name may lead directly to the product detail page.
- If you have many variants of the same base product, for example, multiple colors of a shirt, you might not want each individual color to show in the search results. Configuring variant grouping ensures when your results come back from Solr they are grouped by a particular variant.
- Consider grouping by the variant type that provides you with the most manageable number of results. Often this is at the highest base product level, as it de-clutters the search results. However, depending on your product model you may wish to group on something else. Your requirements might require that customers see all available options in the search results or perhaps you want to have greater control over how your results are displayed. For example, you might want a boost rule for all products with the color red.
Users can invoke alternative search query configurations using Query Templates. These templates can search on different indexed attributes, on different facet settings, as well as scoring for Exact Match, Fuzzy Match, and Wildcard. New Query Templates can be created and edited in the Facet Search Configuration area of the Backoffice, in the Administration perspective.
By default, this functionality is used for "as you type suggestion." Displaying this information may not require as many details as the standard search. Thanks to Query templates it is possible to configure and therefore optimize the query to Solr depending on the context in which the query was executed. For example, displaying suggestions doesn't require facets to be provided by Solr. See Search Query Templates for more information.
In Solr, Stemming alters the searched query by searching for the root of a word instead of the word itself. There are different flavors in a stemming algorithm. The most aggressive form of stemming (Porter) is enabled by default in the SAP Commerce Cloud. However, it might not be appropriate for all projects. It is often advisable to reduce the level of stemming to one focused on simply eliminating pluralization.
See the following example to understand stemming:
Introduced in version 6.4, adaptive search allows the use of multiple search profiles, dramatically increasing the ability to customize searches. Adaptive Search helps business users to create dynamic search configurations to achieve a specific business objective. Adaptive Search module supports the creation and management of Search Profiles (see section below) to give a unique experience to customers. It also gives the option to configure sorting of the products in the listing page. The Personalization Search Module allows the creation of unique and relevant customer experiences for a specific target group.
To explain the benefits better, lets look at the following example:
Susan is a merchandiser for a leading omnichannel apparel store in the UK that wants to create a specific channel for holiday shopping, and she would like to configure that category with specific filters. Susan also wants to promote the high-end profit making brand in this configuration. She also likes to promote individual items which are newly introduced for this season. Susan wants to create a new experience in the search and browse pages for millennials based on the outcome of recent research done by the company.
Adaptive search helps Susan to achieve the store’s business goal in a simple setup through configurations. The steps and results explained below.
The merchandiser/business user wishes to create a category called ‘Gift Ideas’ for the holiday season. Note, we are renaming the category ‘Accessories’ in the UK Apparel site for this case.
In Gift Ideas, Susan would like to the promote ‘brand’ and ‘store’ facets to the top. She also wants to include the facets 'color and 'stock level' and exclude the 'collection', 'style' and 'gender' facets for this category. She finishes the changes and saves. Here are the Backoffice and storefront changes which reflect the same. For information on how to manage facets, please visit Configuring Facets/Filters.
- Creation of Holiday Search Profile (global profile)
2. Creation of 'Gift Ideas' category and managing facets
3. Changes are reflected on the site
Susan also wants to promote the brand called ‘Blue Tomato’ inside the Gift Ideas category. If a customer clicks on the Gift Ideas category, then products belonging to the brand ‘Blue Tomato’ will be listed on top of the product list page. To do this, she needs to create a boost rule where any product belonging to 'Blue Tomato' will be boosted to the top.
Susan wants to promote individual items which are introduced in this season. In this case, watches with the name 'The Rubber Re-Run sky blue' and 'The Player matte black/matte gunmetal Uni' are promoted in the category 'Gift Ideas'. Susan uses the 'boost items' section of the Backoffice Adaptive Search to make these two hero products under the 'Gift Ideas' category.
If Susan is using SAP Commerce Cloud version 1808 and above, she could also set the "Show on Top" option to ensure the product is always shown at the top of the search results, regardless of the sorting option selected.
Now that the search profile is complete, Susan can assign it to target a group called Young Guests (whose age group is between 18-28). This can be achieved by using the dynamic search profile creation as mentioned above and assigning that profile to the specific target group called Young Guests in SmartEdit.
The following videos provide additional examples of how to use Adaptive Search to tune your search results:
Search Profiles are a concept that allows search administrators to define highly customized configurations by configuring facets and boost rules as well as boost or exclude individual items. This is the basis for the Adaptive Search approach. It is possible to create more than one profile and activate them on the storefronts separately or merge them with each other to achieve more complex results. The Search Profile configuration can be set at the global or at the category level.
A new perspective called Adaptive Search was added to the Backoffice. It is used to configure the Search Profiles and to preview the search results per profile.
Boost Rules and Hero Products are stored in a SolrSearchProfile. By default, the system has two of these:
- CategorySolrSearchProfile - Used to assign rules that are applicable only to a specific category
- GlobalSolrSearchProfile - Used to assign global rules that are category-independent and are enforced only in case no category level profile has been defined.
Please refer to Adaptive Search for more information.
Now that you're aware of the search and navigation functionality that can be tailored by business users, you might want to gain a more technical understanding on how these configurations work behind the scenes to return a relevant search result. For that, we recommend looking at our article on Understanding Solr Queries.