Creating a custom project for search-related customizations

You can create and maintain a utility project under your workspace for all your search-related customizations.

Follow these steps to add your custom code into the search EAR class path:
Important: Be aware of the following restrictions when you implement search-related customizations on the HCL Commerce Search server.

The search server does not have access to the following components:

  • BOD-based component services or SDO objects.
  • HCL Commerce task or controller commands.
  • HCL Commerce EJB, data beans, or access beans.
Business services must instead be provided from the HCL Commerce server through the REST interface, while business data must be retrieved by using the Data Service Layer's JDBC query service.

For more information about the search server architecture, see HCL Commerce Search interface.

For more information about the search compatibility paths, see Migrating.

Procedure

  1. Create a utility project under your workspace.
    For example, SearchServerExtensionsLogic.
    1. Select File > New > Other... > Java Project.
    2. Enter a project name, such as SearchServerExtensionsLogic and select Finish.
  2. Configure the class path of the new project to include the Search EAR JAR files.
    1. Right-click the newly created project and select Build Path > Configure Build Path.
    2. Select the Libraries tab.
    3. Click Add Library.
    4. Select User Library and click Next.
    5. Select User Libraries.
    6. Select New and enter a name.
      For example, Search.
      Click OK.
    7. Click Add External JARs and select all the JAR files under the Search EAR.
      For example, all files under workspace_dir\Search.
    8. Click OK > Finish > OK.
  3. Add the SearchServerExtensionsLogic to the Search-Rest WAR utility projects.
    1. Select the J2EE view, if not already selected.
    2. Go to the following location: Search-Rest > WebContent > WEB-INF.
    3. Right-click web.xml and select Open With > Web Application Deployment Descriptor Editor.
    4. Select Actions > Manage Utility Jars
    5. Click Add and select Project.
    6. Select the newly created project, SearchServerExtensionsLogic, and click Finish.
    7. Click OK.
  4. Publish your test server and restart your search application