3535import co .elastic .clients .util .ApiTypeHelper ;
3636import com .fasterxml .jackson .annotation .JsonCreator ;
3737import com .fasterxml .jackson .annotation .JsonProperty ;
38- import com .fasterxml .jackson .databind .ObjectMapper ;
39- import com .fasterxml .jackson .databind .PropertyNamingStrategies ;
4038import jakarta .json .JsonArray ;
4139import jakarta .json .JsonObject ;
4240import jakarta .json .JsonValue ;
@@ -62,9 +60,9 @@ public void blockingAndAsync() throws Exception {
6260
6361 //tag::blocking-and-async
6462 // Synchronous blocking client
65- ElasticsearchClient client = new ElasticsearchClient (transport );
63+ ElasticsearchClient esClient = new ElasticsearchClient (transport );
6664
67- if (client .exists (b -> b .index ("products" ).id ("foo" )).value ()) {
65+ if (esClient .exists (b -> b .index ("products" ).id ("foo" )).value ()) {
6866 logger .info ("product exists" );
6967 }
7068
@@ -92,8 +90,8 @@ private ElasticsearchClient createClient() {
9290 public void builders () throws Exception {
9391
9492 //tag::builders
95- ElasticsearchClient client = createClient ();
96- CreateIndexResponse createResponse = client .indices ().create (
93+ ElasticsearchClient esClient = createClient ();
94+ CreateIndexResponse createResponse = esClient .indices ().create (
9795 new CreateIndexRequest .Builder ()
9896 .index ("my-index" )
9997 .aliases ("foo" ,
@@ -107,8 +105,8 @@ public void builders() throws Exception {
107105 public void builderLambdas () throws Exception {
108106
109107 //tag::builder-lambdas
110- ElasticsearchClient client = createClient ();
111- CreateIndexResponse createResponse = client .indices ()
108+ ElasticsearchClient esClient = createClient ();
109+ CreateIndexResponse createResponse = esClient .indices ()
112110 .create (createIndexBuilder -> createIndexBuilder
113111 .index ("my-index" )
114112 .aliases ("foo" , aliasBuilder -> aliasBuilder
@@ -121,8 +119,8 @@ public void builderLambdas() throws Exception {
121119 public void builderLambdasShort () throws Exception {
122120
123121 //tag::builder-lambdas-short
124- ElasticsearchClient client = createClient ();
125- CreateIndexResponse createResponse = client .indices ()
122+ ElasticsearchClient esClient = createClient ();
123+ CreateIndexResponse createResponse = esClient .indices ()
126124 .create (c -> c
127125 .index ("my-index" )
128126 .aliases ("foo" , a -> a
@@ -134,8 +132,8 @@ public void builderLambdasShort() throws Exception {
134132
135133 public void builderIntervals () throws Exception {
136134 //tag::builder-intervals
137- ElasticsearchClient client = createClient ();
138- SearchResponse <SomeApplicationData > results = client
135+ ElasticsearchClient esClient = createClient ();
136+ SearchResponse <SomeApplicationData > results = esClient
139137 .search (b0 -> b0
140138 .query (b1 -> b1
141139 .intervals (b2 -> b2
0 commit comments