/** Read from a Stream. */
 public SignificantTermsAggregationBuilder(StreamInput in) throws IOException {
   super(in, TYPE, ValuesSourceType.ANY);
   bucketCountThresholds = new BucketCountThresholds(in);
   executionHint = in.readOptionalString();
   filterBuilder = in.readOptionalNamedWriteable(QueryBuilder.class);
   includeExclude = in.readOptionalWriteable(IncludeExclude::new);
   significanceHeuristic = in.readNamedWriteable(SignificanceHeuristic.class);
 }
 /** Read from a stream. */
 public ScriptSortBuilder(StreamInput in) throws IOException {
   script = new Script(in);
   type = ScriptSortType.readFromStream(in);
   order = SortOrder.readFromStream(in);
   sortMode = in.readOptionalWriteable(SortMode::readFromStream);
   nestedPath = in.readOptionalString();
   nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
 }