Skip to content

Commit fab68a7

Browse files
committed
[codegen] update to latest spec + function score bug fix
1 parent 2450e5d commit fab68a7

File tree

164 files changed

+3525
-309
lines changed

Some content is hidden

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

164 files changed

+3525
-309
lines changed

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

+232
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,27 @@ public final <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(
833833
return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass);
834834
}
835835

836+
/**
837+
* Overload of {@link #explain(ExplainRequest, Class)}, where Class is defined
838+
* as Void, meaning the documents will not be deserialized.
839+
*/
840+
841+
public CompletableFuture<ExplainResponse<Void>> explain(ExplainRequest request) {
842+
@SuppressWarnings("unchecked")
843+
JsonEndpoint<ExplainRequest, ExplainResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<ExplainRequest, ExplainResponse<Void>, ErrorResponse>) ExplainRequest._ENDPOINT;
844+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
845+
}
846+
847+
/**
848+
* Overload of {@link #explain(Function, Class)}, where Class is defined as
849+
* Void, meaning the documents will not be deserialized.
850+
*/
851+
852+
public final CompletableFuture<ExplainResponse<Void>> explain(
853+
Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn) {
854+
return explain(fn.apply(new ExplainRequest.Builder()).build(), Void.class);
855+
}
856+
836857
/**
837858
* Explain a document match result. Returns information about why a specific
838859
* document matches, or doesn’t match, a query.
@@ -974,6 +995,26 @@ public final <TDocument> CompletableFuture<GetResponse<TDocument>> get(
974995
return get(fn.apply(new GetRequest.Builder()).build(), tDocumentClass);
975996
}
976997

998+
/**
999+
* Overload of {@link #get(GetRequest, Class)}, where Class is defined as Void,
1000+
* meaning the documents will not be deserialized.
1001+
*/
1002+
1003+
public CompletableFuture<GetResponse<Void>> get(GetRequest request) {
1004+
@SuppressWarnings("unchecked")
1005+
JsonEndpoint<GetRequest, GetResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<GetRequest, GetResponse<Void>, ErrorResponse>) GetRequest._ENDPOINT;
1006+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1007+
}
1008+
1009+
/**
1010+
* Overload of {@link #get(Function, Class)}, where Class is defined as Void,
1011+
* meaning the documents will not be deserialized.
1012+
*/
1013+
1014+
public final CompletableFuture<GetResponse<Void>> get(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn) {
1015+
return get(fn.apply(new GetRequest.Builder()).build(), Void.class);
1016+
}
1017+
9771018
/**
9781019
* Get a document by its ID. Retrieves the document with the specified ID from
9791020
* an index.
@@ -1113,6 +1154,27 @@ public final <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSour
11131154
return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentClass);
11141155
}
11151156

1157+
/**
1158+
* Overload of {@link #getSource(GetSourceRequest, Class)}, where Class is
1159+
* defined as Void, meaning the documents will not be deserialized.
1160+
*/
1161+
1162+
public CompletableFuture<GetSourceResponse<Void>> getSource(GetSourceRequest request) {
1163+
@SuppressWarnings("unchecked")
1164+
JsonEndpoint<GetSourceRequest, GetSourceResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<GetSourceRequest, GetSourceResponse<Void>, ErrorResponse>) GetSourceRequest._ENDPOINT;
1165+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1166+
}
1167+
1168+
/**
1169+
* Overload of {@link #getSource(Function, Class)}, where Class is defined as
1170+
* Void, meaning the documents will not be deserialized.
1171+
*/
1172+
1173+
public final CompletableFuture<GetSourceResponse<Void>> getSource(
1174+
Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn) {
1175+
return getSource(fn.apply(new GetSourceRequest.Builder()).build(), Void.class);
1176+
}
1177+
11161178
/**
11171179
* Get a document's source. Returns the source of a document.
11181180
*
@@ -1392,6 +1454,27 @@ public final <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSear
13921454
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), tDocumentClass);
13931455
}
13941456

1457+
/**
1458+
* Overload of {@link #knnSearch(KnnSearchRequest, Class)}, where Class is
1459+
* defined as Void, meaning the documents will not be deserialized.
1460+
*/
1461+
1462+
public CompletableFuture<KnnSearchResponse<Void>> knnSearch(KnnSearchRequest request) {
1463+
@SuppressWarnings("unchecked")
1464+
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
1465+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1466+
}
1467+
1468+
/**
1469+
* Overload of {@link #knnSearch(Function, Class)}, where Class is defined as
1470+
* Void, meaning the documents will not be deserialized.
1471+
*/
1472+
1473+
public final CompletableFuture<KnnSearchResponse<Void>> knnSearch(
1474+
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn) {
1475+
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), Void.class);
1476+
}
1477+
13951478
/**
13961479
* Run a knn search.
13971480
* <p>
@@ -1503,6 +1586,27 @@ public final <TDocument> CompletableFuture<MgetResponse<TDocument>> mget(
15031586
return mget(fn.apply(new MgetRequest.Builder()).build(), tDocumentClass);
15041587
}
15051588

1589+
/**
1590+
* Overload of {@link #mget(MgetRequest, Class)}, where Class is defined as
1591+
* Void, meaning the documents will not be deserialized.
1592+
*/
1593+
1594+
public CompletableFuture<MgetResponse<Void>> mget(MgetRequest request) {
1595+
@SuppressWarnings("unchecked")
1596+
JsonEndpoint<MgetRequest, MgetResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<MgetRequest, MgetResponse<Void>, ErrorResponse>) MgetRequest._ENDPOINT;
1597+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1598+
}
1599+
1600+
/**
1601+
* Overload of {@link #mget(Function, Class)}, where Class is defined as Void,
1602+
* meaning the documents will not be deserialized.
1603+
*/
1604+
1605+
public final CompletableFuture<MgetResponse<Void>> mget(
1606+
Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn) {
1607+
return mget(fn.apply(new MgetRequest.Builder()).build(), Void.class);
1608+
}
1609+
15061610
/**
15071611
* Get multiple documents.
15081612
* <p>
@@ -1622,6 +1726,27 @@ public final <TDocument> CompletableFuture<MsearchResponse<TDocument>> msearch(
16221726
return msearch(fn.apply(new MsearchRequest.Builder()).build(), tDocumentClass);
16231727
}
16241728

1729+
/**
1730+
* Overload of {@link #msearch(MsearchRequest, Class)}, where Class is defined
1731+
* as Void, meaning the documents will not be deserialized.
1732+
*/
1733+
1734+
public CompletableFuture<MsearchResponse<Void>> msearch(MsearchRequest request) {
1735+
@SuppressWarnings("unchecked")
1736+
JsonEndpoint<MsearchRequest, MsearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<MsearchRequest, MsearchResponse<Void>, ErrorResponse>) MsearchRequest._ENDPOINT;
1737+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1738+
}
1739+
1740+
/**
1741+
* Overload of {@link #msearch(Function, Class)}, where Class is defined as
1742+
* Void, meaning the documents will not be deserialized.
1743+
*/
1744+
1745+
public final CompletableFuture<MsearchResponse<Void>> msearch(
1746+
Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn) {
1747+
return msearch(fn.apply(new MsearchRequest.Builder()).build(), Void.class);
1748+
}
1749+
16251750
/**
16261751
* Run multiple searches.
16271752
* <p>
@@ -1734,6 +1859,27 @@ public final <TDocument> CompletableFuture<MsearchTemplateResponse<TDocument>> m
17341859
return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), tDocumentClass);
17351860
}
17361861

1862+
/**
1863+
* Overload of {@link #msearchTemplate(MsearchTemplateRequest, Class)}, where
1864+
* Class is defined as Void, meaning the documents will not be deserialized.
1865+
*/
1866+
1867+
public CompletableFuture<MsearchTemplateResponse<Void>> msearchTemplate(MsearchTemplateRequest request) {
1868+
@SuppressWarnings("unchecked")
1869+
JsonEndpoint<MsearchTemplateRequest, MsearchTemplateResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<MsearchTemplateRequest, MsearchTemplateResponse<Void>, ErrorResponse>) MsearchTemplateRequest._ENDPOINT;
1870+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1871+
}
1872+
1873+
/**
1874+
* Overload of {@link #msearchTemplate(Function, Class)}, where Class is defined
1875+
* as Void, meaning the documents will not be deserialized.
1876+
*/
1877+
1878+
public final CompletableFuture<MsearchTemplateResponse<Void>> msearchTemplate(
1879+
Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn) {
1880+
return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), Void.class);
1881+
}
1882+
17371883
/**
17381884
* Run multiple templated searches.
17391885
*
@@ -2145,6 +2291,29 @@ public final <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>
21452291
return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), tResultClass);
21462292
}
21472293

2294+
/**
2295+
* Overload of
2296+
* {@link #scriptsPainlessExecute(ScriptsPainlessExecuteRequest, Class)}, where
2297+
* Class is defined as Void, meaning the documents will not be deserialized.
2298+
*/
2299+
2300+
public CompletableFuture<ScriptsPainlessExecuteResponse<Void>> scriptsPainlessExecute(
2301+
ScriptsPainlessExecuteRequest request) {
2302+
@SuppressWarnings("unchecked")
2303+
JsonEndpoint<ScriptsPainlessExecuteRequest, ScriptsPainlessExecuteResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<ScriptsPainlessExecuteRequest, ScriptsPainlessExecuteResponse<Void>, ErrorResponse>) ScriptsPainlessExecuteRequest._ENDPOINT;
2304+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2305+
}
2306+
2307+
/**
2308+
* Overload of {@link #scriptsPainlessExecute(Function, Class)}, where Class is
2309+
* defined as Void, meaning the documents will not be deserialized.
2310+
*/
2311+
2312+
public final CompletableFuture<ScriptsPainlessExecuteResponse<Void>> scriptsPainlessExecute(
2313+
Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn) {
2314+
return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), Void.class);
2315+
}
2316+
21482317
/**
21492318
* Run a script. Runs a script and returns a result.
21502319
*
@@ -2261,6 +2430,27 @@ public final <TDocument> CompletableFuture<ScrollResponse<TDocument>> scroll(
22612430
return scroll(fn.apply(new ScrollRequest.Builder()).build(), tDocumentClass);
22622431
}
22632432

2433+
/**
2434+
* Overload of {@link #scroll(ScrollRequest, Class)}, where Class is defined as
2435+
* Void, meaning the documents will not be deserialized.
2436+
*/
2437+
2438+
public CompletableFuture<ScrollResponse<Void>> scroll(ScrollRequest request) {
2439+
@SuppressWarnings("unchecked")
2440+
JsonEndpoint<ScrollRequest, ScrollResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<ScrollRequest, ScrollResponse<Void>, ErrorResponse>) ScrollRequest._ENDPOINT;
2441+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2442+
}
2443+
2444+
/**
2445+
* Overload of {@link #scroll(Function, Class)}, where Class is defined as Void,
2446+
* meaning the documents will not be deserialized.
2447+
*/
2448+
2449+
public final CompletableFuture<ScrollResponse<Void>> scroll(
2450+
Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn) {
2451+
return scroll(fn.apply(new ScrollRequest.Builder()).build(), Void.class);
2452+
}
2453+
22642454
/**
22652455
* Run a scrolling search.
22662456
* <p>
@@ -2382,6 +2572,27 @@ public final <TDocument> CompletableFuture<SearchResponse<TDocument>> search(
23822572
return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass);
23832573
}
23842574

2575+
/**
2576+
* Overload of {@link #search(SearchRequest, Class)}, where Class is defined as
2577+
* Void, meaning the documents will not be deserialized.
2578+
*/
2579+
2580+
public CompletableFuture<SearchResponse<Void>> search(SearchRequest request) {
2581+
@SuppressWarnings("unchecked")
2582+
JsonEndpoint<SearchRequest, SearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<SearchRequest, SearchResponse<Void>, ErrorResponse>) SearchRequest._ENDPOINT;
2583+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2584+
}
2585+
2586+
/**
2587+
* Overload of {@link #search(Function, Class)}, where Class is defined as Void,
2588+
* meaning the documents will not be deserialized.
2589+
*/
2590+
2591+
public final CompletableFuture<SearchResponse<Void>> search(
2592+
Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn) {
2593+
return search(fn.apply(new SearchRequest.Builder()).build(), Void.class);
2594+
}
2595+
23852596
/**
23862597
* Run a search.
23872598
* <p>
@@ -2559,6 +2770,27 @@ public final <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> se
25592770
return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass);
25602771
}
25612772

2773+
/**
2774+
* Overload of {@link #searchTemplate(SearchTemplateRequest, Class)}, where
2775+
* Class is defined as Void, meaning the documents will not be deserialized.
2776+
*/
2777+
2778+
public CompletableFuture<SearchTemplateResponse<Void>> searchTemplate(SearchTemplateRequest request) {
2779+
@SuppressWarnings("unchecked")
2780+
JsonEndpoint<SearchTemplateRequest, SearchTemplateResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<SearchTemplateRequest, SearchTemplateResponse<Void>, ErrorResponse>) SearchTemplateRequest._ENDPOINT;
2781+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2782+
}
2783+
2784+
/**
2785+
* Overload of {@link #searchTemplate(Function, Class)}, where Class is defined
2786+
* as Void, meaning the documents will not be deserialized.
2787+
*/
2788+
2789+
public final CompletableFuture<SearchTemplateResponse<Void>> searchTemplate(
2790+
Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn) {
2791+
return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), Void.class);
2792+
}
2793+
25622794
/**
25632795
* Run a search with a search template.
25642796
*

0 commit comments

Comments
 (0)