Installed Elasticsearch 8.7.1, but composer version was 7.17.2
Not sure if I did a right thing by downgrading to 7.17.2
Or was there a way to change something and use 8.7.1
Indexed without errors using 7.17.2
Hi @webprobox,
Using Elasticsearch with Magento can sometimes be tricky, especially when dealing with compatibility between versions. Magento 2.4.7-beta2 is a more recent version, and ideally, it should support newer Elasticsearch versions like 8.7.1. However, downgrading to a compatible version like 7.17.2 to avoid issues is often a practical solution if you run into problems. Here’s what you should know and how you might proceed if you want to use Elasticsearch 8.7.1:
Elasticsearch Compatibility
Magento 2.4.x versions generally support Elasticsearch 7.x. Support for Elasticsearch 8.x may vary depending on the specific Magento version and the enhancements made in that release.
Downgrading to Elasticsearch 7.17.2
Downgrading to Elasticsearch 7.17.2 is a safe and recommended approach if you encounter compatibility issues. Magento's official documentation often specifies the versions of Elasticsearch that are supported, and using a version outside of this range can lead to unexpected issues.
Upgrading to Elasticsearch 8.7.1
If you want to use Elasticsearch 8.7.1, you can try the following steps, but proceed with caution as there might be some compatibility issues that need to be addressed.
Step 1: Check Magento Compatibility with Elasticsearch 8.x
Step 2: Modify Elasticsearch Configuration
Step 3: Update Magento Configuration
php bin/magento config:set catalog/search/engine elasticsearch8
php bin/magento config:set catalog/search/elasticsearch8_server_hostname localhost
php bin/magento config:set catalog/search/elasticsearch8_server_port 9200
Adjust the hostname and port based on your Elasticsearch setup.
Step 4: Test Elasticsearch Connection
php bin/magento indexer:reindex
If there are no errors, the connection is successful.
Step 5: Monitor and Troubleshoot
Important Considerations
If the issue will be resolved, Click Kudos & Accept as a Solution.
Check out out Magento 2 ElasticSearch.
You made the right decision by downgrading to Elasticsearch 7.17.2. Here's why:
1. Compatibility: Magento 2.4.7-beta2 is designed to work with Elasticsearch 7.x versions. Using 8.7.1 could lead to compatibility issues.
2. Composer requirement: The fact that composer required 7.17.2 indicates that this is the version Magento expects to use.
3. Successful indexing: Your successful indexing with 7.17.2 confirms it's working as intended.
To use Elasticsearch 8.x:
- Wait for official Magento support in future releases
- OR use a third-party module that enables Elasticsearch 8 support (but this may introduce risks)
For now, stick with 7.17.2 for optimal stability and performance with Magento 2.4.7-beta2.
Remember to keep an eye on Magento's official documentation for updates on Elasticsearch compatibility in future releases.