opensearch-project / documentation-website

The documentation for OpenSearch, OpenSearch Dashboards, and their associated plugins.
https://opensearch.org/docs
Apache License 2.0
67 stars 466 forks source link

[DOC] update the documentation to reflect the deprecated RestTransportClient #5772

Open Simon-Berhane-Paidy opened 9 months ago

Simon-Berhane-Paidy commented 9 months ago

What do you want to do? Hi there,

I learned from this page that the high level rest client is deprecated. https://opensearch.org/docs/latest/clients/java-rest-high-level/

Then, I navigated to the java client documentation and was reviewing the options. https://opensearch.org/docs/latest/clients/java/

One of the options says to use the Rest Client, without any deprecation notice. https://opensearch.org/docs/latest/clients/java/#installing-the-client-using-restclient-transport

So it made me think it's a different package that won't be deprecated. But looking at the source, I noticed this deprecation annotation. https://github.com/opensearch-project/opensearch-java/blob/261cab4cf79e176b0892cfb44fad7c8cfaf44204/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java#L75

Am I correct then in assuming this will also be deprecated? If so, I think mentioning this in the java client page would be very helpful.

Thanks!

Tell us about your request. Provide a summary of the request and all versions that are affected.

What other resources are available? Provide links to related issues, POCs, steps for testing, etc.

hdhalter commented 9 months ago

@VachaShah - Hi Vacha, can you please take a look at this and provide some guidance? Thanks!

hdhalter commented 9 months ago

Hi @wbeckler - Can someone on your team respond to this in Vacha's absence? Thanks!

Xtansia commented 9 months ago

In the current 2.x line of the Java client, the RestClientTransport is not yet deprecated. It will however be deprecated in a future 3.0.0 release, with eventual complete removal at a later date. As such it would be incorrect to declare it as deprecated in the documentation currently, but we could definitely make it clear the ApacheHttpClient5TransportBuilder is the preferred option and potentially telegraph RestClientTransport being slated for deprecation.

hdhalter commented 9 months ago

Thanks or the clarification, @Xtansia ! Can you please add the appropriate text to the file and create a PR? We'll then review it and get it published. Thanks.

wbeckler commented 9 months ago

I feel like that extended deprecation plan might be overly conservative. Where is it stated?

Xtansia commented 9 months ago

@wbeckler The main issue about the RestClientTransport deprecation specifically is this one: https://github.com/opensearch-project/opensearch-java/issues/326