Configure category-based search relevancy

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.

Limitations


Procedure

  1. 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:

    1. 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

    2. Define the following property to enable the feature:

        <_config:property name="relevancyType" value="1" />
          

    3. Define a boost factor value for the categoryBasedSearchRelevancyBoostFactor property.

      For more information about setting values in the file, see Changing properties in the component configuration file (wc-component.xml).

  2. 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:

    1. Open the extended search configuration file on the Search EAR for editing.

      • Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml

    2. Review the category-based search relevancy properties in the WebSphere Commerce Search configuration file (wc-search.xml).

    3. Define values for the following properties:

      • joinFilterQuery

      • CatalogGroupSearchFields

      For more information about setting values in the file, see Changing properties in the component configuration file (wc-component.xml).

    4. If you have enabled the search result grouping feature, we 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">

  3. If we 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:

    1. Open the solrhome/MC_masterCatalogId/locale_name/CatalogEntry/conf/wc-data-config.xml file for editing.

    2. Remove all instances of the following code snippet:

        <field column="categoryname" splitBy=";" sourceColName="CATGRPNAME" />

    3. Save our changes and close the file.

    4. Preprocess and build the search index.

    5. 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>

    6. 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>

    7. Restart the search server.

  4. 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. We must also modify the wc-data-config.xml file.

  5. Business users: Update category descriptions to include keyword data by using either the Catalogs tool or the Data Load utility: