-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete by query rethrottle API (#3595)
* download specs from v6.6.2 tag * Delete by Query rethrottle API * exclude DeleteByQueryRethrottle API from naming conventions
- Loading branch information
Showing
18 changed files
with
1,024 additions
and
3,442 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
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
4,153 changes: 717 additions & 3,436 deletions
4,153
src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
6.5.3 | ||
v6.6.2 |
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
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
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
23 changes: 23 additions & 0 deletions
23
src/Nest/Document/Multiple/DeleteByQueryRethrottle/DeleteByQueryRethrottleRequest.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,23 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Nest | ||
{ | ||
/// <summary> | ||
/// Rethrottles a running delete by query | ||
/// </summary> | ||
public partial interface IDeleteByQueryRethrottleRequest | ||
{ | ||
} | ||
|
||
/// <inheritdoc cref="IDeleteByQueryRethrottleRequest" /> | ||
public partial class DeleteByQueryRethrottleRequest : IDeleteByQueryRethrottleRequest | ||
{ | ||
|
||
} | ||
|
||
/// <inheritdoc cref="IDeleteByQueryRethrottleRequest" /> | ||
public partial class DeleteByQueryRethrottleDescriptor : IDeleteByQueryRethrottleRequest | ||
{ | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/Nest/Document/Multiple/DeleteByQueryRethrottle/ElasticClient-DeleteByQueryRethrottle.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 @@ | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Elasticsearch.Net; | ||
|
||
namespace Nest | ||
{ | ||
public partial interface IElasticClient | ||
{ | ||
/// <summary> | ||
/// Rethrottles a running delete by query. Rethrottling that speeds up the query takes effect immediately | ||
/// but rethrotting that slows down the query will take effect after completing the current batch. This prevents scroll timeouts. | ||
/// <para> </para> | ||
/// <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query-rethrottle">https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query-rethrottle</a> | ||
/// </summary> | ||
IListTasksResponse DeleteByQueryRethrottle(TaskId taskId, Func<DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null); | ||
|
||
/// <inheritdoc cref="DeleteByQueryRethrottle(Nest.TaskId,System.Func{Nest.DeleteByQueryRethrottleDescriptor,Nest.IDeleteByQueryRethrottleRequest})" /> | ||
IListTasksResponse DeleteByQueryRethrottle(IDeleteByQueryRethrottleRequest request); | ||
|
||
/// <inheritdoc cref="DeleteByQueryRethrottle(Nest.TaskId,System.Func{Nest.DeleteByQueryRethrottleDescriptor,Nest.IDeleteByQueryRethrottleRequest})" /> | ||
Task<IListTasksResponse> DeleteByQueryRethrottleAsync(TaskId taskId, | ||
Func<DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null, | ||
CancellationToken cancellationToken = default(CancellationToken) | ||
); | ||
|
||
/// <inheritdoc cref="DeleteByQueryRethrottle(Nest.TaskId,System.Func{Nest.DeleteByQueryRethrottleDescriptor,Nest.IDeleteByQueryRethrottleRequest})" /> | ||
Task<IListTasksResponse> DeleteByQueryRethrottleAsync(IDeleteByQueryRethrottleRequest request, | ||
CancellationToken cancellationToken = default(CancellationToken) | ||
); | ||
} | ||
|
||
public partial class ElasticClient | ||
{ | ||
/// <inheritdoc /> | ||
public IListTasksResponse DeleteByQueryRethrottle(TaskId taskId, Func<DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null) => | ||
DeleteByQueryRethrottle(selector.InvokeOrDefault(new DeleteByQueryRethrottleDescriptor(taskId))); | ||
|
||
/// <inheritdoc /> | ||
public IListTasksResponse DeleteByQueryRethrottle(IDeleteByQueryRethrottleRequest request) => | ||
Dispatcher.Dispatch<IDeleteByQueryRethrottleRequest, DeleteByQueryRethrottleRequestParameters, ListTasksResponse>( | ||
request, | ||
(p, d) => LowLevelDispatch.DeleteByQueryRethrottleDispatch<ListTasksResponse>(p) | ||
); | ||
|
||
/// <inheritdoc /> | ||
public Task<IListTasksResponse> DeleteByQueryRethrottleAsync(TaskId taskId, Func<DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null, | ||
CancellationToken cancellationToken = default(CancellationToken) | ||
) => | ||
DeleteByQueryRethrottleAsync(selector.InvokeOrDefault(new DeleteByQueryRethrottleDescriptor(taskId)), cancellationToken); | ||
|
||
/// <inheritdoc /> | ||
public Task<IListTasksResponse> DeleteByQueryRethrottleAsync(IDeleteByQueryRethrottleRequest request, | ||
CancellationToken cancellationToken = default(CancellationToken) | ||
) => | ||
Dispatcher.DispatchAsync<IDeleteByQueryRethrottleRequest, DeleteByQueryRethrottleRequestParameters, ListTasksResponse, IListTasksResponse>( | ||
request, | ||
cancellationToken, | ||
(p, d, c) => LowLevelDispatch.DeleteByQueryRethrottleDispatchAsync<ListTasksResponse>(p, c) | ||
); | ||
} | ||
} |
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
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
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.