@Override
 protected void doWriteTo(StreamOutput out) throws IOException {
   out.writeString(type);
   out.writeBoolean(score);
   out.writeNamedWriteable(query);
   out.writeOptionalWriteable(innerHit);
   out.writeBoolean(ignoreUnmapped);
 }
 @Override
 protected void innerWriteTo(StreamOutput out) throws IOException {
   bucketCountThresholds.writeTo(out);
   out.writeOptionalString(executionHint);
   out.writeOptionalNamedWriteable(filterBuilder);
   out.writeOptionalWriteable(includeExclude);
   out.writeNamedWriteable(significanceHeuristic);
 }
 @Override
 protected void doWriteTo(StreamOutput out) throws IOException {
   out.writeNamedWriteable(queryBuilder);
   out.writeString(fieldName);
 }
 @Override
 protected void doWriteTo(StreamOutput out) throws IOException {
   out.writeNamedWriteable(big);
   out.writeNamedWriteable(little);
 }