HCL Commerce Version 9.1.2.0 or later

Collecting Elasticsearch based search-related MustGather data for Facets

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

Procedure

  1. Log into the Query server Docker container. Edit the configuration file /profile/apps/search-query.ear/search-query.war/WEB-INF/classes/logback.xml. Update the trace level parameter from "error" to "all."
    <logger name="com.hcl.commerce.search" level="all" additivity="false">
  2. The scanPeriod parameter determines how long you will have to wait for your changes to be picked up. If you have set this parameter to a high number, you can restart the Query server in order to have your changes picked up immediately. A representative value for the parameter is shown below.
    <configuration scan="true" scanPeriod="30 seconds"> 
  3. Reproduce your search term association issue. Record the specific steps that you used to reproduce the problem and any details that might be relevant.
  4. Collect the trace files generated in the following directory.
    /app/ESQueryService/logs/​ 
  5. Save the response to the following REST API.
    GET http://{{elasticsearch_hostname}}​:30200/{{environment_type}}.{{storeId}}.product/_settings
  6. Save the responses to the following REST APIs.
     GET https://{{transaction_hostname}}:5443/rest/admin/v2/facet-descriptions/ 
    
     GET https://{{transaction_hostname}}:5443/rest/admin/v2/facet-properties/ 
    
     POST http://{{elasticsearch_hostname}}​:30200/{{environment_type}}.{{storeId}}.attribute/_search
    
    passing in the following JSON query into body of POST (substituting storeId into {{storeId}}):
    {"size":1000,"query":{"bool":{"must":[{"term":{"facet.search":{"value":true,"boost":1.0}}}],
    "filter":[{"query_string":{"query":"{{storeId}}","fields":["id.store^1.0"],"type":"best_fields",
    "default_operator":"or","max_determinized_states":10000,"enable_position_increments":true,
    "fuzziness":"AUTO","fuzzy_prefix_length":0,"fuzzy_max_expansions":50,"phrase_slop":0,"escape":false,
    "auto_generate_synonyms_phrase_query":true,"fuzzy_transpositions":true,"boost":1.0}},
    {"query_string":{"query":"-1","fields":["id.language^1.0"],"type":"best_fields",
    "default_operator":"or","max_determinized_states":10000,"enable_position_increments":true,
    "fuzziness":"AUTO","fuzzy_prefix_length":0,"fuzzy_max_expansions":50,"phrase_slop":0,
    "escape":false,"auto_generate_synonyms_phrase_query":true,"fuzzy_transpositions":true,
    "boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"_source":false,"stored_fields":"*",
    "sort":[{"sequence":{"order":"asc"}}]}