Skip to content

Commit 26dab96

Browse files
committed
[codegen] update to latest api spec
1 parent da3e9af commit 26dab96

File tree

3 files changed

+56
-16
lines changed

3 files changed

+56
-16
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CalendarInterval.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public enum CalendarInterval implements JsonEnum {
6060

6161
Quarter("quarter", "1q"),
6262

63-
Year("year", "1Y"),
63+
Year("year", "1y"),
6464

6565
;
6666

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsAggregation.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import jakarta.json.stream.JsonGenerator;
4040
import java.lang.Boolean;
4141
import java.lang.Integer;
42+
import java.lang.Long;
4243
import java.lang.String;
4344
import java.util.List;
4445
import java.util.Objects;
@@ -110,6 +111,9 @@ public class TermsAggregation extends BucketAggregationBase
110111
@Nullable
111112
private final Script script;
112113

114+
@Nullable
115+
private final Long shardMinDocCount;
116+
113117
@Nullable
114118
private final Integer shardSize;
115119

@@ -138,6 +142,7 @@ private TermsAggregation(Builder builder) {
138142
this.valueType = builder.valueType;
139143
this.order = ApiTypeHelper.unmodifiable(builder.order);
140144
this.script = builder.script;
145+
this.shardMinDocCount = builder.shardMinDocCount;
141146
this.shardSize = builder.shardSize;
142147
this.showTermDocCountError = builder.showTermDocCountError;
143148
this.size = builder.size;
@@ -291,6 +296,19 @@ public final Script script() {
291296
return this.script;
292297
}
293298

299+
/**
300+
* Regulates the certainty a shard has if the term should actually be added to
301+
* the candidate list or not with respect to the <code>min_doc_count</code>.
302+
* Terms will only be considered if their local shard frequency within the set
303+
* is higher than the <code>shard_min_doc_count</code>.
304+
* <p>
305+
* API name: {@code shard_min_doc_count}
306+
*/
307+
@Nullable
308+
public final Long shardMinDocCount() {
309+
return this.shardMinDocCount;
310+
}
311+
294312
/**
295313
* The number of candidate terms produced by each shard. By default,
296314
* <code>shard_size</code> will be automatically estimated based on the number
@@ -408,6 +426,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
408426
generator.writeKey("script");
409427
this.script.serialize(generator, mapper);
410428

429+
}
430+
if (this.shardMinDocCount != null) {
431+
generator.writeKey("shard_min_doc_count");
432+
generator.write(this.shardMinDocCount);
433+
411434
}
412435
if (this.shardSize != null) {
413436
generator.writeKey("shard_size");
@@ -482,6 +505,9 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder<Builde
482505
@Nullable
483506
private Script script;
484507

508+
@Nullable
509+
private Long shardMinDocCount;
510+
485511
@Nullable
486512
private Integer shardSize;
487513

@@ -707,6 +733,19 @@ public final Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn)
707733
return this.script(fn.apply(new Script.Builder()).build());
708734
}
709735

736+
/**
737+
* Regulates the certainty a shard has if the term should actually be added to
738+
* the candidate list or not with respect to the <code>min_doc_count</code>.
739+
* Terms will only be considered if their local shard frequency within the set
740+
* is higher than the <code>shard_min_doc_count</code>.
741+
* <p>
742+
* API name: {@code shard_min_doc_count}
743+
*/
744+
public final Builder shardMinDocCount(@Nullable Long value) {
745+
this.shardMinDocCount = value;
746+
return this;
747+
}
748+
710749
/**
711750
* The number of candidate terms produced by each shard. By default,
712751
* <code>shard_size</code> will be automatically estimated based on the number
@@ -790,6 +829,7 @@ protected static void setupTermsAggregationDeserializer(ObjectDeserializer<Terms
790829
op.add(Builder::order,
791830
JsonpDeserializer.arrayDeserializer(NamedValue.deserializer(() -> SortOrder._DESERIALIZER)), "order");
792831
op.add(Builder::script, Script._DESERIALIZER, "script");
832+
op.add(Builder::shardMinDocCount, JsonpDeserializer.longDeserializer(), "shard_min_doc_count");
793833
op.add(Builder::shardSize, JsonpDeserializer.integerDeserializer(), "shard_size");
794834
op.add(Builder::showTermDocCountError, JsonpDeserializer.booleanDeserializer(), "show_term_doc_count_error");
795835
op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size");

java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@
396396
'_types.aggregations.CardinalityAggregate': '_types/aggregations/Aggregate.ts#L138-L141',
397397
'_types.aggregations.CardinalityAggregation': '_types/aggregations/metric.ts#L87-L99',
398398
'_types.aggregations.CardinalityExecutionMode': '_types/aggregations/metric.ts#L64-L85',
399-
'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1040-L1104',
400-
'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1106-L1109',
399+
'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1045-L1109',
400+
'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1111-L1114',
401401
'_types.aggregations.ChiSquareHeuristic': '_types/aggregations/bucket.ts#L737-L746',
402402
'_types.aggregations.ChildrenAggregate': '_types/aggregations/Aggregate.ts#L776-L777',
403403
'_types.aggregations.ChildrenAggregation': '_types/aggregations/bucket.ts#L113-L118',
@@ -413,7 +413,7 @@
413413
'_types.aggregations.CumulativeCardinalityAggregate': '_types/aggregations/Aggregate.ts#L747-L755',
414414
'_types.aggregations.CumulativeCardinalityAggregation': '_types/aggregations/pipeline.ts#L192-L192',
415415
'_types.aggregations.CumulativeSumAggregation': '_types/aggregations/pipeline.ts#L194-L194',
416-
'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1111-L1115',
416+
'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1116-L1120',
417417
'_types.aggregations.DateHistogramAggregate': '_types/aggregations/Aggregate.ts#L348-L349',
418418
'_types.aggregations.DateHistogramAggregation': '_types/aggregations/bucket.ts#L191-L249',
419419
'_types.aggregations.DateHistogramBucket': '_types/aggregations/Aggregate.ts#L351-L354',
@@ -440,9 +440,9 @@
440440
'_types.aggregations.FormatMetricAggregationBase': '_types/aggregations/metric.ts#L47-L49',
441441
'_types.aggregations.FormattableMetricAggregation': '_types/aggregations/metric.ts#L51-L53',
442442
'_types.aggregations.FrequentItemSetsAggregate': '_types/aggregations/Aggregate.ts#L639-L640',
443-
'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1162-L1186',
443+
'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1167-L1191',
444444
'_types.aggregations.FrequentItemSetsBucket': '_types/aggregations/Aggregate.ts#L642-L645',
445-
'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1148-L1160',
445+
'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1153-L1165',
446446
'_types.aggregations.GapPolicy': '_types/aggregations/pipeline.ts#L61-L76',
447447
'_types.aggregations.GeoBoundsAggregate': '_types/aggregations/Aggregate.ts#L303-L306',
448448
'_types.aggregations.GeoBoundsAggregation': '_types/aggregations/metric.ts#L108-L114',
@@ -484,7 +484,7 @@
484484
'_types.aggregations.InferenceFeatureImportance': '_types/aggregations/Aggregate.ts#L678-L682',
485485
'_types.aggregations.InferenceTopClassEntry': '_types/aggregations/Aggregate.ts#L672-L676',
486486
'_types.aggregations.IpPrefixAggregate': '_types/aggregations/Aggregate.ts#L629-L630',
487-
'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1117-L1146',
487+
'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1122-L1151',
488488
'_types.aggregations.IpPrefixBucket': '_types/aggregations/Aggregate.ts#L632-L637',
489489
'_types.aggregations.IpRangeAggregate': '_types/aggregations/Aggregate.ts#L556-L558',
490490
'_types.aggregations.IpRangeAggregation': '_types/aggregations/bucket.ts#L550-L559',
@@ -587,13 +587,13 @@
587587
'_types.aggregations.TTestAggregation': '_types/aggregations/metric.ts#L294-L308',
588588
'_types.aggregations.TTestType': '_types/aggregations/metric.ts#L322-L335',
589589
'_types.aggregations.TermsAggregateBase': '_types/aggregations/Aggregate.ts#L377-L382',
590-
'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L912-L972',
591-
'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L982-L991',
592-
'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L993-L998',
590+
'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L912-L977',
591+
'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L987-L996',
592+
'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L998-L1003',
593593
'_types.aggregations.TermsBucketBase': '_types/aggregations/Aggregate.ts#L391-L393',
594-
'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1003-L1004',
595-
'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1000-L1001',
596-
'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1006-L1015',
594+
'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1008-L1009',
595+
'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1005-L1006',
596+
'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1011-L1020',
597597
'_types.aggregations.TestPopulation': '_types/aggregations/metric.ts#L310-L320',
598598
'_types.aggregations.TopHitsAggregate': '_types/aggregations/Aggregate.ts#L654-L657',
599599
'_types.aggregations.TopHitsAggregation': '_types/aggregations/metric.ts#L337-L397',
@@ -609,7 +609,7 @@
609609
'_types.aggregations.ValueCountAggregation': '_types/aggregations/metric.ts#L422-L422',
610610
'_types.aggregations.ValueType': '_types/aggregations/metric.ts#L424-L435',
611611
'_types.aggregations.VariableWidthHistogramAggregate': '_types/aggregations/Aggregate.ts#L362-L364',
612-
'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1017-L1038',
612+
'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1022-L1043',
613613
'_types.aggregations.VariableWidthHistogramBucket': '_types/aggregations/Aggregate.ts#L366-L373',
614614
'_types.aggregations.WeightedAverageAggregation': '_types/aggregations/metric.ts#L437-L451',
615615
'_types.aggregations.WeightedAverageValue': '_types/aggregations/metric.ts#L453-L463',
@@ -2721,10 +2721,10 @@
27212721
if (hash.length > 1) {
27222722
hash = hash.substring(1);
27232723
}
2724-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/42a458c196b1b8a82a1931f4879ccc17466c6f2c/specification/" + (paths[hash] || "");
2724+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/7dcdabcae2f5644c64e0a94446c7ae012e70a05c/specification/" + (paths[hash] || "");
27252725
</script>
27262726
</head>
27272727
<body>
2728-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/42a458c196b1b8a82a1931f4879ccc17466c6f2c/specification/">Elasticsearch API specification</a>.
2728+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/7dcdabcae2f5644c64e0a94446c7ae012e70a05c/specification/">Elasticsearch API specification</a>.
27292729
</body>
27302730
</html>

0 commit comments

Comments
 (0)