Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4366,8 +4366,8 @@ public final CompletableFuture<RankEvalResponse> rankEval(
* cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
* project, only remote hosts from <a href=
* "https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body">Elastic
* Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
* stream creation requires a matching index template with data stream enabled.
* Cloud Hosted</a> are allowed. Automatic data stream creation requires a
* matching index template with data stream enabled.
* <p>
* The <code>dest</code> element can be configured like the index API to control
* optimistic concurrency control. Omitting <code>version_type</code> or setting
Expand Down Expand Up @@ -4463,8 +4463,8 @@ public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
* cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
* project, only remote hosts from <a href=
* "https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body">Elastic
* Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
* stream creation requires a matching index template with data stream enabled.
* Cloud Hosted</a> are allowed. Automatic data stream creation requires a
* matching index template with data stream enabled.
* <p>
* The <code>dest</code> element can be configured like the index API to control
* optimistic concurrency control. Omitting <code>version_type</code> or setting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4398,8 +4398,8 @@ public final RankEvalResponse rankEval(Function<RankEvalRequest.Builder, ObjectB
* cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
* project, only remote hosts from <a href=
* "https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body">Elastic
* Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
* stream creation requires a matching index template with data stream enabled.
* Cloud Hosted</a> are allowed. Automatic data stream creation requires a
* matching index template with data stream enabled.
* <p>
* The <code>dest</code> element can be configured like the index API to control
* optimistic concurrency control. Omitting <code>version_type</code> or setting
Expand Down Expand Up @@ -4495,8 +4495,8 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast
* cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
* project, only remote hosts from <a href=
* "https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body">Elastic
* Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
* stream creation requires a matching index template with data stream enabled.
* Cloud Hosted</a> are allowed. Automatic data stream creation requires a
* matching index template with data stream enabled.
* <p>
* The <code>dest</code> element can be configured like the index API to control
* optimistic concurrency control. Omitting <code>version_type</code> or setting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private BucketsPath(Kind kind, Object value) {
public String _toJsonString() {
switch (_kind) {
case Array :
return this.array().stream().map(v -> v).collect(Collectors.joining(","));
return this.array().stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(","));
case Dict :
return this.dict().entrySet().stream().map(e -> e.getKey() + ":" + e.getValue())
.collect(Collectors.joining(","));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private TermsExclude(Kind kind, Object value) {
public String _toJsonString() {
switch (_kind) {
case Terms :
return this.terms().stream().map(v -> v).collect(Collectors.joining(","));
return this.terms().stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(","));
case Regexp :
return this.regexp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2585,7 +2585,8 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer<SubmitRe
if (propsSet == (_index)) {
StringBuilder buf = new StringBuilder();
buf.append("/");
SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf);
SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")), buf);
buf.append("/_async_search");
return buf.toString();
}
Expand All @@ -2606,7 +2607,8 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer<SubmitRe
if (propsSet == 0) {
}
if (propsSet == (_index)) {
params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("index", request.index.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
return params;
},
Expand All @@ -2622,7 +2624,8 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer<SubmitRe
params.put("lenient", String.valueOf(request.lenient));
}
if (ApiTypeHelper.isDefined(request.routing)) {
params.put("routing", request.routing.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("routing", request.routing.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
if (request.ignoreUnavailable != null) {
params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable));
Expand All @@ -2646,8 +2649,8 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer<SubmitRe
params.put("allow_partial_search_results", String.valueOf(request.allowPartialSearchResults));
}
if (ApiTypeHelper.isDefined(request.expandWildcards)) {
params.put("expand_wildcards",
request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue())
.filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.preference != null) {
params.put("preference", request.preference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ public Builder rebuild() {
buf.append("/_cat");
buf.append("/aliases");
buf.append("/");
SimpleEndpoint.pathEncode(request.name.stream().map(v -> v).collect(Collectors.joining(",")), buf);
SimpleEndpoint.pathEncode(
request.name.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")),
buf);
return buf.toString();
}
throw SimpleEndpoint.noPathTemplateFound("path");
Expand All @@ -506,7 +508,8 @@ public Builder rebuild() {
if (propsSet == 0) {
}
if (propsSet == (_name)) {
params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("name", request.name.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
return params;
},
Expand All @@ -519,17 +522,19 @@ public Builder rebuild() {
params.put("master_timeout", request.masterTimeout._toJsonString());
}
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (ApiTypeHelper.isDefined(request.expandWildcards)) {
params.put("expand_wildcards",
request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue())
.filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ public Builder rebuild() {
buf.append("/_cat");
buf.append("/allocation");
buf.append("/");
SimpleEndpoint.pathEncode(request.nodeId.stream().map(v -> v).collect(Collectors.joining(",")),
buf);
SimpleEndpoint.pathEncode(request.nodeId.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")), buf);
return buf.toString();
}
throw SimpleEndpoint.noPathTemplateFound("path");
Expand All @@ -481,7 +481,8 @@ public Builder rebuild() {
if (propsSet == 0) {
}
if (propsSet == (_nodeId)) {
params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("nodeId", request.nodeId.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
return params;
},
Expand All @@ -494,13 +495,15 @@ public Builder rebuild() {
params.put("master_timeout", request.masterTimeout._toJsonString());
}
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,15 @@ public Builder rebuild() {
params.put("master_timeout", request.masterTimeout._toJsonString());
}
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ protected static void setupCountRequestDeserializer(ObjectDeserializer<CountRequ
buf.append("/_cat");
buf.append("/count");
buf.append("/");
SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf);
SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")), buf);
return buf.toString();
}
throw SimpleEndpoint.noPathTemplateFound("path");
Expand All @@ -484,7 +485,8 @@ protected static void setupCountRequestDeserializer(ObjectDeserializer<CountRequ
if (propsSet == 0) {
}
if (propsSet == (_index)) {
params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("index", request.index.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
return params;
},
Expand All @@ -494,13 +496,15 @@ protected static void setupCountRequestDeserializer(ObjectDeserializer<CountRequ
Map<String, String> params = new HashMap<>();
params.put("format", "json");
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ public Builder rebuild() {
buf.append("/_cat");
buf.append("/fielddata");
buf.append("/");
SimpleEndpoint.pathEncode(request.fields.stream().map(v -> v).collect(Collectors.joining(",")),
buf);
SimpleEndpoint.pathEncode(request.fields.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")), buf);
return buf.toString();
}
throw SimpleEndpoint.noPathTemplateFound("path");
Expand All @@ -407,7 +407,8 @@ public Builder rebuild() {
if (propsSet == 0) {
}
if (propsSet == (_fields)) {
params.put("fields", request.fields.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("fields", request.fields.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
return params;
},
Expand All @@ -417,13 +418,15 @@ public Builder rebuild() {
Map<String, String> params = new HashMap<>();
params.put("format", "json");
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,15 @@ public Builder rebuild() {
Map<String, String> params = new HashMap<>();
params.put("format", "json");
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ public Builder rebuild() {
buf.append("/_cat");
buf.append("/indices");
buf.append("/");
SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).collect(Collectors.joining(",")), buf);
SimpleEndpoint.pathEncode(request.index.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")), buf);
return buf.toString();
}
throw SimpleEndpoint.noPathTemplateFound("path");
Expand All @@ -604,7 +605,8 @@ public Builder rebuild() {
if (propsSet == 0) {
}
if (propsSet == (_index)) {
params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("index", request.index.stream().map(v -> v).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
return params;
},
Expand All @@ -617,11 +619,12 @@ public Builder rebuild() {
params.put("master_timeout", request.masterTimeout._toJsonString());
}
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (ApiTypeHelper.isDefined(request.expandWildcards)) {
params.put("expand_wildcards",
request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue())
.filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.pri != null) {
params.put("pri", String.valueOf(request.pri));
Expand All @@ -630,7 +633,8 @@ public Builder rebuild() {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.health != null) {
params.put("health", request.health.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,15 @@ public Builder rebuild() {
params.put("master_timeout", request.masterTimeout._toJsonString());
}
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("s",
request.s.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
params.put("h",
request.h.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,15 @@ public Builder rebuild() {
Map<String, String> params = new HashMap<>();
params.put("format", "json");
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("s", request.s.stream().map(v -> v.jsonValue()).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("h", request.h.stream().map(v -> v.jsonValue()).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,15 @@ public Builder rebuild() {
Map<String, String> params = new HashMap<>();
params.put("format", "json");
if (ApiTypeHelper.isDefined(request.s)) {
params.put("s", request.s.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("s", request.s.stream().map(v -> v.jsonValue()).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
if (request.bytes != null) {
params.put("bytes", request.bytes.jsonValue());
}
if (ApiTypeHelper.isDefined(request.h)) {
params.put("h", request.h.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
params.put("h", request.h.stream().map(v -> v.jsonValue()).filter(Objects::nonNull)
.collect(Collectors.joining(",")));
}
if (request.time != null) {
params.put("time", request.time.jsonValue());
Expand Down
Loading
Loading