HCL Commerce Version 9.1.13.0 or later

Collecting Elasticsearch based search-related MustGather data for search Ingest service issues

Prepare the following MustGather information before you call HCL Support to help with the troubleshooting process.

About this task

This MustGather can be used to investigate the cause of ElasticSearch-based Ingest issues. If you are trying to answer one of the following questions, this is the MustGather you will want to use:

  1. Why am I not seeing my catalog changes show up on the storefront after a full rebuild of the search index?
  2. Started a full rebuild of the search index, what is the status of this rebuild?
  3. Ran an automated full index rebuild , what are the results of this rebuild?

Procedure

  1. Execute the following REST API to start the indexing job and save the runId value from response for later use:
    https://{{ingest_hostname_port}}/connectors/{{connectorId}}/run?storeId={{storeId}}&envType={{envType}}
  2. Execute the following REST API to get the current status for the ingest run (using runId from 1):
    https://{{ingest_hostname_port}}/connectors/{{connectorId}}/runs/{{runId}}/status
    Note: If the ingest run is not completed, periodically execute the above request until it reports the ingest run is completed.
  3. Collect the responses for the following REST APIs:
    https://{{ingest_hostname_port}}/connectors/{{connectorId}}/runs/{{runId}}/
    https://{{ingest_hostname_port}}/connectors/{{connectorId}}/runs/
    https://{{ingest_hostname_port}}/connectors/{{connectorId}}

What to do next

Reviewing the data
Ingest Connector Definition
The connector definition defines the structure of the ingest pipeline, referencing the process groups and their variable settings. Validating the current version of the connector definition is essential to make sure you are using the expected version of an ingest pipeline.
Ingest Connector Run History
The ingest run history shows the latest runs against a given connector. This can be used to identify the recent ingest runs and confirm if other ingest runs have been performed since a particular run has been completed. For example, here are the latest three runs displayed for a sample connector:
{
    "items": [
        {
            "run": "i-6ac247a6-556e-471b-8272-eb4cd52c795b",
            "date": "2023-08-24T05:22:51.680Z"
        },
        {
            "run": "i-2e5b30ce-8d92-41cc-9d68-9db94300cb68",
            "date": "2023-08-23T12:25:12.956Z"
        },
        {
            "run": "i-18aea9f6-83ba-412e-9ef2-9e2e18f790a9",
            "date": "2023-08-23T12:17:55.759Z"
        }
    ],
    "offset": 0,
    "size": 3
}
If you want to verify if additional runs against the same ingest pipeline had the same issues as the ingest run(s) of concern, then look at the results of each of these runs.
Ingest Run Log
The ingest run log contains information related to a specific ingest run. Any INFO, WARNING, or ERROR level log messages reported during the run will be compiled in the run log and summarized by the Terminal Stage process group. For example, at the start of the Terminal Stage output for this ingest run, the locations and number of messages reported are listed:
{
    "items": [
    ...
        {
            "_index": "log",
            "_type": "_doc",
            "_id": "bc6278c7-c8a0-4bbd-80cf-e2947e1f1a9e",
            "_score": null,
            "_source": {
                "date": "2023-07-25T07:17:10.874Z",
                "severity": "I",
                "reference": null,
                "code": "DI0003I",
                "connector": "auth.reindex.cas",
                "location": "Terminal Stage",
                "run": "i-f14729a2-2941-4ef4-95ba-c4159044964e",
                "type": "summary",
                "attributes": null,
                "source": null,
                "message": {
                    "start": "2023-07-25T07:14:15.147Z",
                    "end": "2023-07-25T07:17:09.621Z",
                    "run": "i-f14729a2-2941-4ef4-95ba-c4159044964e",
                    "locations": {
                        "info": {
                            "Attribute Schema": "1",
                            "Catalog Schema": "1",
                            "Category Schema": "1",
                            "Description Schema": "1",
                            "Inventory Schema": "2",
                            "Page Schema": "1",
                            "Price Schema": "2",
                            "Store Schema": "2",
                            "Store Stage 1 (Store Locations), Find Store Locations": "1",
                            "Workspace Schema": "2"
                        }
                    },
Further down, the specific log messages are listed to provide more context regarding the type of messages reported by the process group:
                    "messages": {
                        "Store Schema": [
                            "DI0002I Successfully initialized auth.store index dynamic settings",
                            "DI0002I Successfully initialized auth.store index dynamic mappings"
                        ],
                        "Catalog Schema": [
                            "DI0002I Successfully initialized .auth.10501.catalog.202307250714 index schema"
                        ],
                        "Attribute Schema": [
                            "DI0002I Successfully initialized .auth.10501.attribute.202307250714 index schema"
                        ],
                        "Page Schema": [
                            "DI0002I Successfully initialized .auth.10501.page.202307250714 index schema"
                        ],
                        "Category Schema": [
                            "DI0002I Successfully initialized .auth.10501.category.202307250714 index schema"
                        ],
                        "Store Stage 1 (Store Locations), Find Store Locations": [
                            "DI0002I Successfully initialized .auth.10501.product.202307250714 index schema"
                        ],
                        "Description Schema": [
                            "DI0002I Successfully initialized .auth.10501.description.202307250714 index schema"
                        ],
                        "Price Schema": [
                            "DI0002I Successfully initialized auth.price index dynamic settings",
                            "DI0002I Successfully initialized auth.price index dynamic mappings"
                        ],
                        "Inventory Schema": [
                            "DI0002I Successfully initialized auth.inventory index dynamic settings",
                            "DI0002I Successfully initialized auth.inventory index dynamic mappings"
                        ],
                        "Workspace Schema": [
                            "DI0002I Successfully initialized auth.workspace index dynamic settings",
                            "DI0002I Successfully initialized auth.workspace index dynamic mappings"
                        ]
                    },
                    "severities": {
                        "I": 14
                    }, 
The elapsed section lists the time spent (in milliseconds) for each stage of processing:
 "elapsed": {
                        "absolute": {
                            "connector": "174474",
                            "stages": {
                                "Product Stage 1a (Product Document)": "21601"
                            }
                        },
                        "cumulative": {
                            "summary": {
                                "Catalog Pipeline": "5380",
                                "NLP Pipeline": "40306",
                                "Page Pipeline": "5409",
                                "Product Pipeline": "7667",
                                "Send Categories to Elasticsearch Pipeline": "4263",
                                "Send Products to Elasticsearch Pipeline": "3874",
                                "Send Stores to Elasticsearch Pipeline": "5666"
                            },
                            "stages": {
                                "Catalog Stage 1b (Filters)": "5380",
                                "NLP Service": "40306",
                                "Page Stage 1 (Page Document)": "5409",
                                "Product Stage 1g (Long Descriptions)": "7667",
                                "Send Categories to Elasticsearch": "4263",
                                "Send Products to Elasticsearch": "3874",
                                "Send Stores to Elasticsearch": "5666"
                            },
                            "bulk": {
                                "Catalog Stage 1b (Filters)": "3133",
                                "NLP Service": "14473",
                                "Page Stage 1 (Page Document)": "2160",
                                "Product Stage 1g (Long Descriptions)": "3576"
                            },
                            "retry": {
                                "Catalog Stage 1b (Filters)": "0",
                                "NLP Service": "0",
                                "Page Stage 1 (Page Document)": "0",
                                "Product Stage 1g (Long Descriptions)": "0"
                            }
                        }
                    } 
The processed section provides all completed index document creation and update operations. The size metric includes the total number of bytes written to Elasticsearch from each of the listed stages:
 "processed": {
                        "created": {
                            "Attribute Stage 1a (Attribute Document)": "194",
                            "Catalog Stage 1a (Catalog Document)": "3",
                            "Category Stage 1a (Category Document)": "111",
                            "Category Stage 1c (Long Descriptions)": "0",
                            "Page Stage 1 (Page Document)": "32",
                            "Product Stage 1a (Product Document)": "3920",
                            "Product Stage 1g (Long Descriptions)": "3920",
                            "Store Stage 1 (Store Document)": "7"
                        },
                        "updated": {
                            "Catalog Stage 1b (Filters)": "8",
                            "NLP Service": "3920",
                            "STA Stage 1 (STA)": "0"
                        },
                        "validated": {
                            "Catalog Stage 1a (Catalog Document)": "100%",
                            "Catalog Stage 1b (Filters)": "100%",
                            "NLP Service": "100%",
                            "Page Stage 1 (Page Document)": "100%",
                            "Product Stage 1g (Long Descriptions)": "100%"
                        },
                        "failures": {
                            "Catalog Stage 1a (Catalog Document)": "0",
                            "Catalog Stage 1b (Filters)": "0",
                            "NLP Service": "0",
                            "Page Stage 1 (Page Document)": "0",
                            "Product Stage 1g (Long Descriptions)": "0"
                        },
                        "retries": {
                            "Catalog Stage 1a (Catalog Document)": "0",
                            "Catalog Stage 1b (Filters)": "0",
                            "NLP Service": "0",
                            "Page Stage 1 (Page Document)": "0",
                            "Product Stage 1g (Long Descriptions)": "0"
                        },
                        "sizes": {
                            "Catalog Stage 1a (Catalog Document)": "1742",
                            "Catalog Stage 1b (Filters)": "4024",
                            "NLP Service": "5213397",
                            "Page Stage 1 (Page Document)": "21697",
                            "Product Stage 1g (Long Descriptions)": "1994263"
                        }
                    } 
The SQL section contains the elapsed times for our process groups specifically for SQL queries if you need to narrow down time spent processing from database vs. ElasticSearch requests:
 "sql": {
                        "execution": {
                            "Store Stage 1 (Store Document)": "43",
                            "Store Stage 1 (Supported Languages)": "16",
                            "Store Stage 1 (Supported Catalogs)": "11",
                            "Store Stage 1 (Configurations)": "27",
                            "Store Stage 1 (Store Locations)": "51",
                            "STA Stage 1 (STA)": "17",
                            "Catalog Stage 1a (Catalog Document)": "18",
                            "Catalog Stage 1b (Filters)": "21",
                            "Category Stage 1a (Category Document)": "61",
                            "Category Stage 1d (Hierarchy)": "29",
                            "Attribute Stage 1a (Attribute Document)": "65",
                            "Category Stage 1b (Facets)": "47",
                            "Attribute Stage 1b (Attribute Values)": "132",
                            "Product Stage 1a (Product Document)": "4740",
                            "Product Stage 1h (Child Items)": "5351",
                            "Product Stage 1i (Parent Category)": "4933",
                            "Product Stage 1b (Enrich Document - Overrides)": "1711",
                            "Product Stage 1b (Enrich Document - Entitlements)": "2490",
                            "Product Stage 1b (Enrich Document - Associations)": "591",
                            "Product Stage 1b (Enrich Document - Attachments)": "3165",
                            "Product Stage 1e (Find Attributes)": "9669",
                            "Price Stage 1b (Bundle Prices)": "252",
                            "Price Stage 1a (Product Prices)": "2863",
                            "Inventory Stage 1 (Product Inventory)": "12881",
                            "Page Stage 1 (Page Document)": "237",
                            "Category Stage 1c (Long Descriptions)": "22",
                            "Product Stage 1g (Long Descriptions)": "296"
                        },
                        "fetch": {
                            "Store Stage 1 (Store Document)": "2",
                            "STA Stage 1 (STA)": "2",
                            "Catalog Stage 1a (Catalog Document)": "2",
                            "Catalog Stage 1b (Filters)": "1",
                            "Category Stage 1a (Category Document)": "5",
                            "Attribute Stage 1a (Attribute Document)": "20",
                            "Product Stage 1a (Product Document)": "166",
                            "Page Stage 1 (Page Document)": "3",
                            "Category Stage 1c (Long Descriptions)": "2",
                            "Product Stage 1g (Long Descriptions)": "646"
                        }
                    }