Skip to content

Commit fc0b35d

Browse files
committed
Add parameter-less method for endpoints that don't have required properties
1 parent 0e47323 commit fc0b35d

File tree

63 files changed

+4003
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4003
-271
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,19 @@ public final CompletableFuture<ClearScrollResponse> clearScroll(
344344
return clearScroll(fn.apply(new ClearScrollRequest.Builder()).build());
345345
}
346346

347+
/**
348+
* Explicitly clears the search context for a scroll.
349+
*
350+
* @see <a href=
351+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html">Documentation
352+
* on elastic.co</a>
353+
*/
354+
355+
public CompletableFuture<ClearScrollResponse> clearScroll() throws IOException {
356+
return this.transport.performRequestAsync(new ClearScrollRequest.Builder().build(),
357+
ClearScrollRequest.ENDPOINT);
358+
}
359+
347360
// ----- Endpoint: close_point_in_time
348361

349362
/**
@@ -407,6 +420,18 @@ public final CompletableFuture<CountResponse> count(Function<CountRequest.Builde
407420
return count(fn.apply(new CountRequest.Builder()).build());
408421
}
409422

423+
/**
424+
* Returns number of documents matching a query.
425+
*
426+
* @see <a href=
427+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html">Documentation
428+
* on elastic.co</a>
429+
*/
430+
431+
public CompletableFuture<CountResponse> count() throws IOException {
432+
return this.transport.performRequestAsync(new CountRequest.Builder().build(), CountRequest.ENDPOINT);
433+
}
434+
410435
// ----- Endpoint: create
411436

412437
/**
@@ -701,6 +726,19 @@ public final CompletableFuture<FieldCapsResponse> fieldCaps(
701726
return fieldCaps(fn.apply(new FieldCapsRequest.Builder()).build());
702727
}
703728

729+
/**
730+
* Returns the information about the capabilities of fields among multiple
731+
* indices.
732+
*
733+
* @see <a href=
734+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html">Documentation
735+
* on elastic.co</a>
736+
*/
737+
738+
public CompletableFuture<FieldCapsResponse> fieldCaps() throws IOException {
739+
return this.transport.performRequestAsync(new FieldCapsRequest.Builder().build(), FieldCapsRequest.ENDPOINT);
740+
}
741+
704742
// ----- Endpoint: get
705743

706744
/**
@@ -1004,6 +1042,19 @@ public final CompletableFuture<MtermvectorsResponse> mtermvectors(
10041042
return mtermvectors(fn.apply(new MtermvectorsRequest.Builder()).build());
10051043
}
10061044

1045+
/**
1046+
* Returns multiple termvectors in one request.
1047+
*
1048+
* @see <a href=
1049+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html">Documentation
1050+
* on elastic.co</a>
1051+
*/
1052+
1053+
public CompletableFuture<MtermvectorsResponse> mtermvectors() throws IOException {
1054+
return this.transport.performRequestAsync(new MtermvectorsRequest.Builder().build(),
1055+
MtermvectorsRequest.ENDPOINT);
1056+
}
1057+
10071058
// ----- Endpoint: open_point_in_time
10081059

10091060
/**
@@ -1148,6 +1199,20 @@ public final CompletableFuture<ReindexResponse> reindex(
11481199
return reindex(fn.apply(new ReindexRequest.Builder()).build());
11491200
}
11501201

1202+
/**
1203+
* Allows to copy documents from one index to another, optionally filtering the
1204+
* source documents by a query, changing the destination index settings, or
1205+
* fetching the documents from a remote cluster.
1206+
*
1207+
* @see <a href=
1208+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html">Documentation
1209+
* on elastic.co</a>
1210+
*/
1211+
1212+
public CompletableFuture<ReindexResponse> reindex() throws IOException {
1213+
return this.transport.performRequestAsync(new ReindexRequest.Builder().build(), ReindexRequest.ENDPOINT);
1214+
}
1215+
11511216
// ----- Endpoint: reindex_rethrottle
11521217

11531218
/**
@@ -1314,6 +1379,20 @@ public final CompletableFuture<SearchShardsResponse> searchShards(
13141379
return searchShards(fn.apply(new SearchShardsRequest.Builder()).build());
13151380
}
13161381

1382+
/**
1383+
* Returns information about the indices and shards that a search request would
1384+
* be executed against.
1385+
*
1386+
* @see <a href=
1387+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html">Documentation
1388+
* on elastic.co</a>
1389+
*/
1390+
1391+
public CompletableFuture<SearchShardsResponse> searchShards() throws IOException {
1392+
return this.transport.performRequestAsync(new SearchShardsRequest.Builder().build(),
1393+
SearchShardsRequest.ENDPOINT);
1394+
}
1395+
13171396
// ----- Endpoint: search_template
13181397

13191398
/**

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,18 @@ public final ClearScrollResponse clearScroll(
343343
return clearScroll(fn.apply(new ClearScrollRequest.Builder()).build());
344344
}
345345

346+
/**
347+
* Explicitly clears the search context for a scroll.
348+
*
349+
* @see <a href=
350+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html">Documentation
351+
* on elastic.co</a>
352+
*/
353+
354+
public ClearScrollResponse clearScroll() throws IOException {
355+
return this.transport.performRequest(new ClearScrollRequest.Builder().build(), ClearScrollRequest.ENDPOINT);
356+
}
357+
346358
// ----- Endpoint: close_point_in_time
347359

348360
/**
@@ -405,6 +417,18 @@ public final CountResponse count(Function<CountRequest.Builder, ObjectBuilder<Co
405417
return count(fn.apply(new CountRequest.Builder()).build());
406418
}
407419

420+
/**
421+
* Returns number of documents matching a query.
422+
*
423+
* @see <a href=
424+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html">Documentation
425+
* on elastic.co</a>
426+
*/
427+
428+
public CountResponse count() throws IOException {
429+
return this.transport.performRequest(new CountRequest.Builder().build(), CountRequest.ENDPOINT);
430+
}
431+
408432
// ----- Endpoint: create
409433

410434
/**
@@ -699,6 +723,19 @@ public final FieldCapsResponse fieldCaps(Function<FieldCapsRequest.Builder, Obje
699723
return fieldCaps(fn.apply(new FieldCapsRequest.Builder()).build());
700724
}
701725

726+
/**
727+
* Returns the information about the capabilities of fields among multiple
728+
* indices.
729+
*
730+
* @see <a href=
731+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html">Documentation
732+
* on elastic.co</a>
733+
*/
734+
735+
public FieldCapsResponse fieldCaps() throws IOException {
736+
return this.transport.performRequest(new FieldCapsRequest.Builder().build(), FieldCapsRequest.ENDPOINT);
737+
}
738+
702739
// ----- Endpoint: get
703740

704741
/**
@@ -997,6 +1034,18 @@ public final MtermvectorsResponse mtermvectors(
9971034
return mtermvectors(fn.apply(new MtermvectorsRequest.Builder()).build());
9981035
}
9991036

1037+
/**
1038+
* Returns multiple termvectors in one request.
1039+
*
1040+
* @see <a href=
1041+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html">Documentation
1042+
* on elastic.co</a>
1043+
*/
1044+
1045+
public MtermvectorsResponse mtermvectors() throws IOException {
1046+
return this.transport.performRequest(new MtermvectorsRequest.Builder().build(), MtermvectorsRequest.ENDPOINT);
1047+
}
1048+
10001049
// ----- Endpoint: open_point_in_time
10011050

10021051
/**
@@ -1140,6 +1189,20 @@ public final ReindexResponse reindex(Function<ReindexRequest.Builder, ObjectBuil
11401189
return reindex(fn.apply(new ReindexRequest.Builder()).build());
11411190
}
11421191

1192+
/**
1193+
* Allows to copy documents from one index to another, optionally filtering the
1194+
* source documents by a query, changing the destination index settings, or
1195+
* fetching the documents from a remote cluster.
1196+
*
1197+
* @see <a href=
1198+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html">Documentation
1199+
* on elastic.co</a>
1200+
*/
1201+
1202+
public ReindexResponse reindex() throws IOException {
1203+
return this.transport.performRequest(new ReindexRequest.Builder().build(), ReindexRequest.ENDPOINT);
1204+
}
1205+
11431206
// ----- Endpoint: reindex_rethrottle
11441207

11451208
/**
@@ -1305,6 +1368,19 @@ public final SearchShardsResponse searchShards(
13051368
return searchShards(fn.apply(new SearchShardsRequest.Builder()).build());
13061369
}
13071370

1371+
/**
1372+
* Returns information about the indices and shards that a search request would
1373+
* be executed against.
1374+
*
1375+
* @see <a href=
1376+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html">Documentation
1377+
* on elastic.co</a>
1378+
*/
1379+
1380+
public SearchShardsResponse searchShards() throws IOException {
1381+
return this.transport.performRequest(new SearchShardsRequest.Builder().build(), SearchShardsRequest.ENDPOINT);
1382+
}
1383+
13081384
// ----- Endpoint: search_template
13091385

13101386
/**

0 commit comments

Comments
 (0)