Customizing spell check correction suggestions
How to customize spell check correction suggestions
You can customize the spell check correction suggestions with the help of the following configurable parameters based on which the HCL Commerce Search fetches appropriate spell check correction suggestions at the storefront.
Configurable parameters in wc-component.json
Configure the values of the following parameters as per your business
needs:
| Parameter name | Description | Default value |
|---|---|---|
| SpellCheckAccuracy | The similarity of the suggested terms. How similar the suggested terms at least need to be compared to the original suggest text tokens. A value between 0 and 1 can be specified. | 0.3 |
| SpellCheckPrefixLength | Refer to prefix_length option description in the Elasticsearch documentation. | 2 |
| SpellCheckSuggestionMode | Refer to suggest_mode option description in the Elasticsearch documentation. | MISSING |
| SpellCheckSortBy | Refer to sort option description in the Elasticsearch documentation. | SCORE |
| SpellCheckStringDistance | Refer to string_distance option description in the Elasticsearch documentation. | INTERNAL |
| SpellCheckMaxEdits | Refer to max_edits option description in the Elasticsearch documentation. | 2 |
| SpellCheckMaxInspections | Refer to max_inspections option description in the Elasticsearch documentation. | 5 |
| SpellCheckMaxTermFrequency | Refer to max_term_freq option description in the Elasticsearch documentation. | 0.01 |
| SpellCheckMinWordLength | Refer to min_word_lengthoption description in the Elasticsearch documentation. | 4 |
| SpellCheckMinDocFrequency | Refer to min_doc_freq option description in the Elasticsearch documentation. | 0.0 |
Configurable parameters in search profile
Configure the value of the following parameter as per your business
needs.
| Parameter name | Description |
|---|---|
|
Specifies the number of spell check correction suggestions to be returned at the storefront. |
Important: To learn more about search profile, refer to
Setting up your custom search profile.
Managing Configuration and Components
HCL Commerce Search supports managing various configurations such as
ingest-config, Component, and STA using a flexible REST API. These configurations
are used to customize and control different aspects of search behavior per
environment.
/search/resources/api/v2/configuration?nodeName={nodeName}&envType={envType}&locale={locale}Supported
HTTP Methods:- POST - Add a new configuration.
- PATCH - Update or append configurations.
- PUT - Move configurations from the "auth" node to the "live" node.
- GET - Retrieve existing configurations.
- Use the POST method to create a new configuration from scratch.
- Use the PATCH method to modify or append values.Note: Do not use POST to update configurations, as it will overwrite existing configurations entirely.
- Use the PUT method to move configuration resources from the authoring (auth) environment to the live environment.