HCL Commerce Version 9.1.10.0 or later

Applying the Near Real Time (NRT) index to Profit Margin Customization

This section of the tutorial describes the steps required to apply the Near Real Time (NRT) index for Profit Margin Customization for HCL Commerce Search prior to Version 9.1.14.

Before you begin

Use these instructions only if you are running a version of HCL Commerce Search prior to Version 9.1.14, and are using the Groovy development framework. Groovy is deprecated as of V9.1.14. For current instructions, see Applying the Near Real Time (NRT) index to Profit Margin Customization with Java ETL.

Prerequisite

Before you apply NRT index for customization, you must apply the Profit Margin customization to the environment. For more information, refer to Upgrade the existing connectors in NiFi.

Process

  1. Get connector descriptor of existing connector.
  2. Customize the connector descriptor of the auth.product connector with profit margin customization using the following step.
    1. Open the auth.product connector descriptor JSON file and paste the following profit margin connector code after the PriceStage pipe.
      {
      		"name": "ProfitMarginDatabaseConnectorPipe",
      		"properties": [
      			{
      				"name": "Database Driver Location(s)",
      				"value": "${AUTH_JDBC_DRIVER_LOCATION}",
      				"scope": {
      					"name": "Database Connection Pool", 
      					"type": "CONTROLLER_SERVICE"
      				}
      			},
      		{
      			"name": "Database Driver Class Name",
      			"value": "${AUTH_JDBC_DRIVER_CLASSNAME}",
      			"scope": {
      				"name": "Database Connection Pool",
      				"type": "CONTROLLER_SERVICE"
      			}
      		},
      		{
      			"name": "Database Connection URL",
      			"value": "${AUTH_JDBC_URL}",
      			"scope": {
      				"name": "Database Connection Pool",
      				"type": "CONTROLLER_SERVICE"
      			}
      		},
      		{
      			"name": "Database User",
      			"value": "${AUTH_JDBC_USER_NAME}",
      			"scope": {
      				"name": "Database Connection Pool",
      				"type": "CONTROLLER_SERVICE"
      			}
      		},
      		{
      			"name": "Password",
      			"value": "${AUTH_JDBC_USER_PASSWORD}",
      			"scope": {
      				"name": "Database Connection Pool",
      				"type": "CONTROLLER_SERVICE"
      			}
      		}
      	]
      	},
  3. Upgrade the connector descriptor of an existing connector
  4. Verify that the connector is upgraded as shown in the following figure.

  5. Modify the groovy script in the processor to accommodate Near Real Time (NRT) indexing.
  6. Verify the NRT SQL query.

Testing NRT Index

Test the NRT index to make sure that the Profit Margin customization is successful.