-
Notifications
You must be signed in to change notification settings - Fork 688
Using REST API compatibility #2978
Copy link
Copy link
Open
Description
I am currently in the process of upgrading from elasticsearch 7.17 to 8.11. Ideally I would like to make use of Rest API compatibility so that I can upgrade the DB without having to change the elastic4s version.
I couldn't find any documentation on how to do this with elastic4s. According to the elastic docs it should just be a case of setting the Accept and Content-Type headers on requests. I had a go at that but was unsuccesful (I might have just done this in completely the wrong place)
val client = RestClient.builder(hosts: _*).setDefaultHeaders(Array(
new BasicHeader("Accept", "application/vnd.elasticsearch+json;compatible-with=7" ),
new BasicHeader("Content-Type", "application/vnd.elasticsearch+json;compatible-with=7")
)).build()
Is anyone able to advise on whether it is possible to use rest api compatibility with elastic4s?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels