The error indicates that the search engine settings might be hardcoded or incorrectly specified. To resolve the issue, follow these steps:
For a cloud environment, check the file: .magento.env.yaml. In this file, you need to verify and, if necessary, change the engine to amasty_elastic if you want to use Amasty Elastic or to amasty_elastic_opensearch if you want to use Amasty Opensearch.
Check the app/etc/env.php file for any hardcoded search engine settings:
example of hardcoded search engine settingsIf there is a hardcoded setting, it should be removed or updated to the desired engine.
After making these changes, follow these steps:
- In the Amasty_ElasticSearch module configurations, specify the required Search Engine.

- Navigate to Store -> Configuration -> Catalog -> Catalog -> Catalog Search and ensure that the same Search Engine is used.
- Execute the following commands:
php bin/magento app:config:import
php bin/magento se:up
php bin/magento indexer:reset
php bin/magento indexer:reindex