diff --git a/core/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java b/core/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java index d762540caabef..f7bfb6a805251 100644 --- a/core/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java +++ b/core/src/main/java/org/elasticsearch/search/dfs/AggregatedDfs.java @@ -85,10 +85,10 @@ public void writeTo(final StreamOutput out) throws IOException { out.writeVInt(termStatistics.size()); for (ObjectObjectCursor c : termStatistics()) { - Term term = (Term) c.key; + Term term = c.key; out.writeString(term.field()); out.writeBytesRef(term.bytes()); - TermStatistics stats = (TermStatistics) c.value; + TermStatistics stats = c.value; out.writeBytesRef(stats.term()); out.writeVLong(stats.docFreq()); out.writeVLong(DfsSearchResult.addOne(stats.totalTermFreq()));