From c72508d72502c44e79bcef157383860a1df35f1c Mon Sep 17 00:00:00 2001 From: Mpdreamz Date: Sun, 12 Aug 2018 15:43:49 +0200 Subject: [PATCH 1/2] add additional translog properties as per elastic/elasticsearch#28613 and add properties we weren't mapping --- src/Nest/CommonOptions/Stats/TranslogStats.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Nest/CommonOptions/Stats/TranslogStats.cs b/src/Nest/CommonOptions/Stats/TranslogStats.cs index 9ac28ddcd09..29efe4bb84c 100644 --- a/src/Nest/CommonOptions/Stats/TranslogStats.cs +++ b/src/Nest/CommonOptions/Stats/TranslogStats.cs @@ -8,11 +8,23 @@ public class TranslogStats [JsonProperty("operations")] public long Operations { get; set; } + [JsonProperty("uncommitted_operations")] + public long UncommittedOperations { get; set; } + [JsonProperty("size")] public string Size { get; set; } [JsonProperty("size_in_bytes")] public long SizeInBytes { get; set; } + [JsonProperty("uncommitted_size")] + public string UncommittedSize { get; set; } + + [JsonProperty("uncommitted_size_in_bytes")] + public long UncommittedSizeInBytes { get; set; } + + [JsonProperty("earliest_last_modified_age")] + public long EarliestLastModifiedAge { get; set; } + } -} \ No newline at end of file +} From 8bf68bf297316044d1457d268d5220cedcbde94f Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Mon, 20 Aug 2018 11:28:19 +1000 Subject: [PATCH 2/2] Address PR comments --- src/Nest/CommonOptions/Stats/TranslogStats.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Nest/CommonOptions/Stats/TranslogStats.cs b/src/Nest/CommonOptions/Stats/TranslogStats.cs index 29efe4bb84c..ebb4ee93f37 100644 --- a/src/Nest/CommonOptions/Stats/TranslogStats.cs +++ b/src/Nest/CommonOptions/Stats/TranslogStats.cs @@ -9,7 +9,7 @@ public class TranslogStats public long Operations { get; set; } [JsonProperty("uncommitted_operations")] - public long UncommittedOperations { get; set; } + public int UncommittedOperations { get; set; } [JsonProperty("size")] public string Size { get; set; } @@ -23,8 +23,10 @@ public class TranslogStats [JsonProperty("uncommitted_size_in_bytes")] public long UncommittedSizeInBytes { get; set; } + /// + /// Valid only for Elasticsearch 6.3.0+ + /// [JsonProperty("earliest_last_modified_age")] public long EarliestLastModifiedAge { get; set; } - } }