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
-
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" />
-
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" />
Note: To change the log level for the search query service with the above settings, disable the turbo filter by commenting out the turbo filter tag in the logback.xml file. Disabling turbo filter will disable request level tracing.<!-- <turboFilter class="ch.qos.logback.classic.turbo.DynamicThresholdFilter"> …… </turboFilter> -->
- Reproduce your search term association issue. Record the specific steps that you used to reproduce the problem and any details that might be relevant.
-
Collect the trace files generated in the following directory.
/app/ESQueryService/logs/
-
Save the response to the following REST API.
GET http://{{elasticsearch_hostname}}:30200/{{environment_type}}.{{storeId}}.product/_settings
-
Save the responses to the following REST APIs.
passing in the following JSON query into body of POST (substituting storeId intoGET 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
{{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"}}]}