Migrating REST-based Search to HCL Commerce Version 9
Migrate your REST-based Search index and configurations from a previous version of HCL Commerce to HCL Commerce version 9.0.0.3+.
HCL Commerce version 9.0.0.3+ uses Solr 5.4.4, so your index data from an earlier version of Solr is unsupported by Solr 5.4.4.
Review the following information to understand what HCL Commerce Search architecture and
functionality has changed in HCL Commerce version 9.0.0.3+.
- The HCL Commerce Search server has its own container within your production environment. You deploy your HCL Commerce Search server as part of your CI/CD pipeline.
- The programming model for HCL Commerce Search is changed to coincide with the new build
and deployment process in HCL Commerce version 9.0.0.3+. The basis of the new programming
model is to separate custom HCL Commerce Search assets and configuration settings from the
product code, which reduces the resource cost of maintenance and operation. The following
customizations must be updated for the new programming model:
- Solr runtime is upgraded to 5.5.4, so any customizations to Solr must be updated to follow new programming model.
- HCL Commerce Search utilities are replaced by the container utility service, which includes di-preprocess, di-buildindex, di-calculateprice, and indexprop. The SetupSearchIndex utility is discontinued. The index core directory is now automatically synchronized with the SRCHCONF table and the SRCHCONFEXT table when the HCL Commerce Search server is started. To create a new master core, extension core, or language you must maintain the SRCHCONF and SRCHCONFEXT tables. The workspace core is created automatically if the HCL Commerce Search server detects that the workspace schema is on an authoring environment.
- In HCL Commerce version 9.0.0.3+, the table view is used for preprocessing and index building, so any customizations to preprocessing and index building must be reconfigured according to the new programming guide.
- In HCL Commerce version 9.0.0.3+, the common foundation-based scheduler is enabled on the HCL Commerce Search server. Authoring environments use the scheduler to replicate indexes from authoring environments to the HCL Commerce Search repeater.
- HCL Commerce version 9.0.0.3+ moved to JAX-RS 2.0(JSR-339). Also, the documentation API is Swagger 2.0.
- Previous versions of HCL Commerce used direct JDBC calls, which went through DSL(data service layer) to the database. In HCL Commerce version 9.0.0.3+, JPA 2.1 (EclipseLink) native query is used. Custom queries from previous versions are ported over to the new query service. No additional configure is required.
- In HCL Commerce version 9.0.0.3+, when Price or Inventory are worked as extended core,
SolrJoin
preserves the document relationship between the mainCatalogEntry
core and the Price/Inventory subcore.MultipleQueryComponent
andMultipleFacetComponent
, which were used to join or filter the subcores in previous versions of HCL Commerce, are now discontinued. To handle facet and result fields from extension indexes, a newSearchCatalogEntryExtensionIndexPostprocessor
makes a subquery against each of the extension indexes, then joins back with the main index. A new join parameter was also introduced in wc-search.xml, so any previous customization to an extension index needs to be implemented to useSolrJoin
.
Before you begin
- Drop all your temporary tables, including your custom temporary tables, but exclude the
following temporary tables:
TI_DELTA_CATENTRY
TI_DELTA_CATGROUP
TI_DELTA_INVENTORY
Your temporary tables use a
TI_
prefix. Whereas, your custom temporary tables use aXI_
prefix.Changes were made to the temporary tables between the previous versions of HCL Commerce and HCL Commerce Version 9. Failure to drop the temporary tables might result in preprocess errors, for example, SQLSTAE=56098. For more information about temporary HCL Commerce Search tables, see Temporary table schema definition.
Procedure
-
Migrate your index cores. In HCL Commerce version 9.0.0.3+, the
setupSearchIndex utility is discontinued. Now, you must maintain your
SRCHCONF table and SRCHCONFEXT table to set up your index
distribution.
- Migrate your index schema customizations. In HCL Commerce version 9.0.0.3+, the
catalog entry
fieldType
definitions use two templates:- A non-customizable template:
search-config/src/main/resources/managed-solr/config/v3/common/schema-field-types.xml.Note: When the first index is created, this XML file is copied to the resources/search/index/managed-solr/config/v3/common directory. After the index creation, other indexes share this fieldType definition.
- A customizable template:
search-config-ext/src/main/resources/index/managed-solr/config/v3/common/x-schema-field-types.xml.
Note: When the first index is created, this XML file is copied to resources/search/index/managed-solr/config/v3-index-ext/common directory. After the index creation, other indexes share this customizable fieldType definition.
- A non-customizable template:
search-config/src/main/resources/managed-solr/config/v3/common/schema-field-types.xml.
-
Migrate your Solr supported file assets.
-
Migrate your HCL Commerce Search runtime configuration.
- In previous versions of HCL Commerce, you might create an SQL query in the
Search_eardir/xml/config/com.ibm.commerce.catalog/wc-query-utilities.tpl
file and rely on the
JDBCQueryService
to retrieve data from the HCL Commerce Search server. In HCL Commerce version 9.0.0.3+, you must update the workspace_dir/search-config-ext/runtime.config/com.ibm.commerce.search/wc-query.tpl file. Later, when you deploy your customizations, the .tpl file is deployed to the Liberty_installdir/resources/search/runtime/config/com.ibm.commerce.search-ext directory. - In previous versions, you might create custom expression providers, preprocessors, or postprocessors under the WebSphereCommerceServerExtensionsLogic project. In HCL Commerce version 9.0.0.3+, you must create these customizations in the workspace_dir/search-logic-ext directory.