How to connect Elastic version 8.0 on EC2 to Spring?

Hello everyone, i'm student from Viet Nam, my english is not good, hope you understand for me. I have researched on google, Spring only supports for Elasticsearch version 7.1.x. So how can i do to configure connect Elasticsearch version 8.0. Can I use "Elasticsearch-rest-high-level-client" version 8.0.0-apha2, can't it? If true, please give me some examples to configure it!
Thank you very much!

You need to use the client 7.17 and I think that you might not be able yet to upgrade to elastic 8.

If you are just using spring and not spring data, then you can do what you want.

1 Like

Well, thank you for your advice. But my teacher said that must use 8.0. Hicc

Are you using spring or spring data?

1 Like

Oh sorry, i wanna use spring data.

Then you must use the compatibility mode in 8.0, so it can still use the old high-level client that's currently used in Spring Data: Migrating from the High Level Rest Client | Elasticsearch Java API Client [8.1] | Elastic

Also use at least Elasticsearch 8.1.2 (the current version), otherwise you'll run into bulk index response from 8.0.0 not compatible although headers are set · Issue #84173 · elastic/elasticsearch · GitHub

And for the "full" 8.0 support you'll need to wait for next major Spring Data version: https://twitter.com/sothawo/status/1509038086541352965

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.