From d01ad9367e346f2335eef20cdfafd6dd9f62ee0b Mon Sep 17 00:00:00 2001 From: Nhat Date: Sat, 28 Oct 2017 13:29:53 -0400 Subject: [PATCH] Enable Docstats with totalSizeInBytes for 6.1.0 Relates https://github.com/elastic/elasticsearch/pull/27117 --- .../main/java/org/elasticsearch/index/shard/DocsStats.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/shard/DocsStats.java b/core/src/main/java/org/elasticsearch/index/shard/DocsStats.java index e30b4d99762..ffad0f085f7 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/DocsStats.java +++ b/core/src/main/java/org/elasticsearch/index/shard/DocsStats.java @@ -82,7 +82,7 @@ public class DocsStats implements Streamable, ToXContentFragment { public void readFrom(StreamInput in) throws IOException { count = in.readVLong(); deleted = in.readVLong(); - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_1_0)) { totalSizeInBytes = in.readVLong(); } else { totalSizeInBytes = -1; @@ -93,7 +93,7 @@ public class DocsStats implements Streamable, ToXContentFragment { public void writeTo(StreamOutput out) throws IOException { out.writeVLong(count); out.writeVLong(deleted); - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_1_0)) { out.writeVLong(totalSizeInBytes); } }