Overview of search

B2B Commerce Cloud provides many robust search capabilities to leverage on your website. You configure these search capabilities through the Admin Console to tune your search results.

Configure search

B2B Commerce provides a range of search settings you can use to tune your site's search results. Settings are under Administration > System > Settings in the Admin Console. See Configure search settings.

Stopwords

Located under Marketing > Stopwords, Stopwords are words eliminated from search results. Common stopwords like "And," "The," and "Or" are included in the base platform, but you also may choose to add industry-specific words, or adjectives like "cheap." Stopwords affect all websites. See Work with stopwords.

Synonyms

Located under Marketing > Synonyms, use Synonyms to link words together, with either omni- or bi-directional single word connections. Synonyms affect all websites. See Work with synonyms.

Search Term Redirects

Located under Marketing > Redirects, Search Term Redirects allow Administrators to specify search terms that, when searched, automatically redirect to a given internal or external URL. For example, redirect the search term "customer portal" to the website's sign-in page. Configure these redirects for all or specific websites. See Use search term redirects.

Boosting and Burying

You can boost or bury particular product searches, depending on business requirements, under the Marketing and Settings sections. See Boost and bury search results

Partial Match

You do not want to exclude possibly relevant results for multi-term searches. Set up Partial Match using Minimum Match Count and Minimum Match Percent settings. Determine whether a set number of words need to match, or if a percentage of words in the description need to match in order for the result to appear. For example, if you set the Minimum Match Count to three and Minimum Match Percent to 75% and a query has four terms, at least three of the four terms must match, so returned results must include either the least or second-least frequent terms. This tuning of the search criteria contributes number and search quality of the returned search results, but does not impact scoring. See Configure search settings.

Fuzzy Search/Misspellings

Configure Misspellings, often called "fuzzy search," using Fuzzy Search, Max Edits, and Prefix Length Settings to determine how a word can be matched. Calibrate Misspellings to determine the number of identical characters needed to match a word. Also, determine how many errors may be present in a word before the word no longer appears in search results. See Configure search settings.

Search History

Users within each browser session may be shown their last 10 searches before they start typing in the search bar if Setting Search History Limit > 0. The number of past searches may be customized per website. See Configure search settings.

Stemming

B2B Commerce search has a robust stemming algorithm which provides a more forgiving set of query results. This means customers will have better success in finding what they are looking for without having to worry about entering the exact word forms in a search query.

Other than for a developer to disable it, Stemming is not configurable, and is applicable to the English language only.

AutoCorrect and Did You Mean

B2B Commerce search can auto-correct search words or offers suggestions to the user. You can turn this feature on or off at the application level. See Search Autocorrect and Did You Mean options.

Autocomplete

The autocomplete menu allows users to see immediate results for Products, Categories, and Content as they are typing. They can quickly go to a product without ever going to the search results. This can be configured per Website. SeeConfigure search settings.

Filtered Search Results

Search results can be filtered, narrowing the number of results shown. Keep adding search filters on top of previous ones to narrow the results. See Filter and search within results.

Special Characters

Enable the Search Non-AlphaNumeric Characters Setting to include non-alphanumeric characters in search results. This setting preserves non-alphanumeric characters and uses whitespace to split words. When disabled, non-alphanumeric characters are ignored. Additionally, the ERPNumber and Manufacturer Part Number fields each have an entry in the search index that removes special characters and does not replace them with a space regardless of the Search Non-AlphaNumeric Characters Setting. This is especially useful when working with hyphenated product numbers so that the hyphen is not converted to a space. See Configure search settings.

Configure search settings

B2B Commerce offers several settings for tuning and improving search performance, which are part of the search implementation.

General settings

Attribute Filters

If On, attributes (attribute values grouped by attribute type) will be faceted on the left nav of the product list to be used as filters. This does not control category or price faceting. Reindexing is required for changes to this setting to take effect.

Shows additional setting to Hide Facets Until Category Selected. If Yes, filters for attribute facets will not display in search results unless the user selects a category. Default value: No.

ON ON/OFF
Show Attributes on Search

If Yes, attribute facets will appear for search results, not just category pages.

NO YES/NO
Search History

If true users will see their previous searches when they click on the search box and nothing is in it. 

Shows additional setting for Search History Limit. This is the number of previous searches that will display to the user when they click on the search box and nothing is in it. Default value: 10.

ON ON/OFF
Search Non Alphanumeric Characters

If On, non-alphanumeric characters will be preserved and whitespace will be used to split words. If Off, non-alphanumeric characters will be ignored.

OFF ON/OFF
Log Product Search Queries

If Yes, product search queries will be included in the Application Logs. This should only be used by developers and will result in a lot of data if enabled.

NO YES/NO
Maximum Attribute Facets The maximum total number of attribute values that displays across all attribute types in the product list. By default, each attribute type displays five attribute values, which can be expanded to show the full list of attribute values. This setting does not affect that behavior. 1000  
Stopword Mode Determines what list of common words to exclude from search queries. If Custom, the list from Search - Stopwords in the Admin Console is used. If Default, the internal list of English Lucene stopwords is used. If None, no stop words will be used. Reindexing is required for changes to this setting to take effect.  Custom  
Website Specific Attributes If On, only attribute types assigned to categories in the website will be faceted which can impact performance. If Off, then faceting will be across all valid attribute values for each product regardless of site. Reindexing is required after changing the setting. OFF ON/OFF
Search Provider Name Name of the search provider. Elasticsearch  
Search Indexer Name Name of the search indexer. Elasticsearch  

Autocomplete

Autocomplete If On, users will see the autocomplete drop-down as they type in the search box. ON ON/OFF
Show Categories

If Yes, category autocomplete results will show up as the user starts typing in the search box.

Shows additional setting for Category Limit. This is the maximum number of category autocomplete results that display. Maximum value: 10. Default value: 3.

YES YES/NO
Show Website Pages

If Yes, CMS pages will show up as autocomplete results as the user is typing in the search box.

Shows additional setting for Website Pages Limit. This is the maximum number of CMS page autocomplete results that display. Maximum value: 10. Default value: 2.

YES YES/NO
Show Products If Yes, product autocomplete results will show up as the user starts typing in the search box. YES YES/NO
Product Limit The maximum number of product autocomplete results that display. Maximum value: 10. 5  
Show Brands

If Yes, brand autocomplete results will show up as the user starts typing in the search box.

Shows additional setting for Brand Limit. The maximum number of brand autocomplete results that display. Maximum value: 10. Default value: 3.

Also shows additional setting for Show Product Lines. If Yes, product lines will be displayed in the search autocomplete flyout. Default value: Yes.

YES YES/NO

Boosting

Product Boosting If On, specific products can be boosted to display higher or lower in search results. If No, product boosting values are ignored. ON ON/OFF
Enable Boosting by Purchase History If Yes, products that have been purchased within a defined lookback period are boosted in search results. Order frequency (that is line item count) is analyzed and not quantity purchased. Shows additional settings outlined below. NO YES/NO
Lookback Months for Purchase History Boosting Customer purchases within this number of months are used to identify products to boost based on purchase history. Increasing this value increases the time it takes to rebuild the search index. 6  
Frequently Purchased Threshold The number of times a customer must have purchased a product within the defined lookback months to consider it "Frequently Purchased" for boosting. 3  
Boost Amount for Frequently Purchased Products The multiplier applied to search result scoring for products that have been purchased more than the frequently purchased threshold. This value is included with the values for matches for all indexed fields and other boosting options to determine the search score and search rankings. 3  
Boost Amount for Less Frequently Purchased Products The multiplier applied to search result scoring for products purchased recently, but not enough to be considered frequently purchased. This value will be included along with the values for all matches for other indexed fields and other boosting options to determine the search score and search rankings. 1.5  
Allow Filtering for Previously Purchased Products If Yes, users can filter search results or category product lists to only see products that they have previously purchased, based on data available in the order history table. Default value: Yes YES YES/NO

Fuzzy search (Misspellings)

Fuzzy Search If On, fuzzy search is enabled on the site. ON ON/OFF
Max Edits The maximum number of character edits that can be made to a search string to return a match. This can be either a character swapped for a different character or a character being added or removed. 1 1, 2
Prefix Length The number of initial characters that must match and will not be fuzzified. A value below 2 will result in performance issues. 2 1 - 10

Partial matching

Minimum Match Count The minimum number of words that must match to return a result. Negative numbers indicate the number of optional words. Works in conjunction with Minimum Match Percent. 2 -10 - 10
Minimum Match Percent The percentage of optional words in a search term that must match to return a result. Negative numbers indicate the percent of optional words that can be missing. This works in conjunction with Minimum Match Count. 75 -100 - 100

Search index

Stored Procedure for Product Search Index Rebuild Defines what stored procedure is used to add extra searchable data to the product search index. Reindexing is required for changes to this setting to take effect. BuildProductSearchIndex  
Batch Size for Indexing

The number of records to send to search in each request during indexing. Reindexing is required for changes to this setting to take effect.

You may get a failing job with a 413 error if this value is too large.

1000  
Concurrent Requests for Indexing The number of concurrent requests to make to search during indexing. Reindexing is required for changes to this setting to take effect. 8  
Enable Ngram If yes, product number and manufacturer item values will be be indexed using ngram indexing. This will index segments of the values to return relevant results for partial matches. For example, if your product numbers are formatted like ABC12345 and your customers normally search for only the numeric segments, 12345 will be indexed and a search for it will return a match for the product. Values will be indexed both with special characters included and with them stripped out. NO YES/NO
Minimum Ngram Length The smallest number of characters of ngram segments to be indexed. This should match the smallest search term length your customers would search for matches on product numbers. For performance reasons and to prevent erroneous matches, the minimum value is 3. 5  
Maximum Ngram Length The largest number of characters of ngram segments to be indexed. This should match the largest character length of your product numbers. For performance reasons and to prevent erroneous matches, the minimum value is 3. 8  
Enable Product Number Tiebreaker Turn this feature on to sort product search returns by Product number to handle ties in the search term results when the relevance score is identical. NO YES/NO
Enable Force Merge If yes, a force merge will be performed after building indexes. This will add some build time but provide consistent search results. YES YES/NO

 Search suggestions

Enable Search Suggestions If On, AutoCorrect and DidYouMean will be configurable on the site. ON ON/OFF
Enable AutoCorrect If Yes, enforces the autocorrect threshold and part number settings. YES YES/NO
AutoCorrect Threshold The minimum confidence level at which searching on a mistyped phrase will automatically search on a corrected phrase. A value of 1 means the corrected phrase must have a closer match to the product data than the original phrase. Higher numbers require an even better match to apply the correction. The value must be higher than or equal to the DidYouMean Threshold. 2 0 - 5
Exclude Part Number from AutoCorrect If Yes, an exact match on a part number will prevent search from autocorrecting the search query. YES YES/NO
Enable DidYouMean If Yes, enforces the DidYouMean threshold setting. YES YES/NO
DidYouMean Threshold The minimum confidence level at which searching on a mistyped phrase will present a suggested phrase correction, but search on the original phrase. A value of 1 means the corrected phrase must have a closer match to the product data than the original phrase. Higher numbers require an even better match to apply the correction. This must be lower than or equal to the AutoCorrect Threshold. 1 0 - 5
Max Edits The maximum number of characters that can be changed on a word to be considered as a suggestion. 2 1, 2
Max Errors The maximum number of errors that can be corrected when generating suggestions. If a decimal between 0 and 1 this indicates a percentage of words that can be corrected. Whole numbers greater than or equal to 1 can be used to specify the exact number of words that can be corrected. Numbers higher than 2 may have a negative impact on performance. 0.3 0 - 1, 1 - 5

Sponsored Search

Sponsored Search If On, specific products can be flagged as sponsored and boosted to the top of search results. Sponsored flag is set for individual products in the product boosting screen, and a "Sponsored" label will be added for products with that flag. ON ON/OFF
Sponsored Search Limit The maximum number of sponsored products matching the search query that will be displayed at the top of search results. Maximum value of 5. 3 1 - 5

The Elasticsearch search URL setting was removed and is now configured in the appSettings.config file of the project.