-
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.
Add shards_acknowledged and indices results to CloseIndexResponse
Relates: #4001 Relates: elastic/elasticsearch#39687 This commit adds shards_acknowledged and indices resuls to CloseIndexResponse.
- Loading branch information
Showing
2 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
42 changes: 40 additions & 2 deletions
42
src/Nest/Indices/IndexManagement/OpenCloseIndex/CloseIndex/CloseIndexResponse.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 |
---|---|---|
@@ -1,4 +1,42 @@ | ||
namespace Nest | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Elasticsearch.Net; | ||
|
||
namespace Nest | ||
{ | ||
public class CloseIndexResponse : AcknowledgedResponseBase { } | ||
public class CloseIndexResponse : AcknowledgedResponseBase | ||
{ | ||
/// <summary> | ||
/// Individual index responses | ||
/// <para /> | ||
/// Valid only for Elasticsearch 7.3.0+ | ||
/// </summary> | ||
[DataMember(Name = "indices")] | ||
public IReadOnlyDictionary<string, CloseIndexResult> Indices { get; internal set; } = EmptyReadOnly<string, CloseIndexResult>.Dictionary; | ||
|
||
/// <summary> | ||
/// Acknowledgement from shards | ||
/// <para /> | ||
/// Valid only for Elasticsearch 7.2.0+ | ||
/// </summary> | ||
[DataMember(Name = "shards_acknowledged")] | ||
public bool ShardsAcknowledged { get; internal set; } | ||
} | ||
|
||
[DataContract] | ||
public class CloseIndexResult | ||
{ | ||
[DataMember(Name = "closed")] | ||
public bool Closed { get; internal set; } | ||
|
||
[DataMember(Name = "shards")] | ||
public IReadOnlyDictionary<string, CloseShardResult> Shards { get; internal set; } = EmptyReadOnly<string, CloseShardResult>.Dictionary; | ||
} | ||
|
||
[DataContract] | ||
public class CloseShardResult | ||
{ | ||
[DataMember(Name = "failures")] | ||
public IReadOnlyCollection<ShardFailure> Failures { get; internal set; } = EmptyReadOnly<ShardFailure>.Collection; | ||
} | ||
} |
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