Ensuring Accurate Search Results with Special Characters

How to ensure accurate search results with special characters?

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":


Please, also refer to our comprehensive user guide for more detailed instructions. Should you still require our assistance, don’t hesitate to contact our support team.


      • Related Articles

      • Search results are different in the pop-up and search results page. What can I check?

        If you notice discrepancies between the products displayed in the autocomplete pop-up and those shown on the search results page, we recommend checking the following settings to resolve the issue: Step 1. Ensure Modules Are Updated to the Latest ...
      • How to fine-tune Elastic Search module for exceptional results?

        If you are experiencing unexpected search results while using our Elastic Search module, please follow the steps below to confirm your configuration is correctly set. Additionally, refer to our video guide for Elastic Search set up: 1. Elasticsearch ...
      • Why should I use your module instead of Magento Elastic Search?

        Starting from version 2.4, Magento works with the Elastic Search that greatly impacts the overall performance of the website. Using Elastic Search as a search engine provides faster page loading and more relevant search results. Within the default ...
      • I'd like to sort the search results, is it possible?

        The Elastic Search extension provides the functionality to create relevance rules for moving the position of specific products in the search results. Please find the details about creating relevance rules in our guide. If our Improved Sorting ...
      • How do stop words influence the search results?

        In search functionalities, 'stop words' play a crucial role in filtering out unnecessary words to enhance the accuracy of search results. Stop words are common words (like 'and', 'the', 'a') that are often ignored in search queries to streamline the ...