diff --git a/exclusion.dic b/exclusion.dic
index 56ab4f7f2b3..c62eea6303e 100644
--- a/exclusion.dic
+++ b/exclusion.dic
@@ -1,9 +1,9 @@
deserialize
json
-async
inferrer
elasticsearch
asciidocs
yyyy
enum
-trippable
\ No newline at end of file
+trippable
+geotile
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionary.cs b/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionary.cs
deleted file mode 100644
index 196cea2878b..00000000000
--- a/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionary.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Licensed to Elasticsearch B.V under one or more agreements.
-// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
-// See the LICENSE file in the project root for more information.
-
-namespace Elastic.Clients.Elasticsearch.Aggregations;
-
-public partial class AggregateDictionary
-{
- ///
- public AvgAggregate? GetAverage(string key) => TryGet(key);
-}
diff --git a/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionaryConverter.cs b/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionaryConverter.cs
index 8a5aeda2061..39fe015c96f 100644
--- a/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionaryConverter.cs
+++ b/src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionaryConverter.cs
@@ -74,9 +74,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "categorize_text":
- throw new Exception("The aggregate in response is not yet supported");
-
case "children":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -105,9 +102,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "diversified_sampler":
- throw new Exception("The aggregate in response is not yet supported");
-
case "filter":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -122,26 +116,26 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- //case "geo_distance":
- // {
- // var agg = JsonSerializer.Deserialize(ref reader, options);
- // dictionary.Add(nameParts[1], agg);
- // break;
- // }
+ case "geo_distance":
+ {
+ var agg = JsonSerializer.Deserialize(ref reader, options);
+ dictionary.Add(nameParts[1], agg);
+ break;
+ }
- //case "geohash_grid":
- // {
- // var agg = JsonSerializer.Deserialize(ref reader, options);
- // dictionary.Add(nameParts[1], agg);
- // break;
- // }
+ case "geohash_grid":
+ {
+ var agg = JsonSerializer.Deserialize(ref reader, options);
+ dictionary.Add(nameParts[1], agg);
+ break;
+ }
- //case "geotile_grid":
- // {
- // var agg = JsonSerializer.Deserialize(ref reader, options);
- // dictionary.Add(nameParts[1], agg);
- // break;
- // }
+ case "geotile_grid":
+ {
+ var agg = JsonSerializer.Deserialize(ref reader, options);
+ dictionary.Add(nameParts[1], agg);
+ break;
+ }
case "global":
{
@@ -164,6 +158,13 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
+ case "ip_prefix":
+ {
+ var agg = JsonSerializer.Deserialize(ref reader, options);
+ dictionary.Add(nameParts[1], agg);
+ break;
+ }
+
case "missing":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -199,9 +200,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "rare_terms":
- throw new Exception("The aggregate in response is not yet supported");
-
case "reverse_nested":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -216,11 +214,12 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "significant_terms":
- throw new Exception("The aggregate in response is not yet supported");
-
- case "significant_text":
- throw new Exception("The aggregate in response is not yet supported");
+ case "sigsterms":
+ {
+ var agg = JsonSerializer.Deserialize(ref reader, options);
+ dictionary.Add(nameParts[1], agg);
+ break;
+ }
case "variable_width_histogram":
{
@@ -231,14 +230,14 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
case "avg":
{
- var agg = JsonSerializer.Deserialize(ref reader, options);
+ var agg = JsonSerializer.Deserialize(ref reader, options);
dictionary.Add(nameParts[1], agg);
break;
}
case "boxplot":
{
- var agg = JsonSerializer.Deserialize(ref reader, options);
+ var agg = JsonSerializer.Deserialize(ref reader, options);
dictionary.Add(nameParts[1], agg);
break;
}
@@ -278,6 +277,13 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
// break;
// }
+ case "srareterms":
+ {
+ var agg = JsonSerializer.Deserialize(ref reader, options);
+ dictionary.Add(nameParts[1], agg);
+ break;
+ }
+
case "matrix_stats":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -306,9 +312,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "percentile_ranks":
- throw new Exception("The aggregate in response is not yet supported.");
-
case "tdigest_percentile_ranks":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -316,9 +319,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "percentiles":
- throw new Exception("The aggregate in response is not yet supported.");
-
case "rate":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -384,22 +384,11 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
case "weighted_avg":
{
- var agg = JsonSerializer.Deserialize(ref reader, options);
+ var agg = JsonSerializer.Deserialize(ref reader, options);
dictionary.Add(nameParts[1], agg);
break;
}
- case "avg_bucket":
- throw new Exception("The aggregate in response is not yet supported.");
- case "bucket_script":
- throw new Exception("The aggregate in response is not yet supported.");
- case "bucket_count_ks_test":
- throw new Exception("The aggregate in response is not yet supported.");
- case "bucket_correlation":
- throw new Exception("The aggregate in response is not yet supported.");
- case "bucket_selector":
- throw new Exception("The aggregate in response is not yet supported.");
-
case "cumulative_cardinality":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -436,20 +425,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
dictionary.Add(nameParts[1], agg);
break;
}
-
- case "max_bucket":
- throw new Exception("The aggregate in response is not yet supported.");
- case "min_bucket":
- throw new Exception("The aggregate in response is not yet supported.");
- case "moving_avg":
- throw new Exception("The aggregate in response is not yet supported.");
- case "moving_fn":
- throw new Exception("The aggregate in response is not yet supported.");
- case "moving_percentiles":
- throw new Exception("The aggregate in response is not yet supported.");
- case "normalize":
- throw new Exception("The aggregate in response is not yet supported.");
-
case "percentiles_bucket":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -457,9 +432,6 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "serial_diff":
- throw new Exception("The aggregate in response is not yet supported.");
-
case "stats_bucket":
{
var agg = JsonSerializer.Deserialize(ref reader, options);
@@ -467,11 +439,8 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
break;
}
- case "sum_bucket":
- throw new Exception("The aggregate in response is not yet supported.");
-
default:
- throw new Exception("The aggregate in response is not yet supported.");
+ throw new Exception($"The aggregate '{aggregateName}' in this response is not currently supported.");
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs
index fa8d5e71242..1b16ca5d58a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs
@@ -38,7 +38,7 @@ internal AsyncSearchNamespacedClient(ElasticsearchClient client) : base(client)
///
/// Retrieves the status of a previously submitted async search request given its ID.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequest request)
{
@@ -48,7 +48,7 @@ public virtual AsyncSearchStatusResponse Status(AsyncSearchStatusRequest request
///
/// Retrieves the status of a previously submitted async search request given its ID.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task StatusAsync(AsyncSearchStatusRequest request, CancellationToken cancellationToken = default)
{
@@ -104,7 +104,7 @@ public virtual Task StatusAsync(Elastic.Cl
///
/// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequest request)
{
@@ -114,7 +114,7 @@ public virtual DeleteAsyncSearchResponse Delete(DeleteAsyncSearchRequest request
///
/// Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task DeleteAsync(DeleteAsyncSearchRequest request, CancellationToken cancellationToken = default)
{
@@ -170,7 +170,7 @@ public virtual Task DeleteAsync(Elastic.Cl
///
/// Retrieves the results of a previously submitted async search request given its ID.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual GetAsyncSearchResponse Get(GetAsyncSearchRequest request)
{
@@ -180,7 +180,7 @@ public virtual GetAsyncSearchResponse Get(GetAsyncSearchRe
///
/// Retrieves the results of a previously submitted async search request given its ID.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task> GetAsync(GetAsyncSearchRequest request, CancellationToken cancellationToken = default)
{
@@ -220,7 +220,7 @@ public virtual Task> GetAsync(Elast
///
/// Executes a search request asynchronously.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual SubmitAsyncSearchResponse Submit(SubmitAsyncSearchRequest request)
{
@@ -230,7 +230,7 @@ public virtual SubmitAsyncSearchResponse Submit(SubmitAsyn
///
/// Executes a search request asynchronously.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task> SubmitAsync(SubmitAsyncSearchRequest request, CancellationToken cancellationToken = default)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs
index 0d37b79f8a8..4c63cb22112 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs
@@ -38,7 +38,7 @@ internal ClusterNamespacedClient(ElasticsearchClient client) : base(client)
///
/// Returns basic information about the health of the cluster.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual HealthResponse Health(HealthRequest request)
{
@@ -48,7 +48,7 @@ public virtual HealthResponse Health(HealthRequest request)
///
/// Returns basic information about the health of the cluster.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task HealthAsync(HealthRequest request, CancellationToken cancellationToken = default)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs
index 689272d1b64..aef1ce9831a 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs
@@ -45,7 +45,7 @@ private partial void SetupNamespaces()
///
/// Allows to perform multiple index/update/delete operations in a single request.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual BulkResponse Bulk(BulkRequest request)
{
@@ -55,7 +55,7 @@ public virtual BulkResponse Bulk(BulkRequest request)
///
/// Allows to perform multiple index/update/delete operations in a single request.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task BulkAsync(BulkRequest request, CancellationToken cancellationToken = default)
{
@@ -111,7 +111,7 @@ public virtual Task BulkAsync(Action
/// Explicitly clears the search context for a scroll.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request)
{
@@ -121,7 +121,7 @@ public virtual ClearScrollResponse ClearScroll(ClearScrollRequest request)
///
/// Explicitly clears the search context for a scroll.
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task ClearScrollAsync(ClearScrollRequest request, CancellationToken cancellationToken = default)
{
@@ -161,7 +161,7 @@ public virtual Task ClearScrollAsync(Action
/// Close a point in time
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest request)
{
@@ -171,7 +171,7 @@ public virtual ClosePointInTimeResponse ClosePointInTime(ClosePointInTimeRequest
///
/// Close a point in time
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task ClosePointInTimeAsync(ClosePointInTimeRequest request, CancellationToken cancellationToken = default)
{
@@ -1581,7 +1581,7 @@ public virtual Task> MultiSearchTemplateA
///
/// Open a point in time that can be used in subsequent searches
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest request)
{
@@ -1591,7 +1591,7 @@ public virtual OpenPointInTimeResponse OpenPointInTime(OpenPointInTimeRequest re
///
/// Open a point in time that can be used in subsequent searches
- /// Learn more about this API in the Elasticsearch documentation.
+ /// Learn more about this API in the Elasticsearch documentation.
///
public virtual Task OpenPointInTimeAsync(OpenPointInTimeRequest request, CancellationToken cancellationToken = default)
{
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs
index c4988260fb6..9f286fbc7ad 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs
@@ -44,8 +44,8 @@ public AggregateDictionary(IReadOnlyDictionary backingDictio
public Elastic.Clients.Elasticsearch.Aggregations.MinAggregate? GetMin(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate? GetMax(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.SumAggregate? GetSum(string key) => TryGet(key);
- public Elastic.Clients.Elasticsearch.Aggregations.AvgAggregate? GetAvg(string key) => TryGet(key);
- public Elastic.Clients.Elasticsearch.Aggregations.WeightedAvgAggregate? GetWeightedAvg(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate? GetAverage(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggregate? GetWeightedAverage(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate? GetValueCount(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate? GetDerivative(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate? GetStats(string key) => TryGet(key);
@@ -59,6 +59,7 @@ public AggregateDictionary(IReadOnlyDictionary backingDictio
public Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate? GetStringTerms(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate? GetLongTerms(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate? GetDoubleTerms(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.StringRareTermsAggregate? GetStringRareTerms(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate? GetMultiTerms(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.MissingAggregate? GetMissing(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.NestedAggregate? GetNested(string key) => TryGet(key);
@@ -68,17 +69,23 @@ public AggregateDictionary(IReadOnlyDictionary backingDictio
public Elastic.Clients.Elasticsearch.Aggregations.ChildrenAggregate? GetChildren(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.ParentAggregate? GetParent(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregate? GetSampler(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregate? GetGeohashGrid(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregate? GetGeotileGrid(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregate? GetGeohexGrid(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.RangeAggregate? GetRange(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.DateRangeAggregate? GetDateRange(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregate? GetGeoDistance(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregate? GetIpRange(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregate? GetIpPrefix(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregate? GetFilters(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.AdjacencyMatrixAggregate? GetAdjacencyMatrix(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate? GetSignificantStringTerms(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregate? GetComposite(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.ScriptedMetricAggregate? GetScriptedMetric(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregate? GetTopHits(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate? GetInference(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate? GetStringStats(string key) => TryGet(key);
- public Elastic.Clients.Elasticsearch.Aggregations.BoxPlotAggregate? GetBoxPlot(string key) => TryGet(key);
+ public Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregate? GetBoxplot(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregate? GetTopMetrics(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate? GetTTest(string key) => TryGet(key);
public Elastic.Clients.Elasticsearch.Aggregations.RateAggregate? GetRate(string key) => TryGet(key);
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs
index 42ca53549a8..b6492641c1c 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs
@@ -112,6 +112,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert,
return AggregationSerializationHelper.ReadContainer("derivative", ref reader, options);
}
+ if (propertyName == "diversified_sampler")
+ {
+ return AggregationSerializationHelper.ReadContainer("diversified_sampler", ref reader, options);
+ }
+
if (propertyName == "extended_stats")
{
return AggregationSerializationHelper.ReadContainer("extended_stats", ref reader, options);
@@ -127,6 +132,26 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert,
return AggregationSerializationHelper.ReadContainer("filters", ref reader, options);
}
+ if (propertyName == "geo_distance")
+ {
+ return AggregationSerializationHelper.ReadContainer("geo_distance", ref reader, options);
+ }
+
+ if (propertyName == "geohash_grid")
+ {
+ return AggregationSerializationHelper.ReadContainer("geohash_grid", ref reader, options);
+ }
+
+ if (propertyName == "geohex_grid")
+ {
+ return AggregationSerializationHelper.ReadContainer("geohex_grid", ref reader, options);
+ }
+
+ if (propertyName == "geotile_grid")
+ {
+ return AggregationSerializationHelper.ReadContainer("geotile_grid", ref reader, options);
+ }
+
if (propertyName == "global")
{
return AggregationSerializationHelper.ReadContainer("global", ref reader, options);
@@ -142,6 +167,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert,
return AggregationSerializationHelper.ReadContainer("inference", ref reader, options);
}
+ if (propertyName == "ip_prefix")
+ {
+ return AggregationSerializationHelper.ReadContainer("ip_prefix", ref reader, options);
+ }
+
if (propertyName == "ip_range")
{
return AggregationSerializationHelper.ReadContainer("ip_range", ref reader, options);
@@ -197,6 +227,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert,
return AggregationSerializationHelper.ReadContainer("range", ref reader, options);
}
+ if (propertyName == "rare_terms")
+ {
+ return AggregationSerializationHelper.ReadContainer("rare_terms", ref reader, options);
+ }
+
if (propertyName == "rate")
{
return AggregationSerializationHelper.ReadContainer("rate", ref reader, options);
@@ -217,6 +252,11 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert,
return AggregationSerializationHelper.ReadContainer("scripted_metric", ref reader, options);
}
+ if (propertyName == "significant_terms")
+ {
+ return AggregationSerializationHelper.ReadContainer("significant_terms", ref reader, options);
+ }
+
if (propertyName == "stats")
{
return AggregationSerializationHelper.ReadContainer("stats", ref reader, options);
@@ -370,6 +410,11 @@ public AggregationDescriptor Derivative(string name, Action DiversifiedSampler(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("diversified_sampler", configure));
+ }
+
public AggregationDescriptor ExtendedStats(string name, Action> configure)
{
return SetContainer(name, Aggregation.CreateWithAction("extended_stats", configure));
@@ -385,6 +430,26 @@ public AggregationDescriptor Filters(string name, Action GeoDistance(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geo_distance", configure));
+ }
+
+ public AggregationDescriptor GeohashGrid(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geohash_grid", configure));
+ }
+
+ public AggregationDescriptor GeohexGrid(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geohex_grid", configure));
+ }
+
+ public AggregationDescriptor GeotileGrid(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geotile_grid", configure));
+ }
+
public AggregationDescriptor Global(string name, Action> configure)
{
return SetContainer(name, Aggregation.CreateWithAction("global", configure));
@@ -400,6 +465,11 @@ public AggregationDescriptor Inference(string name, Action IpPrefix(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("ip_prefix", configure));
+ }
+
public AggregationDescriptor IpRange(string name, Action> configure)
{
return SetContainer(name, Aggregation.CreateWithAction("ip_range", configure));
@@ -455,6 +525,11 @@ public AggregationDescriptor Range(string name, Action RareTerms(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("rare_terms", configure));
+ }
+
public AggregationDescriptor Rate(string name, Action> configure)
{
return SetContainer(name, Aggregation.CreateWithAction("rate", configure));
@@ -475,6 +550,11 @@ public AggregationDescriptor ScriptedMetric(string name, Action SignificantTerms(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("significant_terms", configure));
+ }
+
public AggregationDescriptor Stats(string name, Action> configure)
{
return SetContainer(name, Aggregation.CreateWithAction("stats", configure));
@@ -654,6 +734,16 @@ public AggregationDescriptor Derivative(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("diversified_sampler", configure));
+ }
+
+ public AggregationDescriptor DiversifiedSampler(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("diversified_sampler", configure));
+ }
+
public AggregationDescriptor ExtendedStats(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("extended_stats", configure));
@@ -679,6 +769,46 @@ public AggregationDescriptor Filters(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geo_distance", configure));
+ }
+
+ public AggregationDescriptor GeoDistance(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geo_distance", configure));
+ }
+
+ public AggregationDescriptor GeohashGrid(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geohash_grid", configure));
+ }
+
+ public AggregationDescriptor GeohashGrid(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geohash_grid", configure));
+ }
+
+ public AggregationDescriptor GeohexGrid(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geohex_grid", configure));
+ }
+
+ public AggregationDescriptor GeohexGrid(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geohex_grid", configure));
+ }
+
+ public AggregationDescriptor GeotileGrid(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geotile_grid", configure));
+ }
+
+ public AggregationDescriptor GeotileGrid(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("geotile_grid", configure));
+ }
+
public AggregationDescriptor Global(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("global", configure));
@@ -709,6 +839,16 @@ public AggregationDescriptor Inference(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("ip_prefix", configure));
+ }
+
+ public AggregationDescriptor IpPrefix(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("ip_prefix", configure));
+ }
+
public AggregationDescriptor IpRange(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("ip_range", configure));
@@ -814,6 +954,16 @@ public AggregationDescriptor Range(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("rare_terms", configure));
+ }
+
+ public AggregationDescriptor RareTerms(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("rare_terms", configure));
+ }
+
public AggregationDescriptor Rate(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("rate", configure));
@@ -854,6 +1004,16 @@ public AggregationDescriptor ScriptedMetric(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("significant_terms", configure));
+ }
+
+ public AggregationDescriptor SignificantTerms(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("significant_terms", configure));
+ }
+
public AggregationDescriptor Stats(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("stats", configure));
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs
similarity index 96%
rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs
rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs
index f701e338a88..4c8cc0fd99e 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AvgAggregate.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs
@@ -27,7 +27,7 @@
namespace Elastic.Clients.Elasticsearch.Aggregations;
-public sealed partial class AvgAggregate : IAggregate
+public sealed partial class AverageAggregate : IAggregate
{
[JsonInclude, JsonPropertyName("meta")]
public IReadOnlyDictionary? Meta { get; init; }
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregate.g.cs
similarity index 97%
rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs
rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregate.g.cs
index 10671e5eb6d..66c8eb6edfa 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxPlotAggregate.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregate.g.cs
@@ -27,7 +27,7 @@
namespace Elastic.Clients.Elasticsearch.Aggregations;
-public sealed partial class BoxPlotAggregate : IAggregate
+public sealed partial class BoxplotAggregate : IAggregate
{
[JsonInclude, JsonPropertyName("lower")]
public double Lower { get; init; }
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs
new file mode 100644
index 00000000000..51f0599ac49
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChiSquareHeuristic.g.cs
@@ -0,0 +1,70 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+public sealed partial class ChiSquareHeuristic
+{
+ [JsonInclude, JsonPropertyName("background_is_superset")]
+ public bool BackgroundIsSuperset { get; set; }
+ [JsonInclude, JsonPropertyName("include_negatives")]
+ public bool IncludeNegatives { get; set; }
+}
+
+public sealed partial class ChiSquareHeuristicDescriptor : SerializableDescriptor
+{
+ internal ChiSquareHeuristicDescriptor(Action configure) => configure.Invoke(this);
+
+ public ChiSquareHeuristicDescriptor() : base()
+ {
+ }
+
+ private bool BackgroundIsSupersetValue { get; set; }
+ private bool IncludeNegativesValue { get; set; }
+
+ public ChiSquareHeuristicDescriptor BackgroundIsSuperset(bool backgroundIsSuperset = true)
+ {
+ BackgroundIsSupersetValue = backgroundIsSuperset;
+ return Self;
+ }
+
+ public ChiSquareHeuristicDescriptor IncludeNegatives(bool includeNegatives = true)
+ {
+ IncludeNegativesValue = includeNegatives;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("background_is_superset");
+ writer.WriteBooleanValue(BackgroundIsSupersetValue);
+ writer.WritePropertyName("include_negatives");
+ writer.WriteBooleanValue(IncludeNegativesValue);
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs
index 72f34113ca3..7e1ab0f7ce8 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregationSource.g.cs
@@ -31,6 +31,8 @@ public sealed partial class CompositeAggregationSource
{
[JsonInclude, JsonPropertyName("date_histogram")]
public Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregation? DateHistogram { get; set; }
+ [JsonInclude, JsonPropertyName("geotile_grid")]
+ public Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregation? GeotileGrid { get; set; }
[JsonInclude, JsonPropertyName("histogram")]
public Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation? Histogram { get; set; }
[JsonInclude, JsonPropertyName("terms")]
@@ -48,6 +50,9 @@ public CompositeAggregationSourceDescriptor() : base()
private Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregation? DateHistogramValue { get; set; }
private DateHistogramAggregationDescriptor DateHistogramDescriptor { get; set; }
private Action> DateHistogramDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregation? GeotileGridValue { get; set; }
+ private GeotileGridAggregationDescriptor GeotileGridDescriptor { get; set; }
+ private Action> GeotileGridDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation? HistogramValue { get; set; }
private HistogramAggregationDescriptor HistogramDescriptor { get; set; }
private Action> HistogramDescriptorAction { get; set; }
@@ -79,6 +84,30 @@ public CompositeAggregationSourceDescriptor DateHistogram(Action GeotileGrid(Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregation? geotileGrid)
+ {
+ GeotileGridDescriptor = null;
+ GeotileGridDescriptorAction = null;
+ GeotileGridValue = geotileGrid;
+ return Self;
+ }
+
+ public CompositeAggregationSourceDescriptor GeotileGrid(GeotileGridAggregationDescriptor descriptor)
+ {
+ GeotileGridValue = null;
+ GeotileGridDescriptorAction = null;
+ GeotileGridDescriptor = descriptor;
+ return Self;
+ }
+
+ public CompositeAggregationSourceDescriptor GeotileGrid(Action> configure)
+ {
+ GeotileGridValue = null;
+ GeotileGridDescriptor = null;
+ GeotileGridDescriptorAction = configure;
+ return Self;
+ }
+
public CompositeAggregationSourceDescriptor Histogram(Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation? histogram)
{
HistogramDescriptor = null;
@@ -146,6 +175,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, DateHistogramValue, options);
}
+ if (GeotileGridDescriptor is not null)
+ {
+ writer.WritePropertyName("geotile_grid");
+ JsonSerializer.Serialize(writer, GeotileGridDescriptor, options);
+ }
+ else if (GeotileGridDescriptorAction is not null)
+ {
+ writer.WritePropertyName("geotile_grid");
+ JsonSerializer.Serialize(writer, new GeotileGridAggregationDescriptor(GeotileGridDescriptorAction), options);
+ }
+ else if (GeotileGridValue is not null)
+ {
+ writer.WritePropertyName("geotile_grid");
+ JsonSerializer.Serialize(writer, GeotileGridValue, options);
+ }
+
if (HistogramDescriptor is not null)
{
writer.WritePropertyName("histogram");
@@ -193,6 +238,9 @@ public CompositeAggregationSourceDescriptor() : base()
private Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregation? DateHistogramValue { get; set; }
private DateHistogramAggregationDescriptor DateHistogramDescriptor { get; set; }
private Action DateHistogramDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregation? GeotileGridValue { get; set; }
+ private GeotileGridAggregationDescriptor GeotileGridDescriptor { get; set; }
+ private Action GeotileGridDescriptorAction { get; set; }
private Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation? HistogramValue { get; set; }
private HistogramAggregationDescriptor HistogramDescriptor { get; set; }
private Action HistogramDescriptorAction { get; set; }
@@ -224,6 +272,30 @@ public CompositeAggregationSourceDescriptor DateHistogram(Action configure)
+ {
+ GeotileGridValue = null;
+ GeotileGridDescriptor = null;
+ GeotileGridDescriptorAction = configure;
+ return Self;
+ }
+
public CompositeAggregationSourceDescriptor Histogram(Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation? histogram)
{
HistogramDescriptor = null;
@@ -291,6 +363,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, DateHistogramValue, options);
}
+ if (GeotileGridDescriptor is not null)
+ {
+ writer.WritePropertyName("geotile_grid");
+ JsonSerializer.Serialize(writer, GeotileGridDescriptor, options);
+ }
+ else if (GeotileGridDescriptorAction is not null)
+ {
+ writer.WritePropertyName("geotile_grid");
+ JsonSerializer.Serialize(writer, new GeotileGridAggregationDescriptor(GeotileGridDescriptorAction), options);
+ }
+ else if (GeotileGridValue is not null)
+ {
+ writer.WritePropertyName("geotile_grid");
+ JsonSerializer.Serialize(writer, GeotileGridValue, options);
+ }
+
if (HistogramDescriptor is not null)
{
writer.WritePropertyName("histogram");
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs
index 99b8642e243..0a0e9676bcc 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs
@@ -219,4 +219,4 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteEndObject();
}
-}
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs
new file mode 100644
index 00000000000..65f216d2f17
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs
@@ -0,0 +1,505 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+internal sealed class DiversifiedSamplerAggregationConverter : JsonConverter
+{
+ public override DiversifiedSamplerAggregation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ if (reader.TokenType != JsonTokenType.StartObject)
+ throw new JsonException("Unexpected JSON detected.");
+ reader.Read();
+ var aggName = reader.GetString();
+ if (aggName != "diversified_sampler")
+ throw new JsonException("Unexpected JSON detected.");
+ var agg = new DiversifiedSamplerAggregation(aggName);
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("execution_hint"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.ExecutionHint = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("field"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Field = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("max_docs_per_value"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.MaxDocsPerValue = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("script"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Script = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("shard_size"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.ShardSize = value;
+ }
+
+ continue;
+ }
+ }
+ }
+
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("meta"))
+ {
+ var value = JsonSerializer.Deserialize>(ref reader, options);
+ if (value is not null)
+ {
+ agg.Meta = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("aggs") || reader.ValueTextEquals("aggregations"))
+ {
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Aggregations = value;
+ }
+
+ continue;
+ }
+ }
+ }
+
+ return agg;
+ }
+
+ public override void Write(Utf8JsonWriter writer, DiversifiedSamplerAggregation value, JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("diversified_sampler");
+ writer.WriteStartObject();
+ if (value.ExecutionHint is not null)
+ {
+ writer.WritePropertyName("execution_hint");
+ JsonSerializer.Serialize(writer, value.ExecutionHint, options);
+ }
+
+ if (value.Field is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, value.Field, options);
+ }
+
+ if (value.MaxDocsPerValue.HasValue)
+ {
+ writer.WritePropertyName("max_docs_per_value");
+ writer.WriteNumberValue(value.MaxDocsPerValue.Value);
+ }
+
+ if (value.Script is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, value.Script, options);
+ }
+
+ if (value.ShardSize.HasValue)
+ {
+ writer.WritePropertyName("shard_size");
+ writer.WriteNumberValue(value.ShardSize.Value);
+ }
+
+ writer.WriteEndObject();
+ if (value.Meta is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, value.Meta, options);
+ }
+
+ if (value.Aggregations is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, value.Aggregations, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(DiversifiedSamplerAggregationConverter))]
+public sealed partial class DiversifiedSamplerAggregation : SearchAggregation
+{
+ public DiversifiedSamplerAggregation(string name) => Name = name;
+
+ internal DiversifiedSamplerAggregation()
+ {
+ }
+
+ public Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? Aggregations { get; set; }
+ public Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? ExecutionHint { get; set; }
+ public Elastic.Clients.Elasticsearch.Field? Field { get; set; }
+ public int? MaxDocsPerValue { get; set; }
+ public IDictionary? Meta { get; set; }
+ override public string? Name { get; internal set; }
+ public Elastic.Clients.Elasticsearch.Script? Script { get; set; }
+ public int? ShardSize { get; set; }
+}
+
+public sealed partial class DiversifiedSamplerAggregationDescriptor : SerializableDescriptor>
+{
+ internal DiversifiedSamplerAggregationDescriptor(Action> configure) => configure.Invoke(this);
+
+ public DiversifiedSamplerAggregationDescriptor() : base()
+ {
+ }
+
+ private Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? AggregationsValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; }
+ private Action> AggregationsDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; }
+ private int? MaxDocsPerValueValue { get; set; }
+ private IDictionary? MetaValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; }
+ private int? ShardSizeValue { get; set; }
+
+ public DiversifiedSamplerAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations)
+ {
+ AggregationsDescriptor = null;
+ AggregationsDescriptorAction = null;
+ AggregationsValue = aggregations;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor descriptor)
+ {
+ AggregationsValue = null;
+ AggregationsDescriptorAction = null;
+ AggregationsDescriptor = descriptor;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Aggregations(Action> configure)
+ {
+ AggregationsValue = null;
+ AggregationsDescriptor = null;
+ AggregationsDescriptorAction = configure;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? executionHint)
+ {
+ ExecutionHintValue = executionHint;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? maxDocsPerValue)
+ {
+ MaxDocsPerValueValue = maxDocsPerValue;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Meta(Func, FluentDictionary> selector)
+ {
+ MetaValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script)
+ {
+ ScriptValue = script;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor ShardSize(int? shardSize)
+ {
+ ShardSizeValue = shardSize;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("diversified_sampler");
+ writer.WriteStartObject();
+ if (ExecutionHintValue is not null)
+ {
+ writer.WritePropertyName("execution_hint");
+ JsonSerializer.Serialize(writer, ExecutionHintValue, options);
+ }
+
+ if (FieldValue is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, FieldValue, options);
+ }
+
+ if (MaxDocsPerValueValue.HasValue)
+ {
+ writer.WritePropertyName("max_docs_per_value");
+ writer.WriteNumberValue(MaxDocsPerValueValue.Value);
+ }
+
+ if (ScriptValue is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, ScriptValue, options);
+ }
+
+ if (ShardSizeValue.HasValue)
+ {
+ writer.WritePropertyName("shard_size");
+ writer.WriteNumberValue(ShardSizeValue.Value);
+ }
+
+ writer.WriteEndObject();
+ if (MetaValue is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, MetaValue, options);
+ }
+
+ if (AggregationsDescriptor is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, AggregationsDescriptor, options);
+ }
+ else if (AggregationsDescriptorAction is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, new AggregationDescriptor(AggregationsDescriptorAction), options);
+ }
+ else if (AggregationsValue is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, AggregationsValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+public sealed partial class DiversifiedSamplerAggregationDescriptor : SerializableDescriptor
+{
+ internal DiversifiedSamplerAggregationDescriptor(Action configure) => configure.Invoke(this);
+
+ public DiversifiedSamplerAggregationDescriptor() : base()
+ {
+ }
+
+ private Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? AggregationsValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor AggregationsDescriptor { get; set; }
+ private Action AggregationsDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; }
+ private int? MaxDocsPerValueValue { get; set; }
+ private IDictionary? MetaValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; }
+ private int? ShardSizeValue { get; set; }
+
+ public DiversifiedSamplerAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDictionary? aggregations)
+ {
+ AggregationsDescriptor = null;
+ AggregationsDescriptorAction = null;
+ AggregationsValue = aggregations;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Aggregations(Elastic.Clients.Elasticsearch.Aggregations.AggregationDescriptor descriptor)
+ {
+ AggregationsValue = null;
+ AggregationsDescriptorAction = null;
+ AggregationsDescriptor = descriptor;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Aggregations(Action configure)
+ {
+ AggregationsValue = null;
+ AggregationsDescriptor = null;
+ AggregationsDescriptorAction = configure;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor ExecutionHint(Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? executionHint)
+ {
+ ExecutionHintValue = executionHint;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? maxDocsPerValue)
+ {
+ MaxDocsPerValueValue = maxDocsPerValue;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Meta(Func, FluentDictionary> selector)
+ {
+ MetaValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script)
+ {
+ ScriptValue = script;
+ return Self;
+ }
+
+ public DiversifiedSamplerAggregationDescriptor ShardSize(int? shardSize)
+ {
+ ShardSizeValue = shardSize;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("diversified_sampler");
+ writer.WriteStartObject();
+ if (ExecutionHintValue is not null)
+ {
+ writer.WritePropertyName("execution_hint");
+ JsonSerializer.Serialize(writer, ExecutionHintValue, options);
+ }
+
+ if (FieldValue is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, FieldValue, options);
+ }
+
+ if (MaxDocsPerValueValue.HasValue)
+ {
+ writer.WritePropertyName("max_docs_per_value");
+ writer.WriteNumberValue(MaxDocsPerValueValue.Value);
+ }
+
+ if (ScriptValue is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, ScriptValue, options);
+ }
+
+ if (ShardSizeValue.HasValue)
+ {
+ writer.WritePropertyName("shard_size");
+ writer.WriteNumberValue(ShardSizeValue.Value);
+ }
+
+ writer.WriteEndObject();
+ if (MetaValue is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, MetaValue, options);
+ }
+
+ if (AggregationsDescriptor is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, AggregationsDescriptor, options);
+ }
+ else if (AggregationsDescriptorAction is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, new AggregationDescriptor(AggregationsDescriptorAction), options);
+ }
+ else if (AggregationsValue is not null)
+ {
+ writer.WritePropertyName("aggregations");
+ JsonSerializer.Serialize(writer, AggregationsValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs
new file mode 100644
index 00000000000..e4ffb22ff65
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregate.g.cs
@@ -0,0 +1,39 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+///
+/// Result of a `geo_distance` aggregation. The unit for `from` and `to` is meters by default.
+///
+public sealed partial class GeoDistanceAggregate : IAggregate
+{
+ [JsonInclude, JsonPropertyName("buckets")]
+ public IReadOnlyCollection Buckets { get; init; }
+ [JsonInclude, JsonPropertyName("meta")]
+ public IReadOnlyDictionary? Meta { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs
new file mode 100644
index 00000000000..8d09308c1e0
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs
@@ -0,0 +1,621 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+internal sealed class GeoDistanceAggregationConverter : JsonConverter
+{
+ public override GeoDistanceAggregation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ if (reader.TokenType != JsonTokenType.StartObject)
+ throw new JsonException("Unexpected JSON detected.");
+ reader.Read();
+ var aggName = reader.GetString();
+ if (aggName != "geo_distance")
+ throw new JsonException("Unexpected JSON detected.");
+ var agg = new GeoDistanceAggregation(aggName);
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("distance_type"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.DistanceType = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("field"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Field = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("origin"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize