Skip to content

Commit 4ca67fc

Browse files
committed
Update Java client docs (there's no serverless version)
1 parent 30dcbd3 commit 4ca67fc

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

serverless/pages/clients-java-getting-started.asciidoc

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
// :description: Set up and use the Java client for {es3}.
55
// :keywords: serverless, elasticsearch, java, how to
66

7+
This page guides you through the installation process of the Java
8+
client, shows you how to initialize the client, and how to perform basic
9+
{es} operations with it.
10+
11+
See the https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html[Java client] documentation for more detailed usage instructions.
12+
713
[NOTE]
814
====
9-
This client is for use with {es-serverless} only. See also the https://www.elastic.co/guide/en/elasticsearch/client/index.html[{es} clients].
15+
The same client is used for {es3}, on-premise and managed Elasticsearch. Some API endpoints are however not available in {es3}.
1016
====
1117

12-
This page guides you through the installation process of the Java
13-
client for {es3}, shows you how to initialize the client, and how to perform basic
14-
{es} operations with it.
15-
1618
[discrete]
1719
[[elasticsearch-java-client-getting-started-requirements]]
1820
== Requirements
@@ -29,6 +31,8 @@ show usage with Jackson.
2931
You can add the Java client to your Java project using
3032
either Gradle or Maven.
3133

34+
Use the version with the highest version number found on https://search.maven.org/artifact/co.elastic.clients/elasticsearch-java[Maven Central], like `8.16.1`. We refer to it as `elasticVersion` in the configuration examples below.
35+
3236
[discrete]
3337
[[elasticsearch-java-client-getting-started-using-gradle]]
3438
=== Using Gradle
@@ -38,8 +42,8 @@ You can install the Java client as a Gradle dependency:
3842
[source,groovy]
3943
----
4044
dependencies {
41-
implementation 'co.elastic.clients:elasticsearch-java-serverless:1.0.0-20231031'
42-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
45+
implementation "co.elastic.clients:elasticsearch-java:${elasticVersion}"
46+
implementation "com.fasterxml.jackson.core:jackson-databind:2.17.0"
4347
}
4448
----
4549

@@ -57,8 +61,8 @@ the following to the `pom.xml` of your project:
5761
5862
<dependency>
5963
<groupId>co.elastic.clients</groupId>
60-
<artifactId>elasticsearch-java-serverless</artifactId>
61-
<version>1.0.0-20231031</version>
64+
<artifactId>elasticsearch-java</artifactId>
65+
<version>${elasticVersion}</version>
6266
</dependency>
6367
6468
<dependency>

0 commit comments

Comments
 (0)