Use the category-based search relevancy feature to boost or filter products that display
to shoppers on the Search Results page.
The search merchandiser can use category-based search relevancy feature to create results that
more closely matches the shopper's expectation.
Consider a department store that sells notebooks. There are some notebooks in the
Stationary category and many notebook computers in the Electronics
category. There are a few films in the Movies category that have the term notebook in
the short description. Finally, the Books category has some books with the term
notebook in the title. Before you implemented the category-based search relevancy feature, a shopper
who searched for notebook sale would see results from all four categories,
and other categories that contain products with the word sale indexed. From
the shopper's perspective, the results might be grouped in an unexpected way.
The search merchandiser can improve the search results by boosting or filtering.
- Boost products to show products from a specific category first.
For example, if the shopper
searches for notebook sale show search results from the
Electronics category, then show results from other categories.
How to
implement:
- Developer: Set the
relevancyType=1
property in the component
configuration file, wc-component.xml.
- Search merchandiser: In the Catalogs tool Electronics category Change Category page
Keyword field, add the term
notebook
. Do not add this
keyword to any other category.
- Filter products to show results from specific categories.
For example, if the shopper
searches for notebook sale show search results from the
Electronics, Stationary, and Movies categories. Do not show
products from any other categories.
How to implement:
- Developer: Set joinFilterQuery to true in the
wc-search.xml file.
- Search merchandiser: In the Catalogs tool Change Category page Keyword
field, add the term
notebook
for the Electronics,
Stationary, and Movies categories. Do not add this keyword to any other
categories. Products within the three categories are searched. The returned products contain indexed
fields that with the text notebook, or sale.
Limitations
- Category-based search relevancy does not support multiple search terms. That is, both commas and
spaces are treated as separators in the search query. For example, if any of a customer's search
terms are found in multiple categories, all categories containing the search terms will be
searched.
- Category-based search relevancy does not support the Specify Top Search Result search rule
action.
- The keyword field does not distinguish between the master and sales catalogs. If you add a
keyword to the master or sales catalog, it will appear be filtered regardless of the catalog you are
searching. To avoid having keywords affect each other, create a separate sales catalog for the
keyword, so that they are considered separate.
Before you begin
- Ensure that your store is using a REST-based search deployment, for example the starter stores
provided with Feature Pack 7 and later.
- Install these interim fixes: JR52512, JR53396, and
JR54180.
- Optionally, if you have customized sorting in WebSphere Commerce search, install this interim
fix: JR54065
Procedure
-
Enable and work with the category-based search relevancy feature by setting properties in the
extended catalog component configuration file (wc-component.xml) on the Search
EAR:
-
Open the extended catalog component configuration file on the Search EAR for editing.
- Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-component.xml
-
Define the following property to enable the feature:
<_config:property name="relevancyType" value="1" />
-
Define a boost factor value for the
categoryBasedSearchRelevancyBoostFactor property.
-
Enable and work with the category-based search relevancy feature by setting properties in the
extended search configuration file (wc-search.xml) on the Search EAR:
-
Open the extended search configuration file on the Search EAR for editing.
- Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
-
Review the category-based search relevancy
properties in the WebSphere Commerce search configuration file
(wc-search.xml).
-
Define values for the following properties:
-
If you have enabled the search result grouping feature, you must include all other profiles that extend the
IBM_findProductsBySearchTerm profile for the features to correctly work
together:
<_config:profile name="IBM_findProductsBySearchTerm" indexName="CatalogEntry">
<_config:join>
<_config:param name="joinFilterQuery" value = "true" />
<_config:param name="CatalogGroupSearchFields" value="keyword, name" />
</_config:join>
</_config:profile>
<_config:profile name="IBM_findProductsBySearchTerm_grouping" extends="IBM_findProductsBySearchTerm">
<_config:profile name="IBM_findProductsByNameOnly" extends="IBM_findProductsBySearchTerm">
<_config:profile name="IBM_findProductsByNameAndShortDescriptionOnly" extends="IBM_findProductsBySearchTerm">
<_config:profile name="IBM_findProductsByUnstructureOnly" extends="IBM_findProductsBySearchTerm">
-
If you are using sales catalogs, complete this step to ensure that products within a sales
catalog do not appear in search results in the master sales catalog:
-
Open the
solrhome/MC_masterCatalogId/locale_name/CatalogEntry/conf/wc-data-config.xml
file for editing.
-
Remove all instances of the following code snippet:
<field column="categoryname" splitBy=";" sourceColName="CATGRPNAME" />
-
Save your changes and close the file.
-
Preprocess and build the search index.
-
Update the extended catalog component configuration file
(wc-component.xml) on the Search EAR to include the following
configuration:
<_config:extendedconfiguration>
<_config:configgrouping name="SearchConfiguration">
<_config:property name="relevancyType" value="1"/>
<_config:property name="categoryBasedSearchRelevancyBoostFactor" value = "100"/>
</_config:configgrouping>
</_config:extendedconfiguration>
-
Update the extended search configuration file (wc-search.xml) on the
Search EAR to include the following configuration:
<_config:profile name="IBM_findProductsBySearchTerm" indexName="CatalogEntry">
<_config:join>
<_config:param name="CatalogGroupSearchFields" value= "name" />
</_config:join>
</_config:profile>
-
Restart the search server.
- Optional:
Increase the size of the CATGRPDESC table KEYWORD
column.
The category-based search relevancy feature uses the CATGRPDESC.KEYWORD to store product-category
mappings. This column is defined as column VARCHAR(254). If you require more space, increase the
size of the column. You must also modify the wc-data-config.xml file.
- Optional:
Customize the Catalogs tool to increase the size of the Keywords
field.
If you increased the KEYWORD column size, and if business users use the Catalogs tool to enter
product data you must increase the size of the Keywords field in the Catalogs
tool.
-
Business users: Update category descriptions to include keyword data by using either the
Catalogs tool or the Data Load utility: