In this lesson, a new search profile is used
to retrieve additional information from the search index. In this
case, it is the 3 new warranty fields added in the previous lesson.
In this step you create a new search profile called X_findCatalogEntryWarranty,
which extends IBM_findCatalogEntrySummary. The IBM_findCatalogEntrySummary
search profile returns catalog information such as description, keyword
and part number.
Procedure
- Create a new custom WebSphere Commerce search configuration
file and call it wc-search.xml in the following
directory:
- WCDE_installdir\workspace\WC\xml\config\com.ibm.commerce.catalog-ext
Note: If
this directory does not exist, create it. If wc-search.xml already
exists in this directory, insert the custom <_config:profile>
data
below anywhere before the </_config:search-config>
snippet.
- Copy the following snippet into the file:
<?xml version="1.0" encoding="UTF-8"?>
<!--This file adds the new warranty fields to the search index. These names were defined in schema.xml-->
<_config:search-config
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-search.xsd ">
<_config:profile name="X_findCatalogEntryWarranty"
extends="IBM_findCatalogEntrySummary">
<_config:result>
<_config:field name="warterm" />
<_config:field name="wartype" />
<_config:field name="careinstruction" />
</_config:result>
</_config:profile>
</_config:search-config>
- Save your changes and close the file.