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.
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.