close

Filter

loading table of contents...

Connector for HCL Commerce Manual / Version 2301

Table Of Contents

3.4.5 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 Code\ts-app\xml\search\dataImport\v3\db2\CatalogEntry\wc-dataimport-preprocess-parent-partnumber.xml in the customization package for the transaction server 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/workspace/search-config-ext/src/index/managed-solr/config/v3/CatalogEntry/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. Extend the query select and the query from for parent part number using the wc-data-preprocess-x-finalbuild.xml file WCDE-INSTALL\workspace\WC\xml\search\dataImport\v3\db2\CatalogEntry\wc-data-preprocess-x-finalbuild.xml.

  3. Rebuild the index as described in the HCL documentation at https://help.hcltechsw.com/commerce/9.0.0/search/tasks/tsdsearchbuildindex.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.