Skip to content

Commit 9ffbd4f

Browse files
Re-generate client code using latest OpenSearch API specification (2026-03-02) (#1900) (#1918)
(cherry picked from commit f8c8865) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Andriy Redko <drreta@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent cc74aea commit 9ffbd4f

3 files changed

Lines changed: 51 additions & 13 deletions

File tree

java-client/src/generated/java/org/opensearch/client/opensearch/_types/aggregations/TermsAggregation.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public class TermsAggregation extends BucketAggregationBase
8585
private final TermsInclude include;
8686

8787
@Nullable
88-
private final Integer minDocCount;
88+
private final Long minDocCount;
8989

9090
@Nullable
9191
private final FieldValue missing;
@@ -97,7 +97,7 @@ public class TermsAggregation extends BucketAggregationBase
9797
private final Script script;
9898

9999
@Nullable
100-
private final Integer shardMinDocCount;
100+
private final Long shardMinDocCount;
101101

102102
@Nullable
103103
private final Integer shardSize;
@@ -199,7 +199,7 @@ public final TermsInclude include() {
199199
* </p>
200200
*/
201201
@Nullable
202-
public final Integer minDocCount() {
202+
public final Long minDocCount() {
203203
return this.minDocCount;
204204
}
205205

@@ -234,7 +234,7 @@ public final Script script() {
234234
* </p>
235235
*/
236236
@Nullable
237-
public final Integer shardMinDocCount() {
237+
public final Long shardMinDocCount() {
238238
return this.shardMinDocCount;
239239
}
240240

@@ -405,15 +405,15 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder<Builde
405405
@Nullable
406406
private TermsInclude include;
407407
@Nullable
408-
private Integer minDocCount;
408+
private Long minDocCount;
409409
@Nullable
410410
private FieldValue missing;
411411
@Nullable
412412
private List<Map<String, SortOrder>> order;
413413
@Nullable
414414
private Script script;
415415
@Nullable
416-
private Integer shardMinDocCount;
416+
private Long shardMinDocCount;
417417
@Nullable
418418
private Integer shardSize;
419419
@Nullable
@@ -552,7 +552,7 @@ public final Builder include(Function<TermsInclude.Builder, ObjectBuilder<TermsI
552552
* </p>
553553
*/
554554
@Nonnull
555-
public final Builder minDocCount(@Nullable Integer value) {
555+
public final Builder minDocCount(@Nullable Long value) {
556556
this.minDocCount = value;
557557
return this;
558558
}
@@ -624,7 +624,7 @@ public final Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn)
624624
* </p>
625625
*/
626626
@Nonnull
627-
public final Builder shardMinDocCount(@Nullable Integer value) {
627+
public final Builder shardMinDocCount(@Nullable Long value) {
628628
this.shardMinDocCount = value;
629629
return this;
630630
}
@@ -711,15 +711,15 @@ protected static void setupTermsAggregationDeserializer(ObjectDeserializer<Terms
711711
op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field");
712712
op.add(Builder::format, JsonpDeserializer.stringDeserializer(), "format");
713713
op.add(Builder::include, TermsInclude._DESERIALIZER, "include");
714-
op.add(Builder::minDocCount, JsonpDeserializer.integerDeserializer(), "min_doc_count");
714+
op.add(Builder::minDocCount, JsonpDeserializer.longDeserializer(), "min_doc_count");
715715
op.add(Builder::missing, FieldValue._DESERIALIZER, "missing");
716716
op.add(
717717
Builder::order,
718718
JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringMapDeserializer(SortOrder._DESERIALIZER)),
719719
"order"
720720
);
721721
op.add(Builder::script, Script._DESERIALIZER, "script");
722-
op.add(Builder::shardMinDocCount, JsonpDeserializer.integerDeserializer(), "shard_min_doc_count");
722+
op.add(Builder::shardMinDocCount, JsonpDeserializer.longDeserializer(), "shard_min_doc_count");
723723
op.add(Builder::shardSize, JsonpDeserializer.integerDeserializer(), "shard_size");
724724
op.add(Builder::showTermDocCountError, JsonpDeserializer.booleanDeserializer(), "show_term_doc_count_error");
725725
op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size");

java-client/src/generated/java/org/opensearch/client/opensearch/_types/aggregations/ValueType.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,29 @@
4242

4343
// typedef: _types.aggregations.ValueType
4444

45+
/**
46+
* The data type for a field. The server's <code>lenientParse</code> accepts multiple representations for the same underlying type (for
47+
* example, byte/short/integer/long all map to long).
48+
*/
4549
@JsonpDeserializable
4650
@Generated("org.opensearch.client.codegen.CodeGenerator")
4751
public enum ValueType implements JsonEnum {
4852
Boolean("boolean"),
4953

54+
Byte("byte"),
55+
5056
Date("date"),
5157

5258
DateNanos("date_nanos"),
5359

5460
Double("double"),
5561

62+
Float("float"),
63+
5664
GeoPoint("geo_point"),
5765

66+
Integer("integer"),
67+
5868
Ip("ip"),
5969

6070
Long("long"),
@@ -63,7 +73,13 @@ public enum ValueType implements JsonEnum {
6373

6474
Numeric("numeric"),
6575

66-
String("string");
76+
Range("range"),
77+
78+
Short("short"),
79+
80+
String("string"),
81+
82+
UnsignedLong("unsigned_long");
6783

6884
private final String jsonValue;
6985

java-codegen/opensearch-openapi.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,6 +3944,7 @@ paths:
39443944
externalDocs:
39453945
url: https://opensearch.org/docs/latest/api-reference/multi-search/
39463946
parameters:
3947+
- $ref: '#/components/parameters/msearch___query.allow_partial_results'
39473948
- $ref: '#/components/parameters/msearch___query.ccs_minimize_roundtrips'
39483949
- $ref: '#/components/parameters/msearch___query.max_concurrent_searches'
39493950
- $ref: '#/components/parameters/msearch___query.max_concurrent_shard_requests'
@@ -3969,6 +3970,7 @@ paths:
39693970
externalDocs:
39703971
url: https://opensearch.org/docs/latest/api-reference/multi-search/
39713972
parameters:
3973+
- $ref: '#/components/parameters/msearch___query.allow_partial_results'
39723974
- $ref: '#/components/parameters/msearch___query.ccs_minimize_roundtrips'
39733975
- $ref: '#/components/parameters/msearch___query.max_concurrent_searches'
39743976
- $ref: '#/components/parameters/msearch___query.max_concurrent_shard_requests'
@@ -13994,6 +13996,7 @@ paths:
1399413996
url: https://opensearch.org/docs/latest/api-reference/multi-search/
1399513997
parameters:
1399613998
- $ref: '#/components/parameters/msearch___path.index'
13999+
- $ref: '#/components/parameters/msearch___query.allow_partial_results'
1399714000
- $ref: '#/components/parameters/msearch___query.ccs_minimize_roundtrips'
1399814001
- $ref: '#/components/parameters/msearch___query.max_concurrent_searches'
1399914002
- $ref: '#/components/parameters/msearch___query.max_concurrent_shard_requests'
@@ -14020,6 +14023,7 @@ paths:
1402014023
url: https://opensearch.org/docs/latest/api-reference/multi-search/
1402114024
parameters:
1402214025
- $ref: '#/components/parameters/msearch___path.index'
14026+
- $ref: '#/components/parameters/msearch___query.allow_partial_results'
1402314027
- $ref: '#/components/parameters/msearch___query.ccs_minimize_roundtrips'
1402414028
- $ref: '#/components/parameters/msearch___query.max_concurrent_searches'
1402514029
- $ref: '#/components/parameters/msearch___query.max_concurrent_shard_requests'
@@ -26492,6 +26496,14 @@ components:
2649226496
schema:
2649326497
$ref: '#/components/schemas/_common___Indices'
2649426498
style: simple
26499+
msearch___query.allow_partial_results:
26500+
in: query
26501+
name: allow_partial_results
26502+
description: Specifies whether to return partial results if there are shard request timeouts or shard failures
26503+
schema:
26504+
type: boolean
26505+
default: true
26506+
style: form
2649526507
msearch___query.ccs_minimize_roundtrips:
2649626508
in: query
2649726509
name: ccs_minimize_roundtrips
@@ -41152,6 +41164,7 @@ components:
4115241164
required:
4115341165
- filter
4115441166
unevaluatedProperties: true
41167+
x-protobuf-excluded: true
4115541168
- properties:
4115641169
filters:
4115741170
$ref: '#/components/schemas/_common.aggregations___FiltersAggregation'
@@ -43972,7 +43985,7 @@ components:
4397243985
min_doc_count:
4397343986
description: Only return values that are found in more than `min_doc_count` hits.
4397443987
type: integer
43975-
format: int32
43988+
format: int64
4397643989
missing:
4397743990
$ref: '#/components/schemas/_common___FieldValue'
4397843991
value_type:
@@ -43991,7 +44004,7 @@ components:
4399144004
shard_min_doc_count:
4399244005
description: The minimum number of documents in a bucket on each shard for it to be returned.
4399344006
type: integer
43994-
format: int32
44007+
format: int64
4399544008
show_term_doc_count_error:
4399644009
description: Set to `true` to return the `doc_count_error_upper_bound`, which is an upper bound to the error on the `doc_count` returned by each shard.
4399744010
type: boolean
@@ -44168,17 +44181,26 @@ components:
4416844181
- type: object
4416944182
_common.aggregations___ValueType:
4417044183
type: string
44184+
description: |-
44185+
The data type for a field. The server's `lenientParse` accepts multiple representations
44186+
for the same underlying type (for example, byte/short/integer/long all map to long).
4417144187
enum:
4417244188
- boolean
44189+
- byte
4417344190
- date
4417444191
- date_nanos
4417544192
- double
44193+
- float
4417644194
- geo_point
44195+
- integer
4417744196
- ip
4417844197
- long
4417944198
- number
4418044199
- numeric
44200+
- range
44201+
- short
4418144202
- string
44203+
- unsigned_long
4418244204
_common.aggregations___VariableWidthHistogramAggregate:
4418344205
allOf:
4418444206
- $ref: '#/components/schemas/_common.aggregations___MultiBucketAggregateBaseVariableWidthHistogramBucket'

0 commit comments

Comments
 (0)