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 WebSphere Commerce Search to not index or display products that are hidden from shoppers.
Procedure
- Configure the search properties in the catalog component configuration file (wc-component.xml) on the WebSphere Commerce EAR:
- Open the catalog component configuration file on the WebSphere Commerce EAR for editing. For more information about the values within the file, see Search properties in the component configuration file (wc-component.xml).
- 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 component configuration file (wc-component.xml).
- Configure the search properties in the catalog component configuration file (wc-component.xml) on the Search EAR:
- 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 WebSphere Commerce Search component configuration file, we 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).
- 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 component configuration file (wc-component.xml).
- Preprocess the WebSphere Commerce search index data, passing in the following extra parameters:
-publishedOnly true -deepUnpublish true
Enable 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. See Hiding categories.
Related concepts
Category-based browsing by using WebSphere Commerce Search
Related tasks
Sorting products using deep search sequencing