Setting up the Developer Solr-based Search environment
The HCL Commerce Developer Solr-based Search
environment provides a modern development environment for
customizing and debugging search functionality in HCL Commerce. It
replaces the legacy IBM Rational Application Developer (RAD) based development
environment for HCL Commerce Search (Solr V9) with a lightweight stack
based on Maven, Open Liberty, and Eclipse. This toolkit only supports HCL Commerce Solr v9.7 Search environment. The existing HCL Commerce toolkit still provides a development environment based on Solr
v7.
Following are the major key benefits:
- Uses a standard Maven build (no proprietary scripts).
- Runs on Open Liberty instead of WebSphere Liberty.
- Supports multiple IDEs (Eclipse for Enterprise Java, IntelliJ, VS Code).
- 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): Install required
features.
Windows:
featureUtility.bat installFeature servlet-3.1 json-1.0 webCache-1.0 - 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
-
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) -
Default endpoints:
- Solr Admin: https://localhost:3738/solr/
- Search REST:https://localhost:3738/search/resources/
- Admin API:https://localhost:3738/search/admin/resources/
Credentials:- User:
spiuser - Password:
<your_spi_password>