Alias search using RestHighLevel Client

Hi,

I am using Elastic Search Rest Client 6.2.4.
Can you help me with some example how to check if an alias exists using Rest Client and how to create alias using HighLevelRestClient.
I have searched, but i couldn't found any examples related to this.

Thanks,
Praveen.

Welcome!

I don't think this version of the client has this. You should anyway upgrade your cluster and the client to at least 6.8.

Then look at:

Thanks David.

Can you help me in answering the below question:

What are the advantages of migrating the client to RestHighLevelClient? Will the performance will improve or degrade.

You are not migrating from the Low Level to the High Level Rest Client if this is what you meant. The High Level uses the Low Level client. It adds parsers to write and read Elasticsearch objects instead of letting you doing that manually.

Sorry for not be clear in my question. I am referring to TransportClient.

There might be a difference but if there's really a big problem you can always start a local coordinating node which joins the cluster and use the rest client on localhost. Http test data will just be sent locally. The node will send the data to the cluster using the binary transport protocol.

Last thing: there's no other choice if you want to be ready for elasticsearch 8.x.

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