Reading search indices and profit margin values in a Live environment
If you used custom-_Template-DatabaseETL in a Version 9.1.14.0+ Authoring environment, perform the following steps using the Custom Java ETL Process Group to acquire the Search Indices and the profit margin values in the Live environment.
Procedure
-
Use the following URL to access Swagger UI to interact with Search Ingest
Service API.
http://ElasticSearchHostname/IP:30800/swagger-ui/index.html?url=/v3/api-docs&validatorUrl=#/Connector%20Configuration/upgradeConnector
- Inside the Swagger user interface, navigate to .
- Click on Try it out.
- In the id field, enter live.postindex.
-
In the Request Body field, enter the following JSON
code:
{ "Licensed Materials": "Property of HCL Technologies Limited. (c) Copyright HCL Technologies Limited 1996, 2023.", "_name": "Post re-indexing connector descriptor for HCL Commerce Ingest service to be used with the Live environment", "_usage": { "// This is the connector descriptor of a post reindexing connector to be used with HCL Commerce Ingest service.": "" }, "name": "live.postindex", "environment": [ "auth", "data", "toolkit", "live" ], "description": "This is the connector for customization to perform a post re-indexing operation.", "pipes": [{ "// ": "------------- Preparation Stage -------------", "// Preparing database specific settings for this indexing pipeline": "", "name": "ReindexLink", "label": "ReindexLink" }, { "name": "ProfitMarginSchemaUpdateConnector", "label": "ReindexLink-ProfitMarginSchemaUpdateConnector" }, { "name": "ProfitMarginDatabaseConnectorPipe", "label": "ReindexLink-ProfitMarginDatabaseConnectorPipe" }, { "// ": "------------- End of dataflow -------------", "// The connector dataflow terminates here by generating a log summary through the Logging Service": "", "name": "Terminal", "label": "Terminal" } ] }
- Click Execute.
- Verify that the live.postindex connector is upgraded with custom profit margin process groups. In this example, the live.postindex - ReindexLink-ProfitMarginSchemaUpdateConnector and live.postindex - ReindexLink-ProfitMarginDatabaseConnectorPipe process groups will be added to the live.postindex connector.
-
To replicate the search index in a production environment, use the following
command within a REST client.
Leave the body of the REST call empty and use a basic authentication: the username isPOST: https://CommerceServerName:ts-app-port/wcs/resources/admin/index/dataImport/build?connectorId=push-to-live&storeId=1
spiuser
and the password isspiuserPassword
.Note: The default password isQxV7uCk6RRiwvPVaa4wdD78jaHi2za8ssjneNMdu3vgqi
. In the current example, the storeId is given as 1 (AuroraESite); replace this with the storeId for your own stores. -
Verify the status by using the following REST call.
GET: https://CommerceServerName:ts-app-port/wcs/resources/admin/index/dataImport/status?jobStatusId=jobStatusId
Restriction: If catalog data changes are not available in your live stores after a push-to-live operation, trigger a WCT+ESINDEX invalidation operation when you run the update. For more information about the procedure and the caches to be updated, refer to Troubleshooting: Index changes are not reflected in storefront after Elasticsearch push-to-live and make sure that the profit margin field is indexed.