Skip to content

Elasticsearch 7 missing from Magento 2.4.8 #39862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks
devchris79 opened this issue Apr 25, 2025 · 7 comments
Open
5 tasks

Elasticsearch 7 missing from Magento 2.4.8 #39862

devchris79 opened this issue Apr 25, 2025 · 7 comments
Assignees
Labels
Issue: ready for confirmation Reported on 2.4.8 Indicates original Magento version for the Issue report.

Comments

@devchris79
Copy link

devchris79 commented Apr 25, 2025

Preconditions and environment

  • Magento version 2.4.8

Steps to reproduce

Install new instance of Magento 2.4.8

Expected result

Elasticsearch 7 to be a present module in install, but depricated as per the Magento 2.4.8 release notes

Actual result

Elasticsearch 7 appears to have been removed from the 2.4.8 codebase.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Apr 25, 2025

Hi @devchris79. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

Copy link

m2-assistant bot commented Apr 25, 2025

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@hostep
Copy link
Contributor

hostep commented Apr 25, 2025

I played around a bit with Magento 2.4.8 while still using ElasticSearch 7 server. And found no problems at first sight. So I think that the ES8 module they ship with is still compatible with ES7.

Or do you run into particular problems while using ES7 yourself with Magento 2.4.8?

@devchris79
Copy link
Author

Thanks for having a look @hostep

I was trying to configure via cli as its a new install, usually this command would work:

Image

When I looked at the magento modules I can see the version 7 directory has been removed and only the version 8 remains.
I have tried configuring the version 8 module to connect to the Elasticsearch instance, but at the moment its not working. The Elasticsearch instance is provided by the server host, so I am currently asking them for details on the exact version.

@engcom-November engcom-November added the Reported on 2.4.8 Indicates original Magento version for the Issue report. label Apr 25, 2025
@devchris79
Copy link
Author

Ok, I think its now connecting, but somewhat unintuitive...
It looks like you need to set the search engine to elasticsearch7, but the settings as elasticsearch8, like:

magento config:set catalog/search/engine 'elasticsearch7'
magento config:set catalog/search/elasticsearch8_server_hostname 'localhost'
magento config:set catalog/search/elasticsearch8_server_port '9200'
magento config:set catalog/search/elasticsearch8_index_prefix 'magento2'
magento config:set catalog/search/elasticsearch8_enable_auth '0'
magento config:set catalog/search/elasticsearch8_server_timeout '15'

@devchris79
Copy link
Author

@hostep I think I may have been mistaken with the commands above, when I ran the upgrade command with
magento config:set catalog/search/engine 'elasticsearch8'
Magento would respond with

Could not validate a connection to Elasticsearch. The client noticed that the server is not Elasticsearch and we do not support this unknown product

When I changed this to magento config:set catalog/search/engine 'elasticsearch7' the upgrade command didn't return an error, I assumed this was because it communicated OK, but its turns out that any invalid instance string makes the validation string disappear...

I have used curl to establish our Elasticsearch instance version provided by the host, its 7.10.2 maybe not all version 7 instances are now compatible with the version 8 module??

@hostep
Copy link
Contributor

hostep commented May 5, 2025

Hmm, interesting find that there seems to be no validation on the value of the search engine.

Anyway. For me setting it to elasticsearch8 works fine while my ES server is running at version 7.17.22

But maybe you can try to configure the search engine in the backoffice, since a bunch of other config fields will appear when you select 'Elasticsearch8 (Deprecated)' over there and you then also get a button to test your connection.

Update: even when I use 'Opensearch' as search engine with my ES7 server, everything seems to work fine at first sight.
I guess that ES7/ES8/OS all are pretty compatible with each other, at least for the features Magento is using...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation Reported on 2.4.8 Indicates original Magento version for the Issue report.
Projects
Status: Ready for Confirmation
Development

No branches or pull requests

3 participants