Skip to content

Commit

Permalink
[DOCS] Adds intro text to the index file, changes snippet attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
szabosteve committed Sep 23, 2021
1 parent cc5afce commit 40bc28d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
8 changes: 6 additions & 2 deletions docs/connecting.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[[connecting]]
== Connecting

experimental[]

The code snippet below shows how to initialize a low level REST client and the
Jackson object mapper to configure an ElasticsearchClient:

```

["source","java"]
--------------------------------------------------
// Create the low-level client
RestClient restClient = RestClient.builder(new HttpHost("localhost", 9200)).build();
Expand All @@ -13,7 +17,7 @@ Transport transport = new RestClientTransport(restClient, new JacksonJsonpMapper
// And create our API client
ElasticsearchClient client = new ElasticsearchClient(transport);
```
--------------------------------------------------

Authentication is managed by the
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html[low-level Rest Client].
Expand Down
12 changes: 12 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
= Elasticsearch Java High-level client

[partintro]
--

The {es} Java High-level REST Client is an experimental Java client for {es}.
It removes all dependencies to the {es} server code base.

* <<introduction>>
* <<installation>>
* <<connecting>>
--

:branch: master
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]

Expand Down
12 changes: 8 additions & 4 deletions docs/installation.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[installation]]
== Installation

experimental[]

This page guides you through the installation process of the client.

Requirements:
Expand All @@ -25,7 +27,8 @@ https://snapshots.elastic.co/maven/[Elastic's Maven snapshot repository].
[[gradle]]
=== Installation in a Gradle project by using Jackson

```
["source","groovy",subs="attributes"]
--------------------------------------------------
repositories {
mavenCentral()
maven {
Expand All @@ -38,7 +41,7 @@ dependencies {
implementation 'co.elastic.clients:elasticsearch-java:7.15.0-SNAPSHOT'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
}
```
--------------------------------------------------

[discrete]
[[maven]]
Expand All @@ -47,7 +50,8 @@ dependencies {
In the `pom.xml` of your project, add the following repository definition and
dependencies:

```
["source","xml",subs="attributes"]
--------------------------------------------------
<project>
<repositories>
Expand All @@ -74,7 +78,7 @@ dependencies:
</dependencies>
</project>
```
--------------------------------------------------

[discrete]
[[compatibility]]
Expand Down

0 comments on commit 40bc28d

Please sign in to comment.