Skip to content

Commit 4d7e8b2

Browse files
committed
Add missing code
1 parent ca0eb27 commit 4d7e8b2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

server/src/internalClusterTest/java/org/elasticsearch/search/stats/SearchStatsIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ public void testSimpleStats() throws Exception {
140140

141141
indicesStats = indicesAdmin().prepareStats().setGroups("group1").get();
142142
assertThat(indicesStats.getTotal().getSearch().getGroupStats(), notNullValue());
143+
assertThat(indicesStats.getTotal().getSearch().getGroupStats().get("group1").getDfsCount(), equalTo(0L));
144+
assertThat(indicesStats.getTotal().getSearch().getGroupStats().get("group1").getDfsTimeInMillis(), equalTo(0L));
143145
assertThat(indicesStats.getTotal().getSearch().getGroupStats().get("group1").getQueryCount(), greaterThan(0L));
144146
assertThat(indicesStats.getTotal().getSearch().getGroupStats().get("group1").getQueryTimeInMillis(), greaterThan(0L));
145147
assertThat(indicesStats.getTotal().getSearch().getGroupStats().get("group1").getFetchCount(), greaterThan(0L));

server/src/main/java/org/elasticsearch/index/search/stats/SearchStats.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ private Stats(StreamInput in) throws IOException {
124124
suggestCurrent = in.readVLong();
125125

126126
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_16_0)) {
127+
dfsFailure = in.readVLong();
127128
queryFailure = in.readVLong();
128129
fetchFailure = in.readVLong();
129130
}

0 commit comments

Comments
 (0)