diff --git a/.ci/DockerFile b/.ci/DockerFile
index 39129427582..c0cfaa2750c 100644
--- a/.ci/DockerFile
+++ b/.ci/DockerFile
@@ -1,4 +1,4 @@
-ARG DOTNET_VERSION=6.0.300
+ARG DOTNET_VERSION=6.0.401
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
ARG USER_ID
diff --git a/.ci/make.sh b/.ci/make.sh
index 686ab41b67d..9172cf329a1 100755
--- a/.ci/make.sh
+++ b/.ci/make.sh
@@ -42,7 +42,7 @@ OUTPUT_DIR="$repo/${output_folder}"
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
mkdir -p "$OUTPUT_DIR"
-DOTNET_VERSION=${DOTNET_VERSION-6.0.300}
+DOTNET_VERSION=${DOTNET_VERSION-6.0.401}
echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
diff --git a/.ci/readme.md b/.ci/readme.md
index 08672c1802a..8c6c78c6ca6 100644
--- a/.ci/readme.md
+++ b/.ci/readme.md
@@ -30,7 +30,7 @@ $ STACK_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests
|-------------------------|-------------|-------------|
| `STACK_VERSION` | `N/A` | The elasticsearch version to target
| `TEST_SUITE` | `basic` | `free` or `platinum` sets which test suite to run and which container to run against. |
-| `DOTNET_VERSION` | `6.0.300` | The .NET sdk version used to grab the proper container |
+| `DOTNET_VERSION` | `6.0.401` | The .NET sdk version used to grab the proper container |
If you want to manually spin up elasticsearch for these tests and call the runner afterwards you can use
diff --git a/.ci/run-repository.ps1 b/.ci/run-repository.ps1
index c71508ed0e1..3d762cad534 100644
--- a/.ci/run-repository.ps1
+++ b/.ci/run-repository.ps1
@@ -14,7 +14,7 @@ param(
$NODE_NAME,
[string]
- $DOTNET_VERSION = "6.0.300"
+ $DOTNET_VERSION = "6.0.401"
)
$ESC = [char]27
diff --git a/.ci/run-repository.sh b/.ci/run-repository.sh
index f3e61291aa1..bb2e51afd85 100755
--- a/.ci/run-repository.sh
+++ b/.ci/run-repository.sh
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail
-DOTNET_VERSION=${DOTNET_VERSION-6.0.300}
+DOTNET_VERSION=${DOTNET_VERSION-6.0.401}
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
elasticsearch_container=${elasticsearch_container-}
diff --git a/.ci/run-tests.ps1 b/.ci/run-tests.ps1
index 8164b8fc236..9057f7b3b75 100644
--- a/.ci/run-tests.ps1
+++ b/.ci/run-tests.ps1
@@ -8,7 +8,7 @@ param (
$TEST_SUITE = "free",
[string]
- $DOTNET_VERSION = "6.0.300"
+ $DOTNET_VERSION = "6.0.401"
)
$ESC = [char]27
diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml
index d2e1ed3ad36..f9a850bee25 100755
--- a/.ci/test-matrix.yml
+++ b/.ci/test-matrix.yml
@@ -8,6 +8,6 @@ TEST_SUITE:
- platinum
DOTNET_VERSION:
- - 6.0.300
+ - 6.0.401
exclude: ~
diff --git a/.github/workflows/integration-jobs.yml b/.github/workflows/integration-jobs.yml
index 825080b8884..476d69b43f9 100644
--- a/.github/workflows/integration-jobs.yml
+++ b/.github/workflows/integration-jobs.yml
@@ -24,8 +24,9 @@ jobs:
stack_version: [
'8.1.3',
'8.2.3',
- '8.3.2',
- '8.4.0-SNAPSHOT',
+ '8.3.3',
+ '8.4.2',
+ '8.5.0-SNAPSHOT',
'latest-8'
]
@@ -34,7 +35,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
diff --git a/.github/workflows/make-bump.yml b/.github/workflows/make-bump.yml
index e911f801800..7d02b394441 100644
--- a/.github/workflows/make-bump.yml
+++ b/.github/workflows/make-bump.yml
@@ -35,7 +35,7 @@ jobs:
# Add version and backport labels automatically
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- name: Install dotnet-script
run: dotnet tool install release-notes --tool-path dotnet-tool
diff --git a/.github/workflows/make-release-notes.yml b/.github/workflows/make-release-notes.yml
index 84f6b1842a4..fd2acd38a8a 100644
--- a/.github/workflows/make-release-notes.yml
+++ b/.github/workflows/make-release-notes.yml
@@ -51,7 +51,7 @@ jobs:
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- name: Install dotnet-script
run: dotnet tool install release-notes --tool-path dotnet-tool
diff --git a/.github/workflows/stale-jobs.yml b/.github/workflows/stale-jobs.yml
index 1ad21d9bddd..b504f4f923b 100644
--- a/.github/workflows/stale-jobs.yml
+++ b/.github/workflows/stale-jobs.yml
@@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
diff --git a/.github/workflows/test-jobs.yml b/.github/workflows/test-jobs.yml
index 7c2b97d6666..8c5ba564574 100644
--- a/.github/workflows/test-jobs.yml
+++ b/.github/workflows/test-jobs.yml
@@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
@@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
diff --git a/.github/workflows/unified-release.yml b/.github/workflows/unified-release.yml
index 491790f30f8..54f6a2f57d6 100644
--- a/.github/workflows/unified-release.yml
+++ b/.github/workflows/unified-release.yml
@@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
- dotnet-version: '6.0.300'
+ dotnet-version: '6.0.401'
- run: "./.ci/make.sh assemble ${{ matrix.stack_version }}"
name: Assemble ${{ matrix.stack_version }}
\ No newline at end of file
diff --git a/benchmarks/Benchmarks/Benchmarks.csproj b/benchmarks/Benchmarks/Benchmarks.csproj
index f114ee0dc51..c0d9345a5d7 100644
--- a/benchmarks/Benchmarks/Benchmarks.csproj
+++ b/benchmarks/Benchmarks/Benchmarks.csproj
@@ -5,6 +5,8 @@
net6.0
enable
enable
+ True
+ $(SolutionRoot)\build\keys\keypair.snk
@@ -12,7 +14,7 @@
-
+
diff --git a/benchmarks/Benchmarks/Program.cs b/benchmarks/Benchmarks/Program.cs
index 804eee11019..0e1be799c90 100644
--- a/benchmarks/Benchmarks/Program.cs
+++ b/benchmarks/Benchmarks/Program.cs
@@ -8,10 +8,13 @@
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using Elastic.Clients.Elasticsearch;
+using Elastic.Clients.Elasticsearch.Enrich;
+using Elastic.Clients.Elasticsearch.QueryDsl;
using Elastic.Transport;
using Nest;
using System.Globalization;
using System.Text;
+using Policy = Elastic.Clients.Elasticsearch.Enrich.Policy;
var config = ManualConfig.Create(DefaultConfig.Instance);
config.SummaryStyle = new SummaryStyle(CultureInfo.CurrentCulture, true, BenchmarkDotNet.Columns.SizeUnit.B, null);
@@ -19,8 +22,141 @@
BenchmarkRunner.Run(config);
+//var thing = new Benchmarks.DescriptorValues();
+//thing.Setup();
+
+//var a = new EnrichPutPolicyRequestDescriptorV2("test");
+
+//a.Match(new Policy { Name = "test-name" });
+
+//var settings = new ElasticsearchClientSettings();
+//var serializer = new DefaultRequestResponseSerializer(settings);
+//var stream = new MemoryStream();
+
+//serializer.Serialize(a, stream);
+
+//stream.Position = 0;
+//var sr = new StreamReader(stream);
+//var result = sr.ReadToEnd();
+
+//Console.ReadKey();
+
namespace Benchmarks
{
+ //public class DescriptorValues
+ //{
+ // private EnrichPutPolicyRequestDescriptor? _data1;
+ // private EnrichPutPolicyRequestDescriptorV2? _data2;
+ // private EnrichPutPolicyRequestDescriptorV3? _data3;
+ // private EnrichPutPolicyRequestDescriptorV4? _data4;
+
+ // //private Existing? _basicData1;
+ // //private NewV1? _basicData2;
+ // //private NewV2? _basicData3;
+
+ // private readonly EnrichPutPolicyRequestDescriptor _existing = new("test");
+ // private readonly EnrichPutPolicyRequestDescriptorV2 _newV1 = new("test");
+ // private readonly EnrichPutPolicyRequestDescriptorV3 _newV2 = new("test");
+ // private readonly EnrichPutPolicyRequestDescriptorV4 _newV3 = new("test");
+ // private readonly Policy? _policy = new() { Name = "TEST" };
+
+ // private readonly EnrichPutPolicyRequestDescriptor _serializableExisting = new("test");
+ // private readonly EnrichPutPolicyRequestDescriptorV2 _serializableNewV1 = new("test");
+ // private readonly EnrichPutPolicyRequestDescriptorV3 _serializableNewV2 = new("test");
+ // private readonly EnrichPutPolicyRequestDescriptorV4 _serializableNewV3 = new("test");
+
+ // private static readonly ElasticsearchClientSettings Settings = new();
+
+ // private readonly DefaultRequestResponseSerializer _serializer = new(Settings);
+ // private readonly MemoryStream _stream = new();
+
+ // [GlobalSetup]
+ // public void Setup()
+ // {
+ // _serializableExisting.GeoMatch(_policy);
+ // _serializableNewV1.GeoMatch(_policy);
+ // _serializableNewV2.GeoMatch(_policy);
+ // _serializableNewV3.GeoMatch(_policy);
+ // }
+
+ // [Benchmark]
+ // public void Existing() => _data1 = new EnrichPutPolicyRequestDescriptor("name");
+
+ // [Benchmark]
+ // public void NewV1() => _data2 = new EnrichPutPolicyRequestDescriptorV2("name");
+
+ // [Benchmark]
+ // public void NewV2() => _data3 = new EnrichPutPolicyRequestDescriptorV3("name");
+
+ // [Benchmark]
+ // public void NewV3() => _data4 = new EnrichPutPolicyRequestDescriptorV4("name");
+
+ // //[Benchmark]
+ // //public void Existing() => _basicData1 = new Existing();
+
+ // //[Benchmark]
+ // //public void NewV1() => _basicData2 = new NewV1();
+
+ // //[Benchmark]
+ // //public void NewV2() => _basicData3 = new NewV2();
+
+ // [Benchmark]
+ // public void SetExisting() => _existing.GeoMatch(_policy);
+
+ // [Benchmark]
+ // public void SetNewV1() => _newV1.GeoMatch(_policy);
+
+ // [Benchmark]
+ // public void SetNewV2() => _newV2.GeoMatch(_policy);
+
+ // [Benchmark]
+ // public void SetNewV3() => _newV3.GeoMatch(_policy);
+
+ // [Benchmark]
+ // public void SerialiseExisting()
+ // {
+ // _stream.Position = 0;
+ // _serializer.Serialize(_serializableExisting, _stream);
+ // }
+
+ // [Benchmark]
+ // public void SerialiseNewV1()
+ // {
+ // _stream.Position = 0;
+ // _serializer.Serialize(_serializableNewV1, _stream);
+ // }
+
+ // [Benchmark]
+ // public void SerialiseNewV2()
+ // {
+ // _stream.Position = 0;
+ // _serializer.Serialize(_serializableNewV2, _stream);
+ // }
+
+ // [Benchmark]
+ // public void SerialiseNewV3()
+ // {
+ // _stream.Position = 0;
+ // _serializer.Serialize(_serializableNewV3, _stream);
+ // }
+ //}
+
+ // RESULT OF ABOVE:
+ //| Method | Mean [ns] | Error [ns] | StdDev [ns] | Gen 0 | Gen 1 | Allocated [B] |
+ //|------------------ |-----------:|-----------:|------------:|-------:|-------:|--------------:|
+ //| Existing | 116.408 ns | 2.1955 ns | 2.1563 ns | 0.0942 | 0.0002 | 592 B |
+ //| NewV1 | 113.021 ns | 1.8475 ns | 1.8145 ns | 0.0943 | 0.0004 | 592 B |
+ //| NewV2 | 115.728 ns | 2.2291 ns | 2.0851 ns | 0.0905 | 0.0002 | 568 B |
+ //| NewV3 | 112.813 ns | 2.2198 ns | 3.1118 ns | 0.0867 | 0.0002 | 544 B |
+ //| SetExisting | 1.688 ns | 0.0384 ns | 0.0340 ns | - | - | - |
+ //| SetNewV1 | 2.200 ns | 0.0232 ns | 0.0217 ns | - | - | - |
+ //| SetNewV2 | 2.555 ns | 0.0289 ns | 0.0256 ns | - | - | - |
+ //| SetNewV3 | 1.691 ns | 0.0306 ns | 0.0286 ns | - | - | - |
+ //| SerialiseExisting | 461.120 ns | 9.0066 ns | 8.4248 ns | 0.0687 | - | 432 B |
+ //| SerialiseNewV1 | 472.239 ns | 8.4655 ns | 7.9186 ns | 0.0687 | - | 432 B |
+ //| SerialiseNewV2 | 476.059 ns | 9.2350 ns | 10.2647 ns | 0.0687 | - | 432 B |
+ //| SerialiseNewV3 | 483.717 ns | 9.5424 ns | 8.9260 ns | 0.0687 | - | 432 B |
+
public class BulkIngest
{
//private static readonly List Data = Enumerable.Range(0, 100).Select(r => new SampleData()).ToList();
diff --git a/benchmarks/Benchmarks/packages.lock.json b/benchmarks/Benchmarks/packages.lock.json
index 06f81800304..4cc00c45b55 100644
--- a/benchmarks/Benchmarks/packages.lock.json
+++ b/benchmarks/Benchmarks/packages.lock.json
@@ -1137,7 +1137,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
}
diff --git a/benchmarks/Profiling/packages.lock.json b/benchmarks/Profiling/packages.lock.json
index 594338a452e..531acdead53 100644
--- a/benchmarks/Profiling/packages.lock.json
+++ b/benchmarks/Profiling/packages.lock.json
@@ -73,7 +73,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
}
diff --git a/global.json b/global.json
index ab66ae85548..4dda5aae60d 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "6.0.300",
+ "version": "6.0.401",
"rollForward": "minor",
"allowPrerelease": false
},
diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json
index 2273acc692d..39e35a26455 100644
--- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json
+++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json
@@ -105,7 +105,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
},
@@ -256,7 +256,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
},
@@ -516,9 +516,9 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2",
- "System.Reflection.Emit": "4.3.0",
- "System.Reflection.Emit.Lightweight": "4.3.0"
+ "Elastic.Transport": "[0.3.2, )",
+ "System.Reflection.Emit": "[4.3.0, )",
+ "System.Reflection.Emit.Lightweight": "[4.3.0, )"
}
}
},
@@ -660,7 +660,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
},
@@ -762,7 +762,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
},
@@ -864,7 +864,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
- "Elastic.Transport": "0.3.2"
+ "Elastic.Transport": "[0.3.2, )"
}
}
}
diff --git a/src/Elastic.Clients.Elasticsearch/Common/Infer/Field/Field.cs b/src/Elastic.Clients.Elasticsearch/Common/Infer/Field/Field.cs
index 8fbfbab995b..86e622fde8a 100644
--- a/src/Elastic.Clients.Elasticsearch/Common/Infer/Field/Field.cs
+++ b/src/Elastic.Clients.Elasticsearch/Common/Infer/Field/Field.cs
@@ -74,7 +74,7 @@ public Field(PropertyInfo property, double? boost = null, string format = null)
public string? Format { get; set; }
[JsonIgnore]
- public bool CachableExpression { get; }
+ internal bool CachableExpression { get; }
///
/// An expression from which the name of the field can be inferred
diff --git a/src/Elastic.Clients.Elasticsearch/Common/Query/Query.cs b/src/Elastic.Clients.Elasticsearch/Common/Query/Query.cs
index 550cd2a128b..6320a2b7ced 100644
--- a/src/Elastic.Clients.Elasticsearch/Common/Query/Query.cs
+++ b/src/Elastic.Clients.Elasticsearch/Common/Query/Query.cs
@@ -3,54 +3,628 @@
// See the LICENSE file in the project root for more information.
using System;
-using System.Text.Json.Serialization;
+using System.IO;
+using System.Text.Json;
+using System.Text.RegularExpressions;
+using Elastic.Clients.Elasticsearch.Enrich;
+using Elastic.Transport;
namespace Elastic.Clients.Elasticsearch.QueryDsl
{
- public interface IQuery
- {
- ///
- /// Provides a boost to this query to influence its relevance score.
- /// For example, a query with a boost of 2 is twice as important as a query with a boost of 1,
- /// although the actual boost value that is applied undergoes normalization and internal optimization.
- ///
- //float? Boost { get; set; } // Was defined as a double before the code gen work
-
- /////
- ///// Whether the query is conditionless. A conditionless query is not serialized as part of the request
- ///// sent to Elasticsearch.
- /////
- //[JsonIgnore]
- //bool Conditionless { get; }
+ //public interface IQuery
+ //{
+ // ///
+ // /// Provides a boost to this query to influence its relevance score.
+ // /// For example, a query with a boost of 2 is twice as important as a query with a boost of 1,
+ // /// although the actual boost value that is applied undergoes normalization and internal optimization.
+ // ///
+ // //float? Boost { get; set; } // Was defined as a double before the code gen work
- /////
- ///// Whether the query should be treated as strict. A strict query will throw an exception when serialized
- ///// if it is .
- /////
- //[JsonIgnore]
- //bool IsStrict { get; set; }
+ // /////
+ // ///// Whether the query is conditionless. A conditionless query is not serialized as part of the request
+ // ///// sent to Elasticsearch.
+ // /////
+ // //[JsonIgnore]
+ // //bool Conditionless { get; }
- /////
- ///// Whether the query should be treated as verbatim. A verbatim query will be serialized as part of the request,
- ///// irrespective
- ///// of whether it is or not.
- /////
- //[JsonIgnore]
- //bool IsVerbatim { get; set; }
+ // /////
+ // ///// Whether the query should be treated as strict. A strict query will throw an exception when serialized
+ // ///// if it is .
+ // /////
+ // //[JsonIgnore]
+ // //bool IsStrict { get; set; }
- ///
- /// Whether the query should be treated as writable. Used when determining how to combine queries.
- ///
- //[JsonIgnore]
- //bool IsWritable { get; }
+ // /////
+ // ///// Whether the query should be treated as verbatim. A verbatim query will be serialized as part of the request,
+ // ///// irrespective
+ // ///// of whether it is or not.
+ // /////
+ // //[JsonIgnore]
+ // //bool IsVerbatim { get; set; }
- ///
- /// The name of the query. Allows you to retrieve for each document what part of the query it matched on.
- ///
- //string Name { get; set; }
- }
+ // ///
+ // /// Whether the query should be treated as writable. Used when determining how to combine queries.
+ // ///
+ // //[JsonIgnore]
+ // //bool IsWritable { get; }
+
+ // ///
+ // /// The name of the query. Allows you to retrieve for each document what part of the query it matched on.
+ // ///
+ // //string Name { get; set; }
+ //}
+
+ //internal interface IFieldNameQueryDescriptor where T : Descriptor
+ //{
+ // T Field(Field field);
+ //}
+
+ //public partial class QueryContainerDescriptor
+ //{
+ // private void Set(Action> descriptorAction, string variantName)
+ // where T : Descriptor, IFieldNameQueryDescriptor
+ // {
+ // if (ContainsVariant)
+ // throw new Exception("TODO");
+ // ContainedVariantName = variantName;
+ // ContainsVariant = true;
+ // DescriptorType = typeof(T);
+ // var descriptor = (T)Activator.CreateInstance(typeof(T), true);
+ // descriptorAction?.Invoke(descriptor);
+ // Descriptor = descriptor;
+ // }
+
+ // private void Set(Field field, Action> descriptorAction, string variantName)
+ // where T : Descriptor, IFieldNameQueryDescriptor
+ // {
+ // if (ContainsVariant)
+ // throw new Exception("TODO");
+ // ContainedVariantName = variantName;
+ // ContainsVariant = true;
+ // DescriptorType = typeof(T);
+ // var descriptor = (T)Activator.CreateInstance(typeof(T), true);
+ // descriptor.Field(field);
+ // descriptorAction?.Invoke(descriptor);
+ // Descriptor = descriptor;
+ // }
+ //}
+
+ // Leaving descriptor value experiments for future pick up work
+
+ // RESULT OF EXPERIMENTS:
+ //| Method | Mean [ns] | Error [ns] | StdDev [ns] | Gen 0 | Gen 1 | Allocated [B] |
+ //|------------------ |-----------:|-----------:|------------:|-------:|-------:|--------------:|
+ //| Existing | 116.408 ns | 2.1955 ns | 2.1563 ns | 0.0942 | 0.0002 | 592 B |
+ //| NewV1 | 113.021 ns | 1.8475 ns | 1.8145 ns | 0.0943 | 0.0004 | 592 B |
+ //| NewV2 | 115.728 ns | 2.2291 ns | 2.0851 ns | 0.0905 | 0.0002 | 568 B |
+ //| NewV3 | 112.813 ns | 2.2198 ns | 3.1118 ns | 0.0867 | 0.0002 | 544 B |
+ //| SetExisting | 1.688 ns | 0.0384 ns | 0.0340 ns | - | - | - |
+ //| SetNewV1 | 2.200 ns | 0.0232 ns | 0.0217 ns | - | - | - |
+ //| SetNewV2 | 2.555 ns | 0.0289 ns | 0.0256 ns | - | - | - |
+ //| SetNewV3 | 1.691 ns | 0.0306 ns | 0.0286 ns | - | - | - |
+ //| SerialiseExisting | 461.120 ns | 9.0066 ns | 8.4248 ns | 0.0687 | - | 432 B |
+ //| SerialiseNewV1 | 472.239 ns | 8.4655 ns | 7.9186 ns | 0.0687 | - | 432 B |
+ //| SerialiseNewV2 | 476.059 ns | 9.2350 ns | 10.2647 ns | 0.0687 | - | 432 B |
+ //| SerialiseNewV3 | 483.717 ns | 9.5424 ns | 8.9260 ns | 0.0687 | - | 432 B |
+
+ // We can save 16 bytes per descriptor property (when those properties themselves support descriptors).
+ // We would need to consider cases for types which do not have a descriptor and if we continue with a raw value property directly.
+ // This is probably the best choice. Performance for setting and serialising is generally on par. Serialisation for V3 is slower so
+ // is a trade off with the allocation reduction. Inlining may help there?
+
+ //public sealed class Existing
+ //{
+ // private Elastic.Clients.Elasticsearch.Enrich.Policy? GeoMatchValue { get; set; }
+ // private PolicyDescriptor GeoMatchDescriptor { get; set; }
+ // private Action> GeoMatchDescriptorAction { get; set; }
+ // private Elastic.Clients.Elasticsearch.Enrich.Policy? MatchValue { get; set; }
+ // private PolicyDescriptor MatchDescriptor { get; set; }
+ // private Action> MatchDescriptorAction { get; set; }
+ // private Elastic.Clients.Elasticsearch.Enrich.Policy? RangeValue { get; set; }
+ // private PolicyDescriptor RangeDescriptor { get; set; }
+ // private Action> RangeDescriptorAction { get; set; }
+ //}
+
+ //public sealed class NewV1
+ //{
+ // private DescriptorValue> GeoMatchValue { get; set; }
+ // private DescriptorValue> MatchValue { get; set; }
+ // private DescriptorValue> RangeValue { get; set; }
+ //}
+
+ //public sealed class NewV2
+ //{
+ // private DescriptorValueV2> GeoMatchValue { get; set; }
+ // private DescriptorValueV2> MatchValue { get; set; }
+ // private DescriptorValueV2> RangeValue { get; set; }
+ //}
+
+ //public sealed partial class EnrichPutPolicyRequestDescriptorV2 : RequestDescriptorBase, EnrichPutPolicyRequestParameters>
+ //{
+ // internal EnrichPutPolicyRequestDescriptorV2(Action> configure) => configure.Invoke(this);
+
+ // public EnrichPutPolicyRequestDescriptorV2(Name name) : base(r => r.Required("name", name))
+ // {
+ // }
+
+ // internal EnrichPutPolicyRequestDescriptorV2()
+ // {
+ // }
+
+ // internal override ApiUrls ApiUrls => ApiUrlsLookups.EnrichPutPolicy;
+ // protected override HttpMethod HttpMethod => HttpMethod.PUT;
+ // protected override bool SupportsBody => true;
+
+ // public EnrichPutPolicyRequestDescriptorV2 Name(Name name)
+ // {
+ // RouteValues.Required("name", name);
+ // return Self;
+ // }
+
+ // private DescriptorValue> GeoMatchValue { get; set; } = default;
+ // private DescriptorValue> MatchValue { get; set; } = default;
+ // private DescriptorValue> RangeValue { get; set; } = default;
+
+ // public EnrichPutPolicyRequestDescriptorV2 GeoMatch(Policy? geoMatch)
+ // {
+ // GeoMatchValue = DescriptorValue>.Create(geoMatch);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 GeoMatch(PolicyDescriptor descriptor)
+ // {
+ // GeoMatchValue = DescriptorValue>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 GeoMatch(Action> configure)
+ // {
+ // GeoMatchValue = DescriptorValue>.Create(configure);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 Match(Policy? match)
+ // {
+ // MatchValue = DescriptorValue>.Create(match);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 Match(PolicyDescriptor descriptor)
+ // {
+ // MatchValue = DescriptorValue>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 Match(Action> configure)
+ // {
+ // MatchValue = DescriptorValue>.Create(configure);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 Range(Policy? range)
+ // {
+ // RangeValue = DescriptorValue>.Create(range);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 Range(PolicyDescriptor descriptor)
+ // {
+ // RangeValue = DescriptorValue>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV2 Range(Action> configure)
+ // {
+ // RangeValue = DescriptorValue>.Create(configure);
+ // return Self;
+ // }
+
+ // protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ // {
+ // writer.WriteStartObject();
+ // GeoMatchValue.Serialize("geo_match", writer, options);
+ // MatchValue.Serialize("match", writer, options);
+ // RangeValue.Serialize("range", writer, options);
+ // writer.WriteEndObject();
+ // }
+ //}
+
+ //public sealed partial class EnrichPutPolicyRequestDescriptorV3 : RequestDescriptorBase, EnrichPutPolicyRequestParameters>
+ //{
+ // internal EnrichPutPolicyRequestDescriptorV3(Action> configure) => configure.Invoke(this);
+
+ // public EnrichPutPolicyRequestDescriptorV3(Name name) : base(r => r.Required("name", name))
+ // {
+ // }
+
+ // internal EnrichPutPolicyRequestDescriptorV3()
+ // {
+ // }
+
+ // internal override ApiUrls ApiUrls => ApiUrlsLookups.EnrichPutPolicy;
+ // protected override HttpMethod HttpMethod => HttpMethod.PUT;
+ // protected override bool SupportsBody => true;
+
+ // public EnrichPutPolicyRequestDescriptorV3 Name(Name name)
+ // {
+ // RouteValues.Required("name", name);
+ // return Self;
+ // }
+
+ // private DescriptorValueV2> GeoMatchValue { get; set; } = default;
+ // private DescriptorValueV2> MatchValue { get; set; } = default;
+ // private DescriptorValueV2> RangeValue { get; set; } = default;
+
+ // public EnrichPutPolicyRequestDescriptorV3 GeoMatch(Policy? geoMatch)
+ // {
+ // GeoMatchValue = DescriptorValueV2>.Create(geoMatch);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 GeoMatch(PolicyDescriptor descriptor)
+ // {
+ // GeoMatchValue = DescriptorValueV2>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 GeoMatch(Action> configure)
+ // {
+ // GeoMatchValue = DescriptorValueV2>.Create(configure);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 Match(Policy? match)
+ // {
+ // MatchValue = DescriptorValueV2>.Create(match);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 Match(PolicyDescriptor descriptor)
+ // {
+ // MatchValue = DescriptorValueV2>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 Match(Action> configure)
+ // {
+ // MatchValue = DescriptorValueV2>.Create(configure);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 Range(Policy? range)
+ // {
+ // RangeValue = DescriptorValueV2>.Create(range);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 Range(PolicyDescriptor descriptor)
+ // {
+ // RangeValue = DescriptorValueV2>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV3 Range(Action> configure)
+ // {
+ // RangeValue = DescriptorValueV2>.Create(configure);
+ // return Self;
+ // }
+
+ // protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ // {
+ // writer.WriteStartObject();
+ // GeoMatchValue.Serialize("geo_match", writer, options);
+ // MatchValue.Serialize("geo_match", writer, options);
+ // RangeValue.Serialize("geo_match", writer, options);
+ // writer.WriteEndObject();
+ // }
+ //}
+
+ //public sealed partial class EnrichPutPolicyRequestDescriptorV4 : RequestDescriptorBase, EnrichPutPolicyRequestParameters>
+ //{
+ // internal EnrichPutPolicyRequestDescriptorV4(Action> configure) => configure.Invoke(this);
+
+ // public EnrichPutPolicyRequestDescriptorV4(Name name) : base(r => r.Required("name", name))
+ // {
+ // }
+
+ // internal EnrichPutPolicyRequestDescriptorV4()
+ // {
+ // }
+
+ // internal override ApiUrls ApiUrls => ApiUrlsLookups.EnrichPutPolicy;
+ // protected override HttpMethod HttpMethod => HttpMethod.PUT;
+ // protected override bool SupportsBody => true;
+
+ // public EnrichPutPolicyRequestDescriptorV4 Name(Name name)
+ // {
+ // RouteValues.Required("name", name);
+ // return Self;
+ // }
+
+ // private DescriptorValueV3> GeoMatchValue { get; set; } = default;
+ // private DescriptorValueV3> MatchValue { get; set; } = default;
+ // private DescriptorValueV3> RangeValue { get; set; } = default;
+
+ // public EnrichPutPolicyRequestDescriptorV4 GeoMatch(Policy? geoMatch)
+ // {
+ // GeoMatchValue = DescriptorValueV3>.Create(geoMatch);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 GeoMatch(PolicyDescriptor descriptor)
+ // {
+ // GeoMatchValue = DescriptorValueV3>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 GeoMatch(Action> configure)
+ // {
+ // GeoMatchValue = DescriptorValueV3>.Create(configure);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 Match(Policy? match)
+ // {
+ // MatchValue = DescriptorValueV3>.Create(match);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 Match(PolicyDescriptor descriptor)
+ // {
+ // MatchValue = DescriptorValueV3>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 Match(Action> configure)
+ // {
+ // MatchValue = DescriptorValueV3>.Create(configure);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 Range(Policy? range)
+ // {
+ // RangeValue = DescriptorValueV3>.Create(range);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 Range(PolicyDescriptor descriptor)
+ // {
+ // RangeValue = DescriptorValueV3>.Create(descriptor);
+ // return Self;
+ // }
+
+ // public EnrichPutPolicyRequestDescriptorV4 Range(Action> configure)
+ // {
+ // RangeValue = DescriptorValueV3>.Create(configure);
+ // return Self;
+ // }
+
+ // protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ // {
+ // writer.WriteStartObject();
+ // GeoMatchValue.Serialize("geo_match", writer, options);
+ // MatchValue.Serialize("geo_match", writer, options);
+ // RangeValue.Serialize("geo_match", writer, options);
+ // writer.WriteEndObject();
+ // }
+ //}
+
+ //internal readonly struct DescriptorValue
+ // where TDescriptor : Descriptor
+ //{
+ // private readonly TObject? _object;
+ // private readonly TDescriptor? _descriptor;
+ // private readonly Action? _descriptorAction;
+ // //private bool _isSet;
+
+ // private DescriptorValue(TObject value)
+ // {
+ // _descriptor = null;
+ // _descriptorAction = null;
+ // _object = value;
+ // }
+
+ // private DescriptorValue(TDescriptor value)
+ // {
+ // _descriptor = value;
+ // _descriptorAction = null;
+ // _object = default;
+ // }
+
+ // private DescriptorValue(Action value)
+ // {
+ // _descriptor = null;
+ // _descriptorAction = value;
+ // _object = default;
+ // }
+
+ // public static DescriptorValue Create(TObject value)
+ // => value switch
+ // {
+ // null => default,
+ // _ => new(value)
+ // };
+
+ // public static DescriptorValue Create(TDescriptor descriptor)
+ // => descriptor switch
+ // {
+ // null => default,
+ // _ => new(descriptor)
+ // };
+
+ // public static DescriptorValue Create(Action action)
+ // => action switch
+ // {
+ // null => default,
+ // _ => new(action)
+ // };
+
+ // public void Serialize(string propertyName, Utf8JsonWriter writer, JsonSerializerOptions options)
+ // {
+ // // We could include a ctor taking propertyName so we set it when initialising the property on descriptors?
+
+ // //if (!_isSet)
+ // // return;
+
+ // //writer.WritePropertyName(propertyName);
+
+ // // Benchmark using a integer flag to know which value is set so we can avoid the null checks which "might" be faster.
+
+ // if (_object is not null)
+ // {
+ // writer.WritePropertyName(propertyName);
+ // JsonSerializer.Serialize(writer, _object, options);
+ // }
+ // else if (_descriptor is not null)
+ // {
+ // writer.WritePropertyName(propertyName);
+ // JsonSerializer.Serialize(writer, _descriptor, options);
+ // }
+ // else if (_descriptorAction is not null)
+ // {
+ // writer.WritePropertyName(propertyName);
+ // var descriptor = (TDescriptor)Activator.CreateInstance(typeof(TDescriptor), true);
+ // _descriptorAction?.Invoke(descriptor);
+ // JsonSerializer.Serialize(writer, descriptor, options);
+ // }
+ // }
+ //}
+
+ //internal readonly struct DescriptorValueV2
+ // where TDescriptor : Descriptor
+ //{
+ // private readonly object? _object;
+ // private readonly int _containedValueType;
+
+ // private DescriptorValueV2(TObject value)
+ // {
+ // _object = value;
+ // _containedValueType = value is null ? 0 : 1;
+ // }
+
+ // private DescriptorValueV2(TDescriptor value)
+ // {
+ // _object = value;
+ // _containedValueType = value is null ? 0 : 2;
+ // }
+
+ // private DescriptorValueV2(Action value)
+ // {
+ // _object = value;
+ // _containedValueType = value is null ? 0 : 3;
+ // }
+
+ // public static DescriptorValueV2 Create(TObject value)
+ // => value switch
+ // {
+ // null => default,
+ // _ => new(value)
+ // };
+
+ // public static DescriptorValueV2 Create(TDescriptor descriptor)
+ // => descriptor switch
+ // {
+ // null => default,
+ // _ => new(descriptor)
+ // };
+
+ // public static DescriptorValueV2 Create(Action action)
+ // => action switch
+ // {
+ // null => default,
+ // _ => new(action)
+ // };
+
+ // public void Serialize(string propertyName, Utf8JsonWriter writer, JsonSerializerOptions options)
+ // {
+ // // We could include a ctor taking propertyName so we set it when initialising the property on descriptors?
+
+ // if (_containedValueType == 0)
+ // return;
+
+ // writer.WritePropertyName(propertyName);
+
+ // // Benchmark using a integer flag to know which value is set so we can avoid the null checks which "might" be faster.
+
+ // switch (_containedValueType)
+ // {
+ // case 1:
+ // JsonSerializer.Serialize(writer, (TObject)_object, options);
+ // break;
+ // case 2:
+ // JsonSerializer.Serialize(writer, (TDescriptor)_object, options);
+ // break;
+ // case 3:
+ // var descriptor = (TDescriptor)Activator.CreateInstance(typeof(TDescriptor), true);
+ // ((Action)_object)?.Invoke(descriptor);
+ // JsonSerializer.Serialize(writer, descriptor, options);
+ // break;
+ // }
+ // }
+ //}
+
+ //internal readonly struct DescriptorValueV3
+ // where TDescriptor : Descriptor
+ //{
+ // private readonly object? _object;
+ // // removing the int reduces the footprint but forces the use of type checking to perform operations
+
+ // private DescriptorValueV3(TObject value) => _object = value;
+
+ // private DescriptorValueV3(TDescriptor value) => _object = value;
+
+ // private DescriptorValueV3(Action value) => _object = value;
+
+ // public static DescriptorValueV3 Create(TObject value)
+ // => value switch
+ // {
+ // null => default,
+ // _ => new(value)
+ // };
+
+ // public static DescriptorValueV3 Create(TDescriptor descriptor)
+ // => descriptor switch
+ // {
+ // null => default,
+ // _ => new(descriptor)
+ // };
+
+ // public static DescriptorValueV3 Create(Action action)
+ // => action switch
+ // {
+ // null => default,
+ // _ => new(action)
+ // };
+
+ // public void Serialize(string propertyName, Utf8JsonWriter writer, JsonSerializerOptions options)
+ // {
+ // // We could include a ctor taking propertyName so we set it when initialising the property on descriptors?
+
+ // if (_object is null)
+ // return;
+
+ // writer.WritePropertyName(propertyName);
+
+ // // Benchmark using a integer flag to know which value is set so we can avoid the null checks which "might" be faster.
+
+ // if (_object is TObject value)
+ // {
+ // JsonSerializer.Serialize(writer, value, options);
+ // }
+ // else if (_object is TDescriptor descriptor)
+ // {
+ // JsonSerializer.Serialize(writer, descriptor, options);
+ // }
+ // else
+ // {
+ // var d = (TDescriptor)Activator.CreateInstance(typeof(TDescriptor), true);
+ // ((Action)_object)?.Invoke(d);
+ // JsonSerializer.Serialize(writer, d, options);
+ // }
+ // }
+ //}
- public abstract partial class Query : IQuery
+ public abstract partial class Query //: IQuery
{
//[JsonIgnore]
//public bool IsWritable => throw new NotImplementedException();
diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
index 877361099ae..3504e0d01b6 100644
--- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
+++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj
@@ -28,6 +28,7 @@
+
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs
index 6972c88dfbb..98b93dba421 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs
@@ -156,9 +156,6 @@ internal static class ApiUrlsLookups
internal static ApiUrls LicensePostStartTrial = new ApiUrls(new[] { "/_license/start_trial" });
internal static ApiUrls LogstashDeletePipeline = new ApiUrls(new[] { "/_logstash/pipeline/{id}" });
internal static ApiUrls LogstashPutPipeline = new ApiUrls(new[] { "/_logstash/pipeline/{id}" });
- internal static ApiUrls MigrationDeprecations = new ApiUrls(new[] { "/_migration/deprecations", "/{index}/_migration/deprecations" });
- internal static ApiUrls MigrationGetFeatureUpgradeStatus = new ApiUrls(new[] { "/_migration/system_features" });
- internal static ApiUrls MigrationPostFeatureUpgrade = new ApiUrls(new[] { "/_migration/system_features" });
internal static ApiUrls MachineLearningCloseJob = new ApiUrls(new[] { "/_ml/anomaly_detectors/{job_id}/_close" });
internal static ApiUrls MachineLearningDeleteCalendarEvent = new ApiUrls(new[] { "/_ml/calendars/{calendar_id}/events/{event_id}" });
internal static ApiUrls MachineLearningDeleteCalendar = new ApiUrls(new[] { "/_ml/calendars/{calendar_id}" });
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs
index f285242daa0..7ff17265fda 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs
@@ -154,6 +154,12 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty
continue;
}
+ if (property == "ext")
+ {
+ variant.Ext = JsonSerializer.Deserialize?>(ref reader, options);
+ continue;
+ }
+
if (property == "from")
{
variant.From = JsonSerializer.Deserialize(ref reader, options);
@@ -306,7 +312,7 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty
if (property == "runtime_mappings")
{
- variant.RuntimeMappings = JsonSerializer.Deserialize>?>(ref reader, options);
+ variant.RuntimeMappings = JsonSerializer.Deserialize?>(ref reader, options);
continue;
}
@@ -342,6 +348,12 @@ public override void Write(Utf8JsonWriter writer, AsyncSearchSubmitRequest value
writer.WriteBooleanValue(value.Explain.Value);
}
+ if (value.Ext is not null)
+ {
+ writer.WritePropertyName("ext");
+ JsonSerializer.Serialize(writer, value.Ext, options);
+ }
+
if (value.From.HasValue)
{
writer.WritePropertyName("from");
@@ -630,6 +642,10 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices)
[JsonPropertyName("explain")]
public bool? Explain { get; set; }
+ [JsonInclude]
+ [JsonPropertyName("ext")]
+ public Dictionary? Ext { get; set; }
+
[JsonInclude]
[JsonPropertyName("from")]
public int? From { get; set; }
@@ -733,7 +749,7 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices)
[JsonInclude]
[JsonPropertyName("runtime_mappings")]
- public Dictionary>? RuntimeMappings { get; set; }
+ public Dictionary? RuntimeMappings { get; set; }
[JsonInclude]
[JsonPropertyName("stats")]
@@ -859,6 +875,8 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela
private bool? ExplainValue { get; set; }
+ private Dictionary? ExtValue { get; set; }
+
private int? FromValue { get; set; }
private IEnumerable>? IndicesBoostValue { get; set; }
@@ -873,7 +891,7 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela
private bool? ProfileValue { get; set; }
- private Dictionary>? RuntimeMappingsValue { get; set; }
+ private Dictionary? RuntimeMappingsValue { get; set; }
private Dictionary? ScriptFieldsValue { get; set; }
@@ -1169,6 +1187,12 @@ public AsyncSearchSubmitRequestDescriptor Explain(bool? explain = tru
return Self;
}
+ public AsyncSearchSubmitRequestDescriptor Ext(Func, FluentDictionary> selector)
+ {
+ ExtValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
public AsyncSearchSubmitRequestDescriptor From(int? from)
{
FromValue = from;
@@ -1217,9 +1241,9 @@ public AsyncSearchSubmitRequestDescriptor Profile(bool? profile = tru
return Self;
}
- public AsyncSearchSubmitRequestDescriptor RuntimeMappings(Func>, FluentDictionary>> selector)
+ public AsyncSearchSubmitRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
{
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>());
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
return Self;
}
@@ -1529,6 +1553,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteBooleanValue(ExplainValue.Value);
}
+ if (ExtValue is not null)
+ {
+ writer.WritePropertyName("ext");
+ JsonSerializer.Serialize(writer, ExtValue, options);
+ }
+
if (FromValue.HasValue)
{
writer.WritePropertyName("from");
@@ -1779,6 +1809,8 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch.
private bool? ExplainValue { get; set; }
+ private Dictionary? ExtValue { get; set; }
+
private int? FromValue { get; set; }
private IEnumerable>? IndicesBoostValue { get; set; }
@@ -1793,7 +1825,7 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch.
private bool? ProfileValue { get; set; }
- private Dictionary>? RuntimeMappingsValue { get; set; }
+ private Dictionary? RuntimeMappingsValue { get; set; }
private Dictionary? ScriptFieldsValue { get; set; }
@@ -2089,6 +2121,12 @@ public AsyncSearchSubmitRequestDescriptor Explain(bool? explain = true)
return Self;
}
+ public AsyncSearchSubmitRequestDescriptor Ext(Func, FluentDictionary> selector)
+ {
+ ExtValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
public AsyncSearchSubmitRequestDescriptor From(int? from)
{
FromValue = from;
@@ -2137,9 +2175,9 @@ public AsyncSearchSubmitRequestDescriptor Profile(bool? profile = true)
return Self;
}
- public AsyncSearchSubmitRequestDescriptor RuntimeMappings(Func>, FluentDictionary>> selector)
+ public AsyncSearchSubmitRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
{
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>());
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
return Self;
}
@@ -2455,6 +2493,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteBooleanValue(ExplainValue.Value);
}
+ if (ExtValue is not null)
+ {
+ writer.WritePropertyName("ext");
+ JsonSerializer.Serialize(writer, ExtValue, options);
+ }
+
if (FromValue.HasValue)
{
writer.WritePropertyName("from");
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
index eeafc475fb3..8508057c0f4 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs
@@ -109,7 +109,7 @@ public EqlSearchRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r
[JsonInclude]
[JsonPropertyName("runtime_mappings")]
- public Dictionary>? RuntimeMappings { get; set; }
+ public Dictionary? RuntimeMappings { get; set; }
}
public sealed partial class EqlSearchRequestDescriptor : RequestDescriptorBase, EqlSearchRequestParameters>
@@ -165,7 +165,7 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsear
private Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPositionValue { get; set; }
- private Dictionary>? RuntimeMappingsValue { get; set; }
+ private Dictionary? RuntimeMappingsValue { get; set; }
private int? SizeValue { get; set; }
@@ -295,9 +295,9 @@ public EqlSearchRequestDescriptor ResultPosition(Elastic.Clients.Elas
return Self;
}
- public EqlSearchRequestDescriptor RuntimeMappings(Func>, FluentDictionary>> selector)
+ public EqlSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
{
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>());
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
return Self;
}
@@ -527,7 +527,7 @@ public EqlSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices
private Elastic.Clients.Elasticsearch.Eql.ResultPosition? ResultPositionValue { get; set; }
- private Dictionary>? RuntimeMappingsValue { get; set; }
+ private Dictionary? RuntimeMappingsValue { get; set; }
private int? SizeValue { get; set; }
@@ -663,9 +663,9 @@ public EqlSearchRequestDescriptor ResultPosition(Elastic.Clients.Elasticsearch.E
return Self;
}
- public EqlSearchRequestDescriptor RuntimeMappings(Func>, FluentDictionary>> selector)
+ public EqlSearchRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
{
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>());
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
return Self;
}
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs
index dd1730d0215..c393d76d950 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsRequest.g.cs
@@ -89,7 +89,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r
[JsonInclude]
[JsonPropertyName("runtime_mappings")]
- public Dictionary>? RuntimeMappings { get; set; }
+ public Dictionary? RuntimeMappings { get; set; }
}
public sealed partial class FieldCapsRequestDescriptor : RequestDescriptorBase, FieldCapsRequestParameters>
@@ -121,7 +121,7 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsear
private Action> IndexFilterDescriptorAction { get; set; }
- private Dictionary>? RuntimeMappingsValue { get; set; }
+ private Dictionary? RuntimeMappingsValue { get; set; }
public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? indexFilter)
{
@@ -147,9 +147,9 @@ public FieldCapsRequestDescriptor IndexFilter(Action RuntimeMappings(Func>, FluentDictionary>> selector)
+ public FieldCapsRequestDescriptor RuntimeMappings(Func, FluentDictionary> selector)
{
- RuntimeMappingsValue = selector?.Invoke(new FluentDictionary>());
+ RuntimeMappingsValue = selector?.Invoke(new FluentDictionary());
return Self;
}
@@ -211,7 +211,7 @@ public FieldCapsRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices?
private Action IndexFilterDescriptorAction { get; set; }
- private Dictionary>? RuntimeMappingsValue { get; set; }
+ private Dictionary? RuntimeMappingsValue { get; set; }
public FieldCapsRequestDescriptor IndexFilter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? indexFilter)
{
@@ -237,9 +237,9 @@ public FieldCapsRequestDescriptor IndexFilter(Action>, FluentDictionary>> selector)
+ public FieldCapsRequestDescriptor RuntimeMappings(Func