Fine-Tuning Elastic Search for Best Results

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 Engine Configuration

Ensure that the Amasty Elasticsearch option is selected as the search engine in your Admin Panel. Navigate to Stores > Configuration > Amasty Extensions > Elastic Search, and confirm that Amasty Elasticsearch, Amasty Elasticsearch or Amasty Opensearch option is chosen in the Search Engine field based on the search engine used on your side.



Double-check that the connection to Elasticsearch is successful.

2. Search Attribute Weights

Verify that the weight of search attributes aligns with your expectations. Navigate to Stores > Configuration > Amasty Extensions > Advanced Search > Search Attributes and adjust the weights of search attributes to reflect your desired search prioritization.



For instance, let's say your e-commerce store uses brands, and you've assigned a higher weight to the 'brand' search attribute compared to the 'Product Name.' As a result, when a user performs a search using a brand name as a query, products associated with that brand will be prioritized and displayed before items that only have the brand name mentioned in their product name. 

Notes
Starting with version 2.4.0 of the Elastic Search and version 1.26.0 of the Advanced Search modules, a new feature to use category name as a search attribute was added. You need to install the 'amasty/module-advanced-search-categories’ package from composer suggest to use this functionality (the functionality is available as a part of an active product subscription or support subscription). 


3. Search Page Relevance Rules

Review your Search Page Relevance Rules to avoid undesired product placement. Navigate to System > Amasty Elasticsearch > Search Page Relevance Rules and check your rules to ensure they are configured as intended.

4. Match Modes

Check that the Match Modes are configured correctly in the Stores > Configuration > Amasty Extensions > Elastic Search > Catalog. In general, Match Mode = OR retrieves results containing either of the values from the search query, while Match Mode = AND requires strict matching.

For more information and usage examples, please refer to our helpful article.

5. Custom Sorting

Confirm that no custom sorting is applied to the search results page. Make sure that sorting by relevance is selected for the best search experience. Navigate to your search results page and check that the sorting option is set to Relevance.



If the custom sorting is applied on the search results page on your side, check the custom module setting it. For example, if you are using our Improved Sorting module, the Default Sorting on Search Pages configuration can be checked in the Stores > Configuration > Amasty Extensions > Improved Sorting > Sorting by Default tab.



By following these steps, you can troubleshoot and optimize the work of the Elastic Search module for the desired search results. If you continue to experience issues or have further questions, please don't hesitate to contact our support team for assistance.