Connector for HCL Commerce Manual / Version 2101
Table Of ContentsSearching HCL Commerce catalog assets in CoreMedia Studio is part of the seamless integration experience that Content Cloud brings to the table. Almost all the catalog assets are searchable in Content Cloud without any need of customization except for the catalog product asset which acts as a template for a group of items (or SKUs) that exhibit the same attributes.
This needs an extra property to explicitly define the hierarchical relationship between the product and its variants in order to make the variants also searchable in Studio. This subsection describes all the steps required to introduce the custom CoreMedia Content Cloud parent part number field which establishes the relationship between product and variant in WebSphere Commerce.
Preprocessing data involves querying WebSphere commerce tables and creating a set of temporary tables to hold the data. The file
WCDE-INSTALL\components\foundation\samples\dataimport\catalog\oracle\wc-dataimport-preprocess-parent-partnumber.xml
in the CoreMedia Workspace for HCL Commerce defines a custom preprocessing task for this. The file contains the new temporary table definition, database schema metadata, and a reference to the Java class used in the preprocessing steps for an Oracle database.Simply copy the file to the corresponding location in your HCL Commerce RAD system. The workspace contains files for other databases which you can use similarly.
Extend the HCL Solr configuration files as follows:
Add the following new field to the HCL
x-schema.xml
fileWCDE-INSTALL\components\foundation\subcomponents\search\solr\home\template\CatalogEntry\conf\x-schema.xml
<field name="parent_partNumber_ntk" type="wc_keywordTextLowerCase" indexed="true" stored="true" multiValued="false"/>
Example 3.1. New Solr schema field
Add the new field declaration for parent part number in the file
WCDE-INSTALL\components\foundation\subcomponents\search\solr\home\template\CatalogEntry\conf\x-data-config.xml
.Extend the query select and the query from for parent part number in the file
WCDE-INSTALL\components\foundation\subcomponents\search\solr\home\template\CatalogEntry\conf\locale\[LOCALE_NAME]\solrcore.properties
where LOCALE_NAME is the locale name of the language that use in the search index.dataImporter.ext.querySelect=TI_PARENTCHILDCATENTRY.PARENT_PARTNUMBER,
dataImporter.ext.queryFrom=LEFT OUTER JOIN TI_PARENTCHILDCATENTRY ON (CATENTRY.CATENTRY_ID=TI_PARENTCHILDCATENTRY.CATENTRY_ID)
Example 3.3. Extended SQL Query
Rebuild the index as described in the HCL documentation at https://help.hcltechsw.com/commerce/7.0.0/com.ibm.commerce.developer.doc/concepts/csdmanagesearchpopbuild.html
WebSphere Commerce search contains a scheduler job (UpdateSearchIndex) to synchronize the catalog changes with the search index. The default update interval is 5 minutes. You can change this default value according to your needs in the WebSphere Commerce Administration Console.