|
@@ -142,7 +142,7 @@ public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHit
|
|
|
trackScores = in.readBoolean();
|
|
|
version = in.readBoolean();
|
|
|
seqNoAndPrimaryTerm = in.readBoolean();
|
|
|
- if (in.getVersion().onOrAfter(Version.CURRENT)) {
|
|
|
+ if (in.getVersion().onOrAfter(Version.V_7_10_0)) {
|
|
|
if (in.readBoolean()) {
|
|
|
fetchFields = in.readList(FieldAndFormat::new);
|
|
|
}
|
|
@@ -175,7 +175,7 @@ public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHit
|
|
|
out.writeBoolean(trackScores);
|
|
|
out.writeBoolean(version);
|
|
|
out.writeBoolean(seqNoAndPrimaryTerm);
|
|
|
- if (out.getVersion().onOrAfter(Version.CURRENT)) {
|
|
|
+ if (out.getVersion().onOrAfter(Version.V_7_10_0)) {
|
|
|
out.writeBoolean(fetchFields != null);
|
|
|
if (fetchFields != null) {
|
|
|
out.writeList(fetchFields);
|