<div ng-controller="aggParam.controller" class="visEditorAgg__formRow--flex">
  <div class="form-group visEditorAgg__formRow--split">
    <label for="visEditorTopHitsAggregate{{agg.id}}">
      Aggregate with
      <icon-tip
        content="'Choose a strategy for combining multiple hits or a multi-valued field into a single metric'"
      ></icon-tip>
    </label>

    <select
      required
      id="visEditorTopHitsAggregate{{agg.id}}"
      name="aggregate"
      ng-model="agg.params.aggregate"
      ng-options="opt as opt.display for opt in options| orderBy: 'display' track by opt.val"
      class="form-control"
    ></select>
  </div>
  <div class="form-group visEditorAgg__formRow--split">
    <label for="visEditorTopHitsSize{{agg.id}}">
      Size
      <icon-tip
        content="'Request top-K hits. Multiple hits will be combined via \'aggregate with\'.'"
      ></icon-tip>
    </label>

    <input
       required
       id="visEditorTopHitsSize{{agg.id}}"
       name="size"
       ng-model="agg.params.size"
       class="form-control"
       type="number"
       min="1"
    ></input>
  </div>
</div>
