From 19ddf35e40208f422c93f316893b03d9e23f3496 Mon Sep 17 00:00:00 2001 From: Keith Chan <12404772+keithhc2@users.noreply.github.com> Date: Wed, 20 Oct 2021 14:22:42 -0700 Subject: [PATCH] Minor language tweaks --- _clients/java-rest-high-level.md | 37 +++++--------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/_clients/java-rest-high-level.md b/_clients/java-rest-high-level.md index 742dd296..27c1283b 100644 --- a/_clients/java-rest-high-level.md +++ b/_clients/java-rest-high-level.md @@ -122,39 +122,12 @@ public class RESTClientSample { } ``` -# Elasticsearch OSS Java high-level REST client +## Elasticsearch OSS Java high-level REST client -You may also continue to use the Elasticsearch OSS Java high-level REST client. Existing clients which have not yet migrated to using the OpenSearch Java high-level REST client should continue to work. +We recommend using the OpenSearch client to connect to OpenSearch clusters, but if you must use the Elasticsearch OSS Java high-level REST client, version 7.10.2 of the Elasticsearch OSS client also works with the 1.x versions of OpenSearch. -The 7.10.2 Elasticsearch OSS high-level REST client works with the 1.x versions of OpenSearch. +### Migrating to the OpenSearch Java high-level REST client -## Migrating to the OpenSearch Java high-level REST client +Migrating from the Elasticsearch OSS client to the OpenSearch high-level REST client is as simple as changing your Maven dependency to one that references [OpenSearch's dependency](#setup). -Migrating to the OpenSearch high-level REST client from the Elasticsearch OSS client is often a straightforward process of changing Maven groupIds and Java packages. - - -## Maven Dependencies - -Change: - -``` - - org.elasticsearch.client - elasticsearch-rest-high-level-client - 7.10.2 - -``` - -to: - -``` - - org.opensearch.client - opensearch-rest-high-level-client - 1.1.0 - -``` - -## Java code - -Once you have the OpenSearch client setup in your project, you should change existing Java package imports to `org.opensearch` from `org.elasticsearch`. +Afterward, change all references of `org.elasticsearch` to `org.opensearch`, and you're ready to start submitting requests to your OpenSearch cluster.