Setting up the Developer Solr-based Search environment
- Uses a standard Maven build (no proprietary scripts).
- Runs on Open Liberty instead of WebSphere Liberty.
- Enables hot deployment (changes are reflected without server restarts).
- Ability to build and test customizaton with Java 17.
For more information on HCL Commerce Developer Solr-based Search environment, refer HCL Commerce Developer Solr-based Search environment.
Before you begin
- OpenJDK 17: Download and install Java 17 (LTS) from: https://developer.ibm.com/languages/java/semeru-runtimes/downloads/
- Open Liberty (26.0.0.4 Web Profile 8): Download from https://openliberty.io/start/#downloads-pkg
- Eclipse IDE: Install Eclipse IDE for Enterprise Java and Web Developers (2024-06 or later). Install IBM Liberty Developer Tools from Eclipse Marketplace.
- Maven: Install Maven3.9.x
- Required features include: jsp-2.3, jaxrs-2.0, jpa-2.1, servlet-3.1, json-1.0, localConnector-1.0, distributedMap-1.0, webCache-1.0, appSecurity-2.0
Procedure
-
Obtain Solr-based Search docker images.
- Log in to the My HCLSoftware portal.
- Download:
HCL_Commerce_Enterprise_9.1.x.x_Search_Server_x86-64.tgz
-
Extract the Solr-based Search toolkit.
- Load the docker
image:
docker load -i <HCL_Commerce_Enterprise_9.1.x.x_Search_Server_x86-64.tgz> - Deploy a docker container, For
example:
docker load -i HCL_Commerce_Enterprise_9.1.20.0_Search_Server_x86-64.tgz - Run the
container:
docker run -it --entrypoint bash --name search-app -d commerce/search-app:9.1.20.0 - Copy the
toolkit:
docker cp search-app:/SETUP/bundles/search-bundle-*.zip - Extract to a directory (referred to as
<TOOLKIT_HOME>), for example:C:\HCL\SearchToolkit
- Load the docker
image:
-
Set up the toolkit.
Windows:
cd <TOOLKIT_HOME> .\setup-liberty.bat -
Merge Liberty Resources: Copy the specialized directories from
<TOOLKIT_HOME>/liberty/usr/into your<LIBERTY_HOME>/usr/directory. Ensure you include theextension/,shared/, andservers/searchServer/folders.extension/: Contains specialized HCL Commerce features required by the search server.shared/: Contains shared libraries used by the EAR.servers/searchServer/: The actual server profile
Install the required Liberty features.After you copy the
servers/searchServer/directory into<LIBERTY_HOME>/usr/, install the features that are declared in the copied server configuration.Windows:cd <LIBERTY_HOME>\\bin featureUtility.bat installServerFeatures searchServerLinux or macOS:cd <LIBERTY_HOME>/bin ./featureUtility installServerFeatures searchServerWheresearchServeris the Liberty server name under<LIBERTY_HOME>/usr/servers/searchServer. If you use a different server name, replacesearchServerwith that server name. -
Build with Maven: Navigate to
<TOOLKIT_HOME>/workspace/search-bundleand runmvn clean install. -
Configuring the database and JNDI
After running the setup script, you must configure the connection details for your HCL Commerce database and environment. These configurations are located in the configDropins/overrides directory of the search server. This step ensures that the search server can connect to your database and can communicate with Store and Transaction servers.
-
Eclipse IDE setup:
This section guides you through setting up Eclipse to work with the Developer Solr-based Search environment and configuring the Liberty server for development and debugging.
-
Integrate with HCL Commerce toolkit.
cd <WCDE_InstallDir>\bin configureSolrSearchSDK.bat -
(Optional) Update spiuser password.
Update the
spiuserpassword if your organization requires custom credentials for security compliance, password rotation policies, or if you do not want to use the default generated password.The password must match the value configured for the
spiuseraccount and should be at least 45 characters long.Default password:
Command:QxV7uCk6RRiwvPVaa4wdD78jaHi2za8ssjneNMdu3vgqi
Example:setSolrSearchSDKSpiuserPassword.bat open_liberty_install_dir spiuser_plain_text_passwordsetSolrSearchSDKSpiuserPassword.bat C:\openliberty\wlp MySecureSpiUserPasswordValue1234567890ABCDE -
Running and debugging:
Action Method Start Right-click server → Start Debug Right-click server → Debug Hot swap Save Java file (auto publish)