I face some issues with the Elastic Search extension. What should I check?

I face some issues with the Elastic Search extension. What should I check?

If the extension doesn't work as expected (e.g. search results are not relevant or do not display at all), we'd recommend checking the module configurations following the instructions below. 

1. A compatible version of the Elasticsearch Engine should be used for the correct work of the extension. To check the version of the engine installed, use the following command in the CLI, where <host> and <port> should be replaced respectively with your hostname and port that were used for Elastic Search Engine installation:

curl -XGET <host>:<port> 

2. Make sure the connection with Elastic Search is established. To do this, proceed to Stores → Configuration → Amasty Extensions → Elastic Search → Connection tab, make sure that Amasty Elasticsearch is used as Search Engine and click on the Test Connection button.

If Amasty Elasticsearch option cannot be selected, it is necessary to remove the section with the default search engine configuration from the app/etc/env.php or the app/etc/config.php configuration files. It is not recommended to do these changes on the Cloud environment, though. So, If you are setting up Elastic Search on a Cloud infrastructure, please refer to official Magento documentation.

In case of some problems arise with the installation of the Elasticsearch Engine, you could consider our Elasticsearch Engine Installation Service.

3. We always recommend keeping our extensions up-to-date in order to enjoy the stable work and improved performance. Thus, make sure that the latest version of the Elastic Search module is installed on your instance if it meets the minimal support requirements. You can check this article if you require some help with the updating process. 

4. Indexation plays a crucial role in the search process. If it fails, the extension may produce unexpected results. To make sure the search index is operating correctly, execute the following command in the CLI from the Magento root folder:

php bin/magento indexer:reset catalogsearch_fulltext amasty_xsearch_category_fulltext amasty_elastic_relevance_rule_product amasty_elastic_popup_data && php bin/magento indexer:reindex catalogsearch_fulltext amasty_xsearch_category_fulltext amasty_elastic_relevance_rule_product amasty_elastic_popup_data
Sometimes the reindex process is interrupted by the following exception:

startOffset must be non-negative, and endOffset must be >= startOffset, and offsets mus...

The error is caused by using multi-word synonyms. Starting from version 1.16.0, the extension allows using several words as a synonym. Please make sure that your Elastic Search extension is higher than 1.16.0 and update it if necessary. 

In case updating the extension is not an option right now, check the synonyms list located at 
System → Amasty Elasticsearch → Manage Synonyms and remove multi-word synonyms:

jacket, blue jacket, jackets

Run reindex again, now it should be completed successfully:

6. If the products are not found on the front-end while the execution of the search queries, some errors can be observed in the log files. Please check them in order to better understand the cause of the misbehavior.

If the issues with Elastic Search persist after all the checks and adjustments, please contact our support team.

      • Related Articles

      • How to configure search synonyms in Amasty Elastic Search?

        Besides other features like Search Relevance Rules, Stop Words, etc., the Amasty Elastic Search extension supports Search Synonyms. Default Magento synonyms aren't used in Amasty Elastic Search, the module manages synonyms separately. Step 1. To ...
      • Is it possible to install Elastic Engine on a separate server?

        For the efficient work of the Elastic Search module, installation of the Elastic Engine is required. Elastic Engine is the core component that proves a fast and relevant search process. As a common practice, the engine is installed and configured on ...
      • 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 these steps to confirm your configuration is correctly set. 1. Elasticsearch Engine Configuration Ensure that the Amasty Elasticsearch option is ...
      • What's the difference between Advanced Search and Elastic Search?

        In our catalog, we offer two search extensions for Magento 2 - Advanced Search and Elastic Search. Both of them are aimed at improvement of the search process but the functionality differs. Elastic Search consists of several components, including the ...
      • Can you install the Elastic Engine for me?

        We have a special service for Elastic Engine installation in case you need assistance. Our support team will perform the installation for you and ensures that everything runs as intended. After the purchase of the service, a ticket will be created ...