Changing properties in the component configuration file (wc-component.xml) (Search EAR)
To change any properties in the configuration file
(wc-component.xml), you must create a customized version of the file in a new
folder. The customized version of the file must contain only the changed
properties.
Before you begin
Procedure
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
-
Create a custom component configuration file (wc-component.xml), if one
does not already exist:
-
Add the basic XML elements required for your custom wc-component.xml
file:
-
Add the XML for any properties that you want to change to your custom
wc-component.xml file:
- Save and close the custom configuration file.
- Test your configuration changes.
- Deploy the customized file to the production environment.
Example 1: Custom catalog component configuration file that changes search configuration properties
<?xml version="1.0" encoding="UTF-8"?>
<_config:DevelopmentComponentConfiguration
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component.xsd "
xmlns:_config = "http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<_config:extendedconfiguration>
A
<_config:configgrouping name = "SearchConfiguration">
<_config:property name = "SearchProfilesStatistics" value = "true"/>
<_config:property name = "SearchStatisticsUpdateInterval" value = "4800"/>
<_config:property name = "SearchStatisticsResultPagesTrackingThreshold" value = "2"/>
<_config:property name = "relevancyType" value="1"/>
</_config:configgrouping>
B
</_config:extendedconfiguration>
</_config:DevelopmentComponentConfiguration>
In
the previous example, the code snippet starting with A and ending with
B is the inserted code, which contains the following properties:
- SearchProfilesStatistics
- The value is changed to
true
to enable site search statistics. - SearchStatisticsUpdateInterval
- The value is changed to
4800
seconds as the time interval between batch processing updates. - SearchStatisticsResultPagesTrackingThreshold
- The value is changed to
2
search results pages to track search rule statistics. - relevancyType
- The property relevancyType is set to 1 to enable the category search relevancy feature.