close

Filter

loading table of contents...

Connector for HCL Commerce Manual / Version 2107

Table Of Contents

3.3.4 Adding New PARENT_PARTNUMBER Field to the Solr Index

Searching 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.

  1. 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.

  2. Extend the HCL Solr configuration files as follows:

    1. Add the following new field to the HCL x-schema.xml file WCDE-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


    2. 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.

      <field column="PARENT_PARTNUMBER"
             name="parent_partNumber_ntk" />

      Example 3.2. New data config field


    3. 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


  3. 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.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.