Hiding categories and products using deep category unpublish

Business users can quickly hide categories, subcategories and the products within them using the Catalogs tool. For example, if the category contains out-of-season merchandise. The deep category unpublishing feature allows HCL Commerce Search to not display products that are hidden from shoppers. It also allows HCL Commerce Search to not index categories that are hidden from shoppers.

Procedure

  1. Configure the search properties in the catalog component configuration file (wc-component.xml) on the HCL Commerce EAR:
    1. Open the catalog component configuration file on the HCL Commerce EAR for editing.
      For more information about the values within the file, see Search properties in the component configuration file (wc-component.xml).
    2. Set the following properties:
      
      <_config:property name="IndexPublishedOnly" value="true" />
      <_config:property name="EnableDeepCategoryUnpublish" value="true" />
      
      

      Where IndexPublishedOnly and EnableDeepCategoryUnpublish enables and uses deep category unpublish.

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

  2. Configure the search properties in the catalog component configuration file (wc-component.xml) on the Search EAR:
    1. Open the catalog component configuration file on the Search EAR for editing.
      The component configuration files are stored in the following location by default:
      • The default component configuration file for the search application: workspace_dir/search/xml/config/com.ibm.commerce.component_name/wc-component.xml
      • The extended component configuration file for the search application. To change the value of an existing property in the HCL Commerce Search component configuration file, you must create a customized version of the file in this location. The customized version of the file must contain only the changed properties: workspace_dir/search/xml/config/com.ibm.commerce.component_name-ext/wc-component.xml
      For more information about the values within the file, see Search properties in the component configuration file (wc-component.xml).
    2. Set the following property:
      
      <_config:property name="DisplayPublishedOnly" value="true" />
      

      Where DisplayPublishedOnly is used for deep category unpublish to allow only products from published categories to be displayed in the keyword search result.

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

  3. Preprocess the HCL Commerce search index data, passing in the following extra parameters:
    
    -publishedOnly true -deepUnpublish true
    

    Enabling deep category unpublish results in flagging the TI_DELTA_CATGROUP and TI_DELTA_CATENTRY tables with an F when publishing and unpublishing categories. The flag indicates that a full reindexing is run when updating the search index or opening store preview.

    Important: Ensure that the values entered in the component configuration files always match the value passed to the index build REST call, so that the server runtime behaves the same during indexing.

What to do next

After enabling deep category unpublish, business users use the Catalogs tool and clear the Display to customer check box for all categories and products that they want to hide. For more information, see Hiding categories.