Skip to content

Commit b366315

Browse files
committed
[codegen] update to latest spec + function score bug fix
1 parent 8f53cdc commit b366315

File tree

177 files changed

+4300
-731
lines changed

Some content is hidden

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

177 files changed

+4300
-731
lines changed

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

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,27 @@ public final <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(
19981998
return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass);
19991999
}
20002000

2001+
/**
2002+
* Overload of {@link #explain(ExplainRequest, Class)}, where Class is defined
2003+
* as Void, meaning the documents will not be deserialized.
2004+
*/
2005+
2006+
public CompletableFuture<ExplainResponse<Void>> explain(ExplainRequest request) {
2007+
@SuppressWarnings("unchecked")
2008+
JsonEndpoint<ExplainRequest, ExplainResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<ExplainRequest, ExplainResponse<Void>, ErrorResponse>) ExplainRequest._ENDPOINT;
2009+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2010+
}
2011+
2012+
/**
2013+
* Overload of {@link #explain(Function, Class)}, where Class is defined as
2014+
* Void, meaning the documents will not be deserialized.
2015+
*/
2016+
2017+
public final CompletableFuture<ExplainResponse<Void>> explain(
2018+
Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn) {
2019+
return explain(fn.apply(new ExplainRequest.Builder()).build(), Void.class);
2020+
}
2021+
20012022
/**
20022023
* Explain a document match result. Get information about why a specific
20032024
* document matches, or doesn't match, a query. It computes a score explanation
@@ -2281,6 +2302,26 @@ public final <TDocument> CompletableFuture<GetResponse<TDocument>> get(
22812302
return get(fn.apply(new GetRequest.Builder()).build(), tDocumentClass);
22822303
}
22832304

2305+
/**
2306+
* Overload of {@link #get(GetRequest, Class)}, where Class is defined as Void,
2307+
* meaning the documents will not be deserialized.
2308+
*/
2309+
2310+
public CompletableFuture<GetResponse<Void>> get(GetRequest request) {
2311+
@SuppressWarnings("unchecked")
2312+
JsonEndpoint<GetRequest, GetResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<GetRequest, GetResponse<Void>, ErrorResponse>) GetRequest._ENDPOINT;
2313+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2314+
}
2315+
2316+
/**
2317+
* Overload of {@link #get(Function, Class)}, where Class is defined as Void,
2318+
* meaning the documents will not be deserialized.
2319+
*/
2320+
2321+
public final CompletableFuture<GetResponse<Void>> get(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn) {
2322+
return get(fn.apply(new GetRequest.Builder()).build(), Void.class);
2323+
}
2324+
22842325
/**
22852326
* Get a document by its ID.
22862327
* <p>
@@ -2590,6 +2631,27 @@ public final <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSour
25902631
return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentClass);
25912632
}
25922633

2634+
/**
2635+
* Overload of {@link #getSource(GetSourceRequest, Class)}, where Class is
2636+
* defined as Void, meaning the documents will not be deserialized.
2637+
*/
2638+
2639+
public CompletableFuture<GetSourceResponse<Void>> getSource(GetSourceRequest request) {
2640+
@SuppressWarnings("unchecked")
2641+
JsonEndpoint<GetSourceRequest, GetSourceResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<GetSourceRequest, GetSourceResponse<Void>, ErrorResponse>) GetSourceRequest._ENDPOINT;
2642+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
2643+
}
2644+
2645+
/**
2646+
* Overload of {@link #getSource(Function, Class)}, where Class is defined as
2647+
* Void, meaning the documents will not be deserialized.
2648+
*/
2649+
2650+
public final CompletableFuture<GetSourceResponse<Void>> getSource(
2651+
Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn) {
2652+
return getSource(fn.apply(new GetSourceRequest.Builder()).build(), Void.class);
2653+
}
2654+
25932655
/**
25942656
* Get a document's source.
25952657
* <p>
@@ -3297,6 +3359,27 @@ public final <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSear
32973359
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), tDocumentClass);
32983360
}
32993361

3362+
/**
3363+
* Overload of {@link #knnSearch(KnnSearchRequest, Class)}, where Class is
3364+
* defined as Void, meaning the documents will not be deserialized.
3365+
*/
3366+
3367+
public CompletableFuture<KnnSearchResponse<Void>> knnSearch(KnnSearchRequest request) {
3368+
@SuppressWarnings("unchecked")
3369+
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3370+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3371+
}
3372+
3373+
/**
3374+
* Overload of {@link #knnSearch(Function, Class)}, where Class is defined as
3375+
* Void, meaning the documents will not be deserialized.
3376+
*/
3377+
3378+
public final CompletableFuture<KnnSearchResponse<Void>> knnSearch(
3379+
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn) {
3380+
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), Void.class);
3381+
}
3382+
33003383
/**
33013384
* Run a knn search.
33023385
* <p>
@@ -3468,6 +3551,27 @@ public final <TDocument> CompletableFuture<MgetResponse<TDocument>> mget(
34683551
return mget(fn.apply(new MgetRequest.Builder()).build(), tDocumentClass);
34693552
}
34703553

3554+
/**
3555+
* Overload of {@link #mget(MgetRequest, Class)}, where Class is defined as
3556+
* Void, meaning the documents will not be deserialized.
3557+
*/
3558+
3559+
public CompletableFuture<MgetResponse<Void>> mget(MgetRequest request) {
3560+
@SuppressWarnings("unchecked")
3561+
JsonEndpoint<MgetRequest, MgetResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<MgetRequest, MgetResponse<Void>, ErrorResponse>) MgetRequest._ENDPOINT;
3562+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3563+
}
3564+
3565+
/**
3566+
* Overload of {@link #mget(Function, Class)}, where Class is defined as Void,
3567+
* meaning the documents will not be deserialized.
3568+
*/
3569+
3570+
public final CompletableFuture<MgetResponse<Void>> mget(
3571+
Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn) {
3572+
return mget(fn.apply(new MgetRequest.Builder()).build(), Void.class);
3573+
}
3574+
34713575
/**
34723576
* Get multiple documents.
34733577
* <p>
@@ -3623,6 +3727,27 @@ public final <TDocument> CompletableFuture<MsearchResponse<TDocument>> msearch(
36233727
return msearch(fn.apply(new MsearchRequest.Builder()).build(), tDocumentClass);
36243728
}
36253729

3730+
/**
3731+
* Overload of {@link #msearch(MsearchRequest, Class)}, where Class is defined
3732+
* as Void, meaning the documents will not be deserialized.
3733+
*/
3734+
3735+
public CompletableFuture<MsearchResponse<Void>> msearch(MsearchRequest request) {
3736+
@SuppressWarnings("unchecked")
3737+
JsonEndpoint<MsearchRequest, MsearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<MsearchRequest, MsearchResponse<Void>, ErrorResponse>) MsearchRequest._ENDPOINT;
3738+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3739+
}
3740+
3741+
/**
3742+
* Overload of {@link #msearch(Function, Class)}, where Class is defined as
3743+
* Void, meaning the documents will not be deserialized.
3744+
*/
3745+
3746+
public final CompletableFuture<MsearchResponse<Void>> msearch(
3747+
Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn) {
3748+
return msearch(fn.apply(new MsearchRequest.Builder()).build(), Void.class);
3749+
}
3750+
36263751
/**
36273752
* Run multiple searches.
36283753
* <p>
@@ -3767,6 +3892,27 @@ public final <TDocument> CompletableFuture<MsearchTemplateResponse<TDocument>> m
37673892
return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), tDocumentClass);
37683893
}
37693894

3895+
/**
3896+
* Overload of {@link #msearchTemplate(MsearchTemplateRequest, Class)}, where
3897+
* Class is defined as Void, meaning the documents will not be deserialized.
3898+
*/
3899+
3900+
public CompletableFuture<MsearchTemplateResponse<Void>> msearchTemplate(MsearchTemplateRequest request) {
3901+
@SuppressWarnings("unchecked")
3902+
JsonEndpoint<MsearchTemplateRequest, MsearchTemplateResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<MsearchTemplateRequest, MsearchTemplateResponse<Void>, ErrorResponse>) MsearchTemplateRequest._ENDPOINT;
3903+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3904+
}
3905+
3906+
/**
3907+
* Overload of {@link #msearchTemplate(Function, Class)}, where Class is defined
3908+
* as Void, meaning the documents will not be deserialized.
3909+
*/
3910+
3911+
public final CompletableFuture<MsearchTemplateResponse<Void>> msearchTemplate(
3912+
Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn) {
3913+
return msearchTemplate(fn.apply(new MsearchTemplateRequest.Builder()).build(), Void.class);
3914+
}
3915+
37703916
/**
37713917
* Run multiple templated searches.
37723918
* <p>
@@ -4860,6 +5006,29 @@ public final <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>
48605006
return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), tResultClass);
48615007
}
48625008

5009+
/**
5010+
* Overload of
5011+
* {@link #scriptsPainlessExecute(ScriptsPainlessExecuteRequest, Class)}, where
5012+
* Class is defined as Void, meaning the documents will not be deserialized.
5013+
*/
5014+
5015+
public CompletableFuture<ScriptsPainlessExecuteResponse<Void>> scriptsPainlessExecute(
5016+
ScriptsPainlessExecuteRequest request) {
5017+
@SuppressWarnings("unchecked")
5018+
JsonEndpoint<ScriptsPainlessExecuteRequest, ScriptsPainlessExecuteResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<ScriptsPainlessExecuteRequest, ScriptsPainlessExecuteResponse<Void>, ErrorResponse>) ScriptsPainlessExecuteRequest._ENDPOINT;
5019+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
5020+
}
5021+
5022+
/**
5023+
* Overload of {@link #scriptsPainlessExecute(Function, Class)}, where Class is
5024+
* defined as Void, meaning the documents will not be deserialized.
5025+
*/
5026+
5027+
public final CompletableFuture<ScriptsPainlessExecuteResponse<Void>> scriptsPainlessExecute(
5028+
Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn) {
5029+
return scriptsPainlessExecute(fn.apply(new ScriptsPainlessExecuteRequest.Builder()).build(), Void.class);
5030+
}
5031+
48635032
/**
48645033
* Run a script. Runs a script and returns a result.
48655034
*
@@ -4976,6 +5145,27 @@ public final <TDocument> CompletableFuture<ScrollResponse<TDocument>> scroll(
49765145
return scroll(fn.apply(new ScrollRequest.Builder()).build(), tDocumentClass);
49775146
}
49785147

5148+
/**
5149+
* Overload of {@link #scroll(ScrollRequest, Class)}, where Class is defined as
5150+
* Void, meaning the documents will not be deserialized.
5151+
*/
5152+
5153+
public CompletableFuture<ScrollResponse<Void>> scroll(ScrollRequest request) {
5154+
@SuppressWarnings("unchecked")
5155+
JsonEndpoint<ScrollRequest, ScrollResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<ScrollRequest, ScrollResponse<Void>, ErrorResponse>) ScrollRequest._ENDPOINT;
5156+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
5157+
}
5158+
5159+
/**
5160+
* Overload of {@link #scroll(Function, Class)}, where Class is defined as Void,
5161+
* meaning the documents will not be deserialized.
5162+
*/
5163+
5164+
public final CompletableFuture<ScrollResponse<Void>> scroll(
5165+
Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn) {
5166+
return scroll(fn.apply(new ScrollRequest.Builder()).build(), Void.class);
5167+
}
5168+
49795169
/**
49805170
* Run a scrolling search.
49815171
* <p>
@@ -5143,6 +5333,27 @@ public final <TDocument> CompletableFuture<SearchResponse<TDocument>> search(
51435333
return search(fn.apply(new SearchRequest.Builder()).build(), tDocumentClass);
51445334
}
51455335

5336+
/**
5337+
* Overload of {@link #search(SearchRequest, Class)}, where Class is defined as
5338+
* Void, meaning the documents will not be deserialized.
5339+
*/
5340+
5341+
public CompletableFuture<SearchResponse<Void>> search(SearchRequest request) {
5342+
@SuppressWarnings("unchecked")
5343+
JsonEndpoint<SearchRequest, SearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<SearchRequest, SearchResponse<Void>, ErrorResponse>) SearchRequest._ENDPOINT;
5344+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
5345+
}
5346+
5347+
/**
5348+
* Overload of {@link #search(Function, Class)}, where Class is defined as Void,
5349+
* meaning the documents will not be deserialized.
5350+
*/
5351+
5352+
public final CompletableFuture<SearchResponse<Void>> search(
5353+
Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn) {
5354+
return search(fn.apply(new SearchRequest.Builder()).build(), Void.class);
5355+
}
5356+
51465357
/**
51475358
* Run a search.
51485359
* <p>
@@ -6086,6 +6297,27 @@ public final <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> se
60866297
return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass);
60876298
}
60886299

6300+
/**
6301+
* Overload of {@link #searchTemplate(SearchTemplateRequest, Class)}, where
6302+
* Class is defined as Void, meaning the documents will not be deserialized.
6303+
*/
6304+
6305+
public CompletableFuture<SearchTemplateResponse<Void>> searchTemplate(SearchTemplateRequest request) {
6306+
@SuppressWarnings("unchecked")
6307+
JsonEndpoint<SearchTemplateRequest, SearchTemplateResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<SearchTemplateRequest, SearchTemplateResponse<Void>, ErrorResponse>) SearchTemplateRequest._ENDPOINT;
6308+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
6309+
}
6310+
6311+
/**
6312+
* Overload of {@link #searchTemplate(Function, Class)}, where Class is defined
6313+
* as Void, meaning the documents will not be deserialized.
6314+
*/
6315+
6316+
public final CompletableFuture<SearchTemplateResponse<Void>> searchTemplate(
6317+
Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn) {
6318+
return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), Void.class);
6319+
}
6320+
60896321
/**
60906322
* Run a search with a search template.
60916323
*

0 commit comments

Comments
 (0)