Search customization for server containers

The product Search server runs in its own Linux-based container. The containers use Docker technology. All servers share workspaces in the Windows-based development environment, simplifying the development process. After you develop and test your code in the workspace, you can deploy it in new containers.

In HCL Commerce Version 9, the Transaction, Search, Customization, and Store servers run in independent containers. The Docker software's encapsulation of the servers means that nearly all Search customization happens inside the Search server's container. Customizations that take place inside the Search server include:

  • All Solr-related changes including stop words and Solr schema-field type customizations.
  • Search profiles
  • Search expression providers
  • Search query preprocessor and postprocessor functions.
Not all search-related customizations take place in the Search server. In particular, search index preprocessing occurs on the Transaction server. During development, the Search and Transaction servers run in the same workspace, but they are encapsulated in separate containers during deployment. If you build your custom code to work in the appropriate toolkit project, that code runs in the correct container.
The workspace contains directories for each project. The project directories and any relevant subdirectories and files are listed in the following table. For more information on the organization of the workspace projects, see HCL Commerce workspace.
Customization Server (container) Project Example
Preprocess Java code Transaction server WebSphereCommerceServerExtensionsLogic Creating a custom expression provider
Preprocess configuration files Transaction server
  • WC\xm\search\dataImport\v3\db2\wc-dataimport-preprocess-custom.xml
  • WC\xm\search\dataImport\v3\db2\wc-dataimport-preprocess-x-finalbuild.xml
Note: You will not see changes you make to the preprocess XML files until you execute a DROP TABLE command on the corresponding table.
Tutorial: Indexing external data in HCL Commerce search
Solr related configurations Search server search-config-ext\src\index\managed-solr\config\v3\* Limiting search terms and characters from the search query
Search configurations Search server search-config-ext\src\runtime\config Search configuration
Search Java code Search server search-logic-ext HCL Commerce Search customization tutorials

The development process

You can develop for Search in the HCL Commerce Version 9 Docker software environment in three steps.
  1. Prepare your customized code by using the development toolkit. All servers share workspace environments during this phase.
  2. Use the WCB tool to build a customization package. For more information about configuring the WCB tool to extract and build packages, see Packaging customized code for deployment.
  3. Build and deploy your customized container images. For generic instructions on building such images, see Building a custom Docker image from a deployable package.

The continuous integration and continuous deployment pipeline

Since the servers run in containers, you can take advantage of containerization and implement a continuous integration and continuous deployment (CI/CD) pipeline. A CI/CD pipeline helps you automate processes in your development lifecycle, from when a developer checks in code, to deploying the code to your production environment. The development process feeds the CI side of such a pipeline.

A CI/CD pipeline helps you automate processes in your development lifecycle, from when a developer checks in code, to deploying the code to your production environment. The pipeline includes staging, version control, testing, and packaging and deployment of the code. For more information about setting up a CI/CD pipeline, see Planning a CI/CD pipeline.