Extending the wc-data-config.xml file using the solrcore.properties and x-data-config.xml files

The wc-data-config.xml file defines the default indexing queries, and the corresponding field mapping between the database column names and the index field names.

Note: You cannot directly modify or extend the wc-data-config.xml file. Instead, the default queries can be extended using the solrcore.properties file, and the field declaration mapping can be extended using the x-data-config.xml file.

Procedure

Open the customizable Solr core properties file:
  • WebSphere Commerce DeveloperWCDE_installdir\search\solr\home\masterCatalogId\en_US\Catalogentry\conf\solrcore.properties
  • LinuxAIXWindowsWC_installdir/instances/instance_name/search/solr/home/masterCatalogId/en_US/Catalogentry/conf/solrcore.properties
This directory contains the Master Catalog folder, in which there are the configurations files for each language.
  1. Review the list of query properties which can be overwritten in the solrcore.properties file.
    The following are generic properties that are applicable to all of the default queries defined in the wc-data-config.xml file:
    dataImporter.ext.querySelect
    List the custom column names to be appended into the query followed by a comma. For example:
    dataImporter.ext.querySelect=X_CATENTDESC.NAME X_NAME,X_CATENTDESC.SHORTDESCRIPTION
            X_SHORTDESCRIPTION,
    dataImporter.ext.queryFrom
    List the left outer join statements of the custom tables. For example:
    dataImporter.ext.queryFrom=LEFT OUTER JOIN CATENTDESC X_CATENTDESC ON 
    (X_CATENTDESC.CATENTRY_ID=CATENTRY.CATENTRY_ID AND X_CATENTDESC.LANGUAGE_ID=-1)
    The following are specific properties to the different CatalogEntry entities:
    dataImporter.ext.productQuerySelect
    dataImporter.ext.productQueryFrom
    When these two properties are set, the default product entity queries are updated.
    dataImporter.ext.bundleQuerySelect
    dataImporter.ext.bundleQueryFrom
    When these two properties are set, the default bundle entity queries are updated.
    dataImporter.ext.dynamicKitQuerySelect
    dataImporter.ext.dynamicKitQueryFrom
    When these two properties are set, the default dynamic kit entity queries are updated.
    Note: Ensure that all of the property values are mapped into a single property. That is, do not use new line separators within the same property value.
  2. Define the custom query part into the specific solrcore.properties file.
  3. Save your changes and close the file.
  4. Define database column-to-index-field mappings in the x-data-config.xml file.
    For example:
    
    <field column="X_NAME" name="x_name"  /> 
    <field column="X_SHORTDESCRIPTION" name="x_shortDescription" />
    
  5. Save your changes and close the file.
  6. Restart the search server and fully preprocess and build the search index.