public AggregateFieldsScoreProvider(IndexReader reader, string[] fields, SortFieldAggregation fieldAggregation) : base(reader)
        {
            this.reader = reader;
            this.fields = fields;
            this.fieldAggregation = fieldAggregation;

            if (fieldAggregation != SortFieldAggregation.UseMaximum &&
                fieldAggregation != SortFieldAggregation.UseMinimum)
            {
                throw new ArgumentException("Value must be UseMaximum or UseMinimum, was: " + fieldAggregation, "fieldAggregation");
            }
        }
 public AggregateFieldsScoreQuery(Query subQuery, string[] fields, SortFieldAggregation strategy) : base(subQuery)
 {
     this.fields = fields;
     this.strategy = strategy;
 }