Special characters in search queries can complicate the search experience in eCommerce platforms. To ensure accurate and error-free search results, it’s important to handle these characters properly.
1. Enable Special Characters Handling
Navigate to Stores > Configuration > Amasty Extensions > Elastic Search > Catalog tab and enable the Allow Special Characters setting:
This ensures that non-alphabetic symbols included in search queries are correctly escaped, which helps in preventing errors and improving search accuracy
2. Configure Character Mapping
Open the Indexation Settings tab and add the char mapping for the special characters, which are often used in the search queries:
Here, you can add character mappings to define how special characters are processed. Character mapping allows the search engine to replace certain characters based on predefined rules.
As an example, a scenario where a product name includes a comma (e.g., "1,1") but customers typically use a period when searching (e.g., "1.1") can be considered. In this case, the ". => ," character mapping can be specified to replace periods with commas in the search queries.
This mapping ensures that search queries using "1.1" will be interpreted correctly and match the stored product name "1,1":