-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relates: #4232 This commit adds the ingest enrich processor and the enrich APIs. Patch Get enrich policy API to set name URL part as list type. Add Enrich to XPackUsage and XPackInfo. Obsolete DataFrame and introduce Transform, and conditionally check to allow integration tests to pass.
- Loading branch information
Showing
44 changed files
with
1,743 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/CodeGeneration/ApiGenerator/RestSpecification/_Patches/enrich.get_policy.patch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"enrich.get_policy": { | ||
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html", | ||
"stability" : "stable", | ||
"url": { | ||
"parts": { | ||
"name": { | ||
"type" : "list", | ||
"description" : "A comma-separated list of enrich policy names" | ||
} | ||
} | ||
} | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Enrich.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ | ||
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ | ||
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ | ||
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ | ||
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ | ||
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ | ||
// ----------------------------------------------- | ||
// | ||
// This file is automatically generated | ||
// Please do not edit these files manually | ||
// Run the following in the root of the repos: | ||
// | ||
// *NIX : ./build.sh codegen | ||
// Windows : build.bat codegen | ||
// | ||
// ----------------------------------------------- | ||
// ReSharper disable RedundantUsingDirective | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Linq.Expressions; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Elasticsearch.Net.Specification.EnrichApi | ||
{ | ||
///<summary>Request options for DeletePolicy <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-delete-policy.html</para></summary> | ||
public class DeleteEnrichPolicyRequestParameters : RequestParameters<DeleteEnrichPolicyRequestParameters> | ||
{ | ||
public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; | ||
} | ||
|
||
///<summary>Request options for ExecutePolicy <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-execute-policy.html</para></summary> | ||
public class ExecuteEnrichPolicyRequestParameters : RequestParameters<ExecuteEnrichPolicyRequestParameters> | ||
{ | ||
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; | ||
///<summary>Should the request should block until the execution is complete.</summary> | ||
public bool? WaitForCompletion | ||
{ | ||
get => Q<bool? >("wait_for_completion"); | ||
set => Q("wait_for_completion", value); | ||
} | ||
} | ||
|
||
///<summary>Request options for GetPolicy <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary> | ||
public class GetEnrichPolicyRequestParameters : RequestParameters<GetEnrichPolicyRequestParameters> | ||
{ | ||
public override HttpMethod DefaultHttpMethod => HttpMethod.GET; | ||
} | ||
|
||
///<summary>Request options for PutPolicy <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-put-policy.html</para></summary> | ||
public class PutEnrichPolicyRequestParameters : RequestParameters<PutEnrichPolicyRequestParameters> | ||
{ | ||
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; | ||
} | ||
|
||
///<summary>Request options for Stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats.html</para></summary> | ||
public class EnrichStatsRequestParameters : RequestParameters<EnrichStatsRequestParameters> | ||
{ | ||
public override HttpMethod DefaultHttpMethod => HttpMethod.GET; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ | ||
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ | ||
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ | ||
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ | ||
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ | ||
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ | ||
// ----------------------------------------------- | ||
// | ||
// This file is automatically generated | ||
// Please do not edit these files manually | ||
// Run the following in the root of the repos: | ||
// | ||
// *NIX : ./build.sh codegen | ||
// Windows : build.bat codegen | ||
// | ||
// ----------------------------------------------- | ||
// ReSharper disable RedundantUsingDirective | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Specialized; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Elasticsearch.Net; | ||
using static Elasticsearch.Net.HttpMethod; | ||
|
||
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable | ||
// ReSharper disable once CheckNamespace | ||
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable | ||
// ReSharper disable RedundantExtendsListEntry | ||
namespace Elasticsearch.Net.Specification.EnrichApi | ||
{ | ||
///<summary> | ||
/// Enrich APIs. | ||
/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Enrich"/> property | ||
/// on <see cref = "IElasticLowLevelClient"/>. | ||
///</para> | ||
///</summary> | ||
public class LowLevelEnrichNamespace : NamespacedClientProxy | ||
{ | ||
internal LowLevelEnrichNamespace(ElasticLowLevelClient client): base(client) | ||
{ | ||
} | ||
|
||
///<summary>DELETE on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-delete-policy.html</para></summary> | ||
///<param name = "name">The name of the enrich policy</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
public TResponse DeletePolicy<TResponse>(string name, DeleteEnrichPolicyRequestParameters requestParameters = null) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(DELETE, Url($"_enrich/policy/{name:name}"), null, RequestParams(requestParameters)); | ||
///<summary>DELETE on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-delete-policy.html</para></summary> | ||
///<param name = "name">The name of the enrich policy</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
[MapsApi("enrich.delete_policy", "name")] | ||
public Task<TResponse> DeletePolicyAsync<TResponse>(string name, DeleteEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(DELETE, Url($"_enrich/policy/{name:name}"), ctx, null, RequestParams(requestParameters)); | ||
///<summary>PUT on /_enrich/policy/{name}/_execute <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-execute-policy.html</para></summary> | ||
///<param name = "name">The name of the enrich policy</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
public TResponse ExecutePolicy<TResponse>(string name, ExecuteEnrichPolicyRequestParameters requestParameters = null) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(PUT, Url($"_enrich/policy/{name:name}/_execute"), null, RequestParams(requestParameters)); | ||
///<summary>PUT on /_enrich/policy/{name}/_execute <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-execute-policy.html</para></summary> | ||
///<param name = "name">The name of the enrich policy</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
[MapsApi("enrich.execute_policy", "name")] | ||
public Task<TResponse> ExecutePolicyAsync<TResponse>(string name, ExecuteEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_enrich/policy/{name:name}/_execute"), ctx, null, RequestParams(requestParameters)); | ||
///<summary>GET on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary> | ||
///<param name = "name">A comma-separated list of enrich policy names</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
public TResponse GetPolicy<TResponse>(string name, GetEnrichPolicyRequestParameters requestParameters = null) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_enrich/policy/{name:name}"), null, RequestParams(requestParameters)); | ||
///<summary>GET on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary> | ||
///<param name = "name">A comma-separated list of enrich policy names</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
[MapsApi("enrich.get_policy", "name")] | ||
public Task<TResponse> GetPolicyAsync<TResponse>(string name, GetEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_enrich/policy/{name:name}"), ctx, null, RequestParams(requestParameters)); | ||
///<summary>GET on /_enrich/policy/ <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
public TResponse GetPolicy<TResponse>(GetEnrichPolicyRequestParameters requestParameters = null) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_enrich/policy/", null, RequestParams(requestParameters)); | ||
///<summary>GET on /_enrich/policy/ <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-get-policy.html</para></summary> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
[MapsApi("enrich.get_policy", "")] | ||
public Task<TResponse> GetPolicyAsync<TResponse>(GetEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_enrich/policy/", ctx, null, RequestParams(requestParameters)); | ||
///<summary>PUT on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-put-policy.html</para></summary> | ||
///<param name = "name">The name of the enrich policy</param> | ||
///<param name = "body">The enrich policy to register</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
public TResponse PutPolicy<TResponse>(string name, PostData body, PutEnrichPolicyRequestParameters requestParameters = null) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(PUT, Url($"_enrich/policy/{name:name}"), body, RequestParams(requestParameters)); | ||
///<summary>PUT on /_enrich/policy/{name} <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-put-policy.html</para></summary> | ||
///<param name = "name">The name of the enrich policy</param> | ||
///<param name = "body">The enrich policy to register</param> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
[MapsApi("enrich.put_policy", "name, body")] | ||
public Task<TResponse> PutPolicyAsync<TResponse>(string name, PostData body, PutEnrichPolicyRequestParameters requestParameters = null, CancellationToken ctx = default) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(PUT, Url($"_enrich/policy/{name:name}"), ctx, body, RequestParams(requestParameters)); | ||
///<summary>GET on /_enrich/_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats.html</para></summary> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
public TResponse Stats<TResponse>(EnrichStatsRequestParameters requestParameters = null) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_enrich/_stats", null, RequestParams(requestParameters)); | ||
///<summary>GET on /_enrich/_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats.html</para></summary> | ||
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> | ||
[MapsApi("enrich.stats", "")] | ||
public Task<TResponse> StatsAsync<TResponse>(EnrichStatsRequestParameters requestParameters = null, CancellationToken ctx = default) | ||
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_enrich/_stats", ctx, null, RequestParams(requestParameters)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.