From 6869abed22264792407c399348095f596fc8b0f9 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 14 Oct 2019 15:49:28 +0200 Subject: [PATCH 1/2] Expose index age in ILM explain output addresses elastic/elasticsearch#44457 --- .../XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs | 6 ++++++ src/Tests/Tests/XPack/Ilm/IlmApiTests.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs b/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs index 64a74b4600f..1a940fdc508 100644 --- a/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs +++ b/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs @@ -78,6 +78,12 @@ public class LifecycleExplain [DataMember(Name = "step_time_millis")] [JsonFormatter(typeof(DateTimeOffsetEpochMillisecondsFormatter))] public DateTimeOffset StepTime { get; internal set; } + + /// + /// The age of the index, useful to guage when the next phase will trigger based on + /// + [DataMember(Name = "age")] + public Time Age { get; internal set; } } public class PhaseExecution diff --git a/src/Tests/Tests/XPack/Ilm/IlmApiTests.cs b/src/Tests/Tests/XPack/Ilm/IlmApiTests.cs index 0789a231edc..77433c516ec 100644 --- a/src/Tests/Tests/XPack/Ilm/IlmApiTests.cs +++ b/src/Tests/Tests/XPack/Ilm/IlmApiTests.cs @@ -176,7 +176,7 @@ [I] public async Task IlmExplainLifecycleResponse() => await Assert await Assert(IlmStopStep, (v, r) => From c267c9187ed652ec079f78061063803d3c7437f8 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Tue, 15 Oct 2019 14:18:10 +1000 Subject: [PATCH 2/2] Update src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs --- src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs b/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs index 1a940fdc508..eec9f29c613 100644 --- a/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs +++ b/src/Nest/XPack/Ilm/ExplainLifecycle/ExplainLifecycleResponse.cs @@ -80,7 +80,7 @@ public class LifecycleExplain public DateTimeOffset StepTime { get; internal set; } /// - /// The age of the index, useful to guage when the next phase will trigger based on + /// The age of the index, useful to gauge when the next phase will trigger based on /// [DataMember(Name = "age")] public Time Age { get; internal set; }