Remove generic on AggregatorFactory (#43664) (#44079)

AggregatorFactory was generic over itself, but it doesn't appear we
use this functionality anywhere (e.g. to allow the super class
to declare arguments/return types generically for subclasses to
override).  Most places use a wildcard constraint, and even when a
concrete type is specified it wasn't used.

But since AggFactories are widely used, this led to
the generic touching many pieces of code and making type signatures
fairly complex
This commit is contained in:
Zachary Tong 2019-07-10 13:20:28 -04:00 committed by GitHub
parent b158919542
commit 92ad588275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
114 changed files with 235 additions and 221 deletions

View File

@ -81,7 +81,7 @@ public class MatrixStatsAggregationBuilder
@Override
protected MatrixStatsAggregatorFactory innerBuild(SearchContext context, Map<String, ValuesSourceConfig<Numeric>> configs,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
return new MatrixStatsAggregatorFactory(name, configs, multiValueMode, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -32,14 +32,13 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
final class MatrixStatsAggregatorFactory
extends ArrayValuesSourceAggregatorFactory<ValuesSource.Numeric, MatrixStatsAggregatorFactory> {
final class MatrixStatsAggregatorFactory extends ArrayValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final MultiValueMode multiValueMode;
MatrixStatsAggregatorFactory(String name,
Map<String, ValuesSourceConfig<ValuesSource.Numeric>> configs, MultiValueMode multiValueMode,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, configs, context, parent, subFactoriesBuilder, metaData);
this.multiValueMode = multiValueMode;

View File

@ -239,10 +239,10 @@ public abstract class ArrayValuesSourceAggregationBuilder<VS extends ValuesSourc
}
@Override
protected final ArrayValuesSourceAggregatorFactory<VS, ?> doBuild(SearchContext context, AggregatorFactory<?> parent,
protected final ArrayValuesSourceAggregatorFactory<VS> doBuild(SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
Map<String, ValuesSourceConfig<VS>> configs = resolveConfig(context);
ArrayValuesSourceAggregatorFactory<VS, ?> factory = innerBuild(context, configs, parent, subFactoriesBuilder);
ArrayValuesSourceAggregatorFactory<VS> factory = innerBuild(context, configs, parent, subFactoriesBuilder);
return factory;
}
@ -255,9 +255,9 @@ public abstract class ArrayValuesSourceAggregationBuilder<VS extends ValuesSourc
return configs;
}
protected abstract ArrayValuesSourceAggregatorFactory<VS, ?> innerBuild(SearchContext context,
protected abstract ArrayValuesSourceAggregatorFactory<VS> innerBuild(SearchContext context,
Map<String, ValuesSourceConfig<VS>> configs,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder) throws IOException;
public ValuesSourceConfig<VS> config(SearchContext context, String field, Script script) {

View File

@ -30,13 +30,13 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
public abstract class ArrayValuesSourceAggregatorFactory<VS extends ValuesSource, AF extends ArrayValuesSourceAggregatorFactory<VS, AF>>
extends AggregatorFactory<AF> {
public abstract class ArrayValuesSourceAggregatorFactory<VS extends ValuesSource>
extends AggregatorFactory {
protected Map<String, ValuesSourceConfig<VS>> configs;
public ArrayValuesSourceAggregatorFactory(String name, Map<String, ValuesSourceConfig<VS>> configs,
SearchContext context, AggregatorFactory<?> parent,
SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactoriesBuilder, metaData);

View File

@ -95,9 +95,9 @@ public class ChildrenAggregationBuilder
}
@Override
protected ValuesSourceAggregatorFactory<WithOrdinals, ?> innerBuild(SearchContext context,
protected ValuesSourceAggregatorFactory<WithOrdinals> innerBuild(SearchContext context,
ValuesSourceConfig<WithOrdinals> config,
AggregatorFactory<?> parent,
AggregatorFactory parent,
Builder subFactoriesBuilder) throws IOException {
return new ChildrenAggregatorFactory(name, config, childFilter, parentFilter, context, parent,
subFactoriesBuilder, metaData);

View File

@ -35,7 +35,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class ChildrenAggregatorFactory extends ValuesSourceAggregatorFactory<WithOrdinals, ChildrenAggregatorFactory> {
public class ChildrenAggregatorFactory extends ValuesSourceAggregatorFactory<WithOrdinals> {
private final Query parentFilter;
private final Query childFilter;
@ -45,7 +45,7 @@ public class ChildrenAggregatorFactory extends ValuesSourceAggregatorFactory<Wit
Query childFilter,
Query parentFilter,
SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);

View File

@ -95,9 +95,9 @@ public class ParentAggregationBuilder
}
@Override
protected ValuesSourceAggregatorFactory<WithOrdinals, ?> innerBuild(SearchContext context,
protected ValuesSourceAggregatorFactory<WithOrdinals> innerBuild(SearchContext context,
ValuesSourceConfig<WithOrdinals> config,
AggregatorFactory<?> parent,
AggregatorFactory parent,
Builder subFactoriesBuilder) throws IOException {
return new ParentAggregatorFactory(name, config, childFilter, parentFilter, context, parent,
subFactoriesBuilder, metaData);

View File

@ -35,7 +35,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class ParentAggregatorFactory extends ValuesSourceAggregatorFactory<WithOrdinals, ParentAggregatorFactory> {
public class ParentAggregatorFactory extends ValuesSourceAggregatorFactory<WithOrdinals> {
private final Query parentFilter;
private final Query childFilter;
@ -45,7 +45,7 @@ public class ParentAggregatorFactory extends ValuesSourceAggregatorFactory<WithO
Query childFilter,
Query parentFilter,
SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);

View File

@ -135,12 +135,12 @@ public abstract class AbstractAggregationBuilder<AB extends AbstractAggregationB
}
@Override
public final AggregatorFactory<?> build(SearchContext context, AggregatorFactory<?> parent) throws IOException {
AggregatorFactory<?> factory = doBuild(context, parent, factoriesBuilder);
public final AggregatorFactory build(SearchContext context, AggregatorFactory parent) throws IOException {
AggregatorFactory factory = doBuild(context, parent, factoriesBuilder);
return factory;
}
protected abstract AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent,
protected abstract AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subfactoriesBuilder) throws IOException;
@Override

View File

@ -63,7 +63,7 @@ public abstract class AggregationBuilder
}
/** Internal: build an {@link AggregatorFactory} based on the configuration of this builder. */
protected abstract AggregatorFactory<?> build(SearchContext context, AggregatorFactory<?> parent) throws IOException;
protected abstract AggregatorFactory build(SearchContext context, AggregatorFactory parent) throws IOException;
/** Associate metadata with this {@link AggregationBuilder}. */
@Override

View File

@ -161,16 +161,16 @@ public class AggregatorFactories {
}
}
public static final AggregatorFactories EMPTY = new AggregatorFactories(new AggregatorFactory<?>[0], new ArrayList<>());
public static final AggregatorFactories EMPTY = new AggregatorFactories(new AggregatorFactory[0], new ArrayList<>());
private AggregatorFactory<?>[] factories;
private AggregatorFactory[] factories;
private List<PipelineAggregationBuilder> pipelineAggregatorFactories;
public static Builder builder() {
return new Builder();
}
private AggregatorFactories(AggregatorFactory<?>[] factories, List<PipelineAggregationBuilder> pipelineAggregators) {
private AggregatorFactories(AggregatorFactory[] factories, List<PipelineAggregationBuilder> pipelineAggregators) {
this.factories = factories;
this.pipelineAggregatorFactories = pipelineAggregators;
}
@ -314,7 +314,7 @@ public class AggregatorFactories {
return this;
}
public AggregatorFactories build(SearchContext context, AggregatorFactory<?> parent) throws IOException {
public AggregatorFactories build(SearchContext context, AggregatorFactory parent) throws IOException {
if (aggregationBuilders.isEmpty() && pipelineAggregatorBuilders.isEmpty()) {
return EMPTY;
}
@ -325,7 +325,7 @@ public class AggregatorFactories {
orderedpipelineAggregators = resolvePipelineAggregatorOrder(this.pipelineAggregatorBuilders, this.aggregationBuilders,
parent);
}
AggregatorFactory<?>[] aggFactories = new AggregatorFactory<?>[aggregationBuilders.size()];
AggregatorFactory[] aggFactories = new AggregatorFactory[aggregationBuilders.size()];
int i = 0;
for (AggregationBuilder agg : aggregationBuilders) {
@ -337,7 +337,7 @@ public class AggregatorFactories {
private List<PipelineAggregationBuilder> resolvePipelineAggregatorOrder(
Collection<PipelineAggregationBuilder> pipelineAggregatorBuilders, Collection<AggregationBuilder> aggregationBuilders,
AggregatorFactory<?> parent) {
AggregatorFactory parent) {
Map<String, PipelineAggregationBuilder> pipelineAggregatorBuildersMap = new HashMap<>();
for (PipelineAggregationBuilder builder : pipelineAggregatorBuilders) {
pipelineAggregatorBuildersMap.put(builder.getName(), builder);

View File

@ -33,17 +33,17 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public abstract class AggregatorFactory<AF extends AggregatorFactory<AF>> {
public abstract class AggregatorFactory {
public static final class MultiBucketAggregatorWrapper extends Aggregator {
private final BigArrays bigArrays;
private final Aggregator parent;
private final AggregatorFactory<?> factory;
private final AggregatorFactory factory;
private final Aggregator first;
ObjectArray<Aggregator> aggregators;
ObjectArray<LeafBucketCollector> collectors;
MultiBucketAggregatorWrapper(BigArrays bigArrays, SearchContext context, Aggregator parent, AggregatorFactory<?> factory,
MultiBucketAggregatorWrapper(BigArrays bigArrays, SearchContext context, Aggregator parent, AggregatorFactory factory,
Aggregator first) {
this.bigArrays = bigArrays;
this.parent = parent;
@ -167,7 +167,7 @@ public abstract class AggregatorFactory<AF extends AggregatorFactory<AF>> {
}
protected final String name;
protected final AggregatorFactory<?> parent;
protected final AggregatorFactory parent;
protected final AggregatorFactories factories;
protected final Map<String, Object> metaData;
protected final SearchContext context;
@ -180,7 +180,7 @@ public abstract class AggregatorFactory<AF extends AggregatorFactory<AF>> {
* @throws IOException
* if an error occurs creating the factory
*/
public AggregatorFactory(String name, SearchContext context, AggregatorFactory<?> parent,
public AggregatorFactory(String name, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
this.name = name;
this.context = context;
@ -217,7 +217,7 @@ public abstract class AggregatorFactory<AF extends AggregatorFactory<AF>> {
return createInternal(parent, collectsFromSingleBucket, this.factories.createPipelineAggregators(), this.metaData);
}
public AggregatorFactory<?> getParent() {
public AggregatorFactory getParent() {
return parent;
}
@ -226,7 +226,7 @@ public abstract class AggregatorFactory<AF extends AggregatorFactory<AF>> {
* {@link Aggregator}s that only know how to collect bucket {@code 0}, this
* returns an aggregator that can collect any bucket.
*/
protected static Aggregator asMultiBucketAggregator(final AggregatorFactory<?> factory, final SearchContext context,
protected static Aggregator asMultiBucketAggregator(final AggregatorFactory factory, final SearchContext context,
final Aggregator parent) throws IOException {
final Aggregator first = factory.create(parent, true);
final BigArrays bigArrays = context.bigArrays();

View File

@ -67,7 +67,7 @@ public abstract class PipelineAggregationBuilder implements NamedWriteable, Base
* Internal: Validates the state of this factory (makes sure the factory is properly
* configured)
*/
protected abstract void validate(AggregatorFactory<?> parent, Collection<AggregationBuilder> aggregationBuilders,
protected abstract void validate(AggregatorFactory parent, Collection<AggregationBuilder> aggregationBuilders,
Collection<PipelineAggregationBuilder> pipelineAggregatorBuilders);
/**

View File

@ -196,7 +196,7 @@ public class AdjacencyMatrixAggregationBuilder extends AbstractAggregationBuilde
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
int maxFilters = context.indexShard().indexSettings().getMaxAdjacencyMatrixFilters();
if (filters.size() > maxFilters){

View File

@ -34,14 +34,14 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class AdjacencyMatrixAggregatorFactory extends AggregatorFactory<AdjacencyMatrixAggregatorFactory> {
public class AdjacencyMatrixAggregatorFactory extends AggregatorFactory {
private final String[] keys;
private final Weight[] weights;
private final String separator;
public AdjacencyMatrixAggregatorFactory(String name, List<KeyedFilter> filters, String separator,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactories,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactories,
Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
IndexSearcher contextSearcher = context.searcher();

View File

@ -162,7 +162,7 @@ public class CompositeAggregationBuilder extends AbstractAggregationBuilder<Comp
* this aggregator or the instance of the parent's factory that is incompatible with
* the composite aggregation.
*/
private AggregatorFactory<?> checkParentIsNullOrNested(AggregatorFactory<?> factory) {
private AggregatorFactory checkParentIsNullOrNested(AggregatorFactory factory) {
if (factory == null) {
return null;
} else if (factory instanceof NestedAggregatorFactory) {
@ -195,9 +195,9 @@ public class CompositeAggregationBuilder extends AbstractAggregationBuilder<Comp
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent,
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subfactoriesBuilder) throws IOException {
AggregatorFactory<?> invalid = checkParentIsNullOrNested(parent);
AggregatorFactory invalid = checkParentIsNullOrNested(parent);
if (invalid != null) {
throw new IllegalArgumentException("[composite] aggregation cannot be used with a parent aggregation of" +
" type: [" + invalid.getClass().getSimpleName() + "]");

View File

@ -29,12 +29,12 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class CompositeAggregationFactory extends AggregatorFactory<CompositeAggregationFactory> {
class CompositeAggregationFactory extends AggregatorFactory {
private final int size;
private final CompositeValuesSourceConfig[] sources;
private final CompositeKey afterKey;
CompositeAggregationFactory(String name, SearchContext context, AggregatorFactory<?> parent,
CompositeAggregationFactory(String name, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData,
int size, CompositeValuesSourceConfig[] sources, CompositeKey afterKey) throws IOException {
super(name, context, parent, subFactoriesBuilder, metaData);

View File

@ -93,7 +93,7 @@ public class FilterAggregationBuilder extends AbstractAggregationBuilder<FilterA
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent,
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
return new FilterAggregatorFactory(name, filter, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -35,13 +35,13 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class FilterAggregatorFactory extends AggregatorFactory<FilterAggregatorFactory> {
public class FilterAggregatorFactory extends AggregatorFactory {
private Weight weight;
private Query filter;
public FilterAggregatorFactory(String name, QueryBuilder filterBuilder, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactoriesBuilder, metaData);
filter = filterBuilder.toQuery(context.getQueryShardContext());
}

View File

@ -220,7 +220,7 @@ public class FiltersAggregationBuilder extends AbstractAggregationBuilder<Filter
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
return new FiltersAggregatorFactory(name, filters, keyed, otherBucket, otherBucketKey, context, parent,
subFactoriesBuilder, metaData);

View File

@ -35,7 +35,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class FiltersAggregatorFactory extends AggregatorFactory<FiltersAggregatorFactory> {
public class FiltersAggregatorFactory extends AggregatorFactory {
private final String[] keys;
private final Query[] filters;
@ -45,7 +45,7 @@ public class FiltersAggregatorFactory extends AggregatorFactory<FiltersAggregato
private final String otherBucketKey;
public FiltersAggregatorFactory(String name, List<KeyedFilter> filters, boolean keyed, boolean otherBucket,
String otherBucketKey, SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactories,
String otherBucketKey, SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactories,
Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
this.keyed = keyed;

View File

@ -108,9 +108,9 @@ public abstract class GeoGridAggregationBuilder extends ValuesSourceAggregationB
/**
* Creates a new instance of the {@link ValuesSourceAggregatorFactory}-derived class specific to the geo aggregation.
*/
protected abstract ValuesSourceAggregatorFactory<ValuesSource.GeoPoint,?> createFactory(
protected abstract ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> createFactory(
String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, int precision, int requiredSize, int shardSize,
SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder, Map<String, Object> metaData
SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder, Map<String, Object> metaData
) throws IOException;
public int precision() {
@ -144,8 +144,8 @@ public abstract class GeoGridAggregationBuilder extends ValuesSourceAggregationB
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, ?> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource.GeoPoint> config, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource.GeoPoint> config, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
int shardSize = this.shardSize;

View File

@ -59,9 +59,9 @@ public class GeoHashGridAggregationBuilder extends GeoGridAggregationBuilder {
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, ?> createFactory(
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> createFactory(
String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, int precision, int requiredSize, int shardSize,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData
) throws IOException {
return new GeoHashGridAggregatorFactory(name, config, precision, requiredSize, shardSize, context, parent,

View File

@ -37,14 +37,14 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
public class GeoHashGridAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, GeoHashGridAggregatorFactory> {
public class GeoHashGridAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> {
private final int precision;
private final int requiredSize;
private final int shardSize;
GeoHashGridAggregatorFactory(String name, ValuesSourceConfig<GeoPoint> config, int precision, int requiredSize,
int shardSize, SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
int shardSize, SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.precision = precision;

View File

@ -58,9 +58,9 @@ public class GeoTileGridAggregationBuilder extends GeoGridAggregationBuilder {
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, ?> createFactory(
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> createFactory(
String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, int precision, int requiredSize, int shardSize,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData
) throws IOException {
return new GeoTileGridAggregatorFactory(name, config, precision, requiredSize, shardSize, context, parent,

View File

@ -36,14 +36,14 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
public class GeoTileGridAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, GeoTileGridAggregatorFactory> {
public class GeoTileGridAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> {
private final int precision;
private final int requiredSize;
private final int shardSize;
GeoTileGridAggregatorFactory(String name, ValuesSourceConfig<GeoPoint> config, int precision, int requiredSize,
int shardSize, SearchContext context, AggregatorFactory<?> parent,
int shardSize, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData
) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);

View File

@ -61,7 +61,7 @@ public class GlobalAggregationBuilder extends AbstractAggregationBuilder<GlobalA
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
return new GlobalAggregatorFactory(name, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -30,9 +30,9 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class GlobalAggregatorFactory extends AggregatorFactory<GlobalAggregatorFactory> {
public class GlobalAggregatorFactory extends AggregatorFactory {
public GlobalAggregatorFactory(String name, SearchContext context, AggregatorFactory<?> parent,
public GlobalAggregatorFactory(String name, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactories, Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
}

View File

@ -184,8 +184,8 @@ public class AutoDateHistogramAggregationBuilder
}
@Override
protected ValuesSourceAggregatorFactory<Numeric, ?> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<Numeric> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
RoundingInfo[] roundings = buildRoundings(timeZone(), getMinimumIntervalExpression());
int maxRoundingInterval = Arrays.stream(roundings,0, roundings.length-1)
.map(rounding -> rounding.innerIntervals)

View File

@ -35,7 +35,7 @@ import java.util.List;
import java.util.Map;
public final class AutoDateHistogramAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, AutoDateHistogramAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final int numBuckets;
private RoundingInfo[] roundingInfos;
@ -45,7 +45,7 @@ public final class AutoDateHistogramAggregatorFactory
int numBuckets,
RoundingInfo[] roundingInfos,
SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);

View File

@ -484,8 +484,8 @@ public class DateHistogramAggregationBuilder extends ValuesSourceAggregationBuil
}
@Override
protected ValuesSourceAggregatorFactory<Numeric, ?> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<Numeric> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
final ZoneId tz = timeZone();
final Rounding rounding = dateHistogramInterval.createRounding(tz);
final ZoneId rewrittenTimeZone = rewriteTimeZone(context.getQueryShardContext());

View File

@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
public final class DateHistogramAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, DateHistogramAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final long offset;
private final BucketOrder order;
@ -49,7 +49,7 @@ public final class DateHistogramAggregatorFactory
public DateHistogramAggregatorFactory(String name, ValuesSourceConfig<Numeric> config,
long offset, BucketOrder order, boolean keyed, long minDocCount,
Rounding rounding, Rounding shardRounding, ExtendedBounds extendedBounds, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.offset = offset;

View File

@ -295,8 +295,8 @@ public class HistogramAggregationBuilder extends ValuesSourceAggregationBuilder<
}
@Override
protected ValuesSourceAggregatorFactory<Numeric, ?> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<Numeric> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new HistogramAggregatorFactory(name, config, interval, offset, order, keyed, minDocCount, minBound, maxBound,
context, parent, subFactoriesBuilder, metaData);
}

View File

@ -34,7 +34,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public final class HistogramAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, HistogramAggregatorFactory> {
public final class HistogramAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double interval, offset;
private final BucketOrder order;
@ -44,7 +44,7 @@ public final class HistogramAggregatorFactory extends ValuesSourceAggregatorFact
public HistogramAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double interval, double offset,
BucketOrder order, boolean keyed, long minDocCount, double minBound, double maxBound,
SearchContext context, AggregatorFactory<?> parent,
SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.interval = interval;

View File

@ -83,8 +83,8 @@ public class MissingAggregationBuilder extends ValuesSourceAggregationBuilder<Va
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource, ?> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource> config, AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<ValuesSource> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource> config, AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new MissingAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -32,10 +32,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class MissingAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, MissingAggregatorFactory> {
public class MissingAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
public MissingAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -87,7 +87,7 @@ public class NestedAggregationBuilder extends AbstractAggregationBuilder<NestedA
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
ObjectMapper childObjectMapper = context.getObjectMapper(path);
if (childObjectMapper == null) {

View File

@ -32,13 +32,13 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class NestedAggregatorFactory extends AggregatorFactory<NestedAggregatorFactory> {
public class NestedAggregatorFactory extends AggregatorFactory {
private final ObjectMapper parentObjectMapper;
private final ObjectMapper childObjectMapper;
NestedAggregatorFactory(String name, ObjectMapper parentObjectMapper, ObjectMapper childObjectMapper,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactories,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactories,
Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
this.parentObjectMapper = parentObjectMapper;

View File

@ -92,7 +92,7 @@ public class ReverseNestedAggregationBuilder extends AbstractAggregationBuilder<
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
if (findNestedAggregatorFactory(parent) == null) {
throw new SearchParseException(context,
@ -120,7 +120,7 @@ public class ReverseNestedAggregationBuilder extends AbstractAggregationBuilder<
}
}
private static NestedAggregatorFactory findNestedAggregatorFactory(AggregatorFactory<?> parent) {
private static NestedAggregatorFactory findNestedAggregatorFactory(AggregatorFactory parent) {
if (parent == null) {
return null;
} else if (parent instanceof NestedAggregatorFactory) {

View File

@ -32,13 +32,13 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class ReverseNestedAggregatorFactory extends AggregatorFactory<ReverseNestedAggregatorFactory> {
public class ReverseNestedAggregatorFactory extends AggregatorFactory {
private final boolean unmapped;
private final ObjectMapper parentObjectMapper;
public ReverseNestedAggregatorFactory(String name, boolean unmapped, ObjectMapper parentObjectMapper,
SearchContext context, AggregatorFactory<?> parent,
SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactories,
Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);

View File

@ -35,15 +35,14 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class AbstractRangeAggregatorFactory<AF extends AbstractRangeAggregatorFactory<AF, R>, R extends Range>
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, AF> {
public class AbstractRangeAggregatorFactory<R extends Range> extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final InternalRange.Factory<?, ?> rangeFactory;
private final R[] ranges;
private final boolean keyed;
public AbstractRangeAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, R[] ranges, boolean keyed,
InternalRange.Factory<?, ?> rangeFactory, SearchContext context, AggregatorFactory<?> parent,
InternalRange.Factory<?, ?> rangeFactory, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.ranges = ranges;

View File

@ -32,7 +32,7 @@ import java.util.List;
import java.util.Map;
public class BinaryRangeAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.Bytes, BinaryRangeAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.Bytes> {
private final List<BinaryRangeAggregator.Range> ranges;
private final boolean keyed;
@ -41,7 +41,7 @@ public class BinaryRangeAggregatorFactory
ValuesSourceConfig<ValuesSource.Bytes> config,
List<BinaryRangeAggregator.Range> ranges, boolean keyed,
SearchContext context,
AggregatorFactory<?> parent, Builder subFactoriesBuilder,
AggregatorFactory parent, Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.ranges = ranges;

View File

@ -289,7 +289,7 @@ public class DateRangeAggregationBuilder extends AbstractRangeBuilder<DateRangeA
@Override
protected DateRangeAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
// We need to call processRanges here so they are parsed and we know whether `now` has been used before we make
// the decision of whether to cache the request
RangeAggregator.Range[] ranges = processRanges(range -> {

View File

@ -28,10 +28,10 @@ import org.elasticsearch.search.internal.SearchContext;
import java.io.IOException;
import java.util.Map;
public class DateRangeAggregatorFactory extends AbstractRangeAggregatorFactory<DateRangeAggregatorFactory, RangeAggregator.Range> {
public class DateRangeAggregatorFactory extends AbstractRangeAggregatorFactory<RangeAggregator.Range> {
public DateRangeAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, RangeAggregator.Range[] ranges, boolean keyed,
InternalRange.Factory<?, ?> rangeFactory, SearchContext context, AggregatorFactory<?> parent,
InternalRange.Factory<?, ?> rangeFactory, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, ranges, keyed, rangeFactory, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -411,8 +411,8 @@ public class GeoDistanceAggregationBuilder extends ValuesSourceAggregationBuilde
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, ?> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource.GeoPoint> config, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource.GeoPoint> config, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
Range[] ranges = this.ranges.toArray(new Range[this.range().size()]);
if (ranges.length == 0) {

View File

@ -43,7 +43,7 @@ import java.util.List;
import java.util.Map;
public class GeoDistanceRangeAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, GeoDistanceRangeAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> {
private final InternalRange.Factory<InternalGeoDistance.Bucket, InternalGeoDistance> rangeFactory = InternalGeoDistance.FACTORY;
private final GeoPoint origin;
@ -54,7 +54,7 @@ public class GeoDistanceRangeAggregatorFactory
public GeoDistanceRangeAggregatorFactory(String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, GeoPoint origin,
Range[] ranges, DistanceUnit unit, GeoDistance distanceType, boolean keyed, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.origin = origin;
this.ranges = ranges;

View File

@ -364,9 +364,9 @@ public final class IpRangeAggregationBuilder
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource.Bytes, ?> innerBuild(
protected ValuesSourceAggregatorFactory<ValuesSource.Bytes> innerBuild(
SearchContext context, ValuesSourceConfig<ValuesSource.Bytes> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder)
AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
List<BinaryRangeAggregator.Range> ranges = new ArrayList<>();
if(this.ranges.size() == 0){

View File

@ -147,7 +147,7 @@ public class RangeAggregationBuilder extends AbstractRangeBuilder<RangeAggregati
@Override
protected RangeAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
// We need to call processRanges here so they are parsed before we make the decision of whether to cache the request
Range[] ranges = processRanges(range -> {
DocValueFormat parser = config.format();

View File

@ -30,10 +30,10 @@ import org.elasticsearch.search.internal.SearchContext;
import java.io.IOException;
import java.util.Map;
public class RangeAggregatorFactory extends AbstractRangeAggregatorFactory<RangeAggregatorFactory, RangeAggregator.Range> {
public class RangeAggregatorFactory extends AbstractRangeAggregatorFactory<RangeAggregator.Range> {
public RangeAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, Range[] ranges, boolean keyed,
Factory<?, ?> rangeFactory, SearchContext context, AggregatorFactory<?> parent,
Factory<?, ?> rangeFactory, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, ranges, keyed, rangeFactory, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -148,8 +148,8 @@ public class DiversifiedAggregationBuilder extends ValuesSourceAggregationBuilde
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource, ?> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource> config, AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<ValuesSource> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource> config, AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new DiversifiedAggregatorFactory(name, config, shardSize, maxDocsPerValue, executionHint, context, parent,
subFactoriesBuilder, metaData);
}

View File

@ -37,14 +37,14 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class DiversifiedAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, DiversifiedAggregatorFactory> {
public class DiversifiedAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
private final int shardSize;
private final int maxDocsPerValue;
private final String executionHint;
DiversifiedAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, int shardSize, int maxDocsPerValue,
String executionHint, SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
String executionHint, SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.shardSize = shardSize;

View File

@ -84,7 +84,7 @@ public class SamplerAggregationBuilder extends AbstractAggregationBuilder<Sample
}
@Override
protected SamplerAggregatorFactory doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subFactoriesBuilder)
protected SamplerAggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
return new SamplerAggregatorFactory(name, shardSize, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -29,11 +29,11 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class SamplerAggregatorFactory extends AggregatorFactory<SamplerAggregatorFactory> {
public class SamplerAggregatorFactory extends AggregatorFactory {
private final int shardSize;
SamplerAggregatorFactory(String name, int shardSize, SearchContext context, AggregatorFactory<?> parent,
SamplerAggregatorFactory(String name, int shardSize, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactories, Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
this.shardSize = shardSize;

View File

@ -283,8 +283,8 @@ public class SignificantTermsAggregationBuilder extends ValuesSourceAggregationB
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource, ?> innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<ValuesSource> innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
SignificanceHeuristic executionHeuristic = this.significanceHeuristic.rewrite(context);
return new SignificantTermsAggregatorFactory(name, config, includeExclude, executionHint, filterBuilder,
bucketCountThresholds, executionHeuristic, context, parent, subFactoriesBuilder, metaData);

View File

@ -58,7 +58,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, SignificantTermsAggregatorFactory>
public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource>
implements Releasable {
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
LogManager.getLogger(SignificantTermsAggregatorFactory.class));
@ -82,7 +82,7 @@ public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFac
TermsAggregator.BucketCountThresholds bucketCountThresholds,
SignificanceHeuristic significanceHeuristic,
SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);

View File

@ -340,7 +340,7 @@ public class SignificantTextAggregationBuilder extends AbstractAggregationBuilde
}
@Override
protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent,
protected AggregatorFactory doBuild(SearchContext context, AggregatorFactory parent,
Builder subFactoriesBuilder) throws IOException {
SignificanceHeuristic executionHeuristic = this.significanceHeuristic.rewrite(context);

View File

@ -49,7 +49,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class SignificantTextAggregatorFactory extends AggregatorFactory<SignificantTextAggregatorFactory>
public class SignificantTextAggregatorFactory extends AggregatorFactory
implements Releasable {
private final IncludeExclude includeExclude;
@ -67,7 +67,7 @@ public class SignificantTextAggregatorFactory extends AggregatorFactory<Signific
public SignificantTextAggregatorFactory(String name, IncludeExclude includeExclude,
QueryBuilder filterBuilder, TermsAggregator.BucketCountThresholds bucketCountThresholds,
SignificanceHeuristic significanceHeuristic, SearchContext context, AggregatorFactory<?> parent,
SignificanceHeuristic significanceHeuristic, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, String fieldName, String [] sourceFieldNames,
boolean filterDuplicateText, Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactoriesBuilder, metaData);

View File

@ -161,9 +161,9 @@ public class RareTermsAggregationBuilder extends ValuesSourceAggregationBuilder<
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource, ?> innerBuild(SearchContext context,
protected ValuesSourceAggregatorFactory<ValuesSource> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent,
AggregatorFactory parent,
Builder subFactoriesBuilder) throws IOException {
return new RareTermsAggregatorFactory(name, config, includeExclude,
context, parent, subFactoriesBuilder, metaData, maxDocCount, precision);

View File

@ -38,7 +38,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class RareTermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, RareTermsAggregatorFactory> {
public class RareTermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
private final IncludeExclude includeExclude;
private final int maxDocCount;
private final double precision;
@ -46,7 +46,7 @@ public class RareTermsAggregatorFactory extends ValuesSourceAggregatorFactory<Va
RareTermsAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config,
IncludeExclude includeExclude,
SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData, int maxDocCount, double precision) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.includeExclude = includeExclude;

View File

@ -333,8 +333,8 @@ public class TermsAggregationBuilder extends ValuesSourceAggregationBuilder<Valu
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource, ?> innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<ValuesSource> innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new TermsAggregatorFactory(name, config, order, includeExclude, executionHint, collectMode,
bucketCountThresholds, showTermDocCountError, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -46,7 +46,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class TermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, TermsAggregatorFactory> {
public class TermsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(LogManager.getLogger(TermsAggregatorFactory.class));
static Boolean REMAP_GLOBAL_ORDS, COLLECT_SEGMENT_ORDS;
@ -67,7 +67,7 @@ public class TermsAggregatorFactory extends ValuesSourceAggregatorFactory<Values
TermsAggregator.BucketCountThresholds bucketCountThresholds,
boolean showTermDocCountError,
SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);

View File

@ -79,7 +79,7 @@ public class AvgAggregationBuilder extends ValuesSourceAggregationBuilder.LeafOn
@Override
protected AvgAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new AvgAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -33,10 +33,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class AvgAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, AvgAggregatorFactory> {
class AvgAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
AvgAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -124,7 +124,7 @@ public final class CardinalityAggregationBuilder
@Override
protected CardinalityAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new CardinalityAggregatorFactory(name, config, precisionThreshold, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -32,12 +32,12 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class CardinalityAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, CardinalityAggregatorFactory> {
class CardinalityAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
private final Long precisionThreshold;
CardinalityAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, Long precisionThreshold,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.precisionThreshold = precisionThreshold;

View File

@ -99,7 +99,7 @@ public class ExtendedStatsAggregationBuilder
@Override
protected ExtendedStatsAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new ExtendedStatsAggregatorFactory(name, config, sigma, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -33,12 +33,12 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class ExtendedStatsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, ExtendedStatsAggregatorFactory> {
class ExtendedStatsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double sigma;
ExtendedStatsAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double sigma,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.sigma = sigma;

View File

@ -99,7 +99,7 @@ public class GeoBoundsAggregationBuilder extends ValuesSourceAggregationBuilder<
@Override
protected GeoBoundsAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource.GeoPoint> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new GeoBoundsAggregatorFactory(name, config, wrapLongitude, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -32,12 +32,12 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class GeoBoundsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, GeoBoundsAggregatorFactory> {
class GeoBoundsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> {
private final boolean wrapLongitude;
GeoBoundsAggregatorFactory(String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, boolean wrapLongitude,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.wrapLongitude = wrapLongitude;

View File

@ -79,7 +79,7 @@ public class GeoCentroidAggregationBuilder
@Override
protected GeoCentroidAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource.GeoPoint> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new GeoCentroidAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -32,10 +32,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class GeoCentroidAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint, GeoCentroidAggregatorFactory> {
class GeoCentroidAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> {
GeoCentroidAggregatorFactory(String name, ValuesSourceConfig<ValuesSource.GeoPoint> config,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder,
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -34,14 +34,14 @@ import java.util.List;
import java.util.Map;
class HDRPercentileRanksAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, HDRPercentileRanksAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double[] values;
private final int numberOfSignificantValueDigits;
private final boolean keyed;
HDRPercentileRanksAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double[] values,
int numberOfSignificantValueDigits, boolean keyed, SearchContext context, AggregatorFactory<?> parent,
int numberOfSignificantValueDigits, boolean keyed, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.values = values;

View File

@ -33,14 +33,14 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class HDRPercentilesAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, HDRPercentilesAggregatorFactory> {
class HDRPercentilesAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double[] percents;
private final int numberOfSignificantValueDigits;
private final boolean keyed;
HDRPercentilesAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double[] percents,
int numberOfSignificantValueDigits, boolean keyed, SearchContext context, AggregatorFactory<?> parent,
int numberOfSignificantValueDigits, boolean keyed, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.percents = percents;

View File

@ -79,7 +79,7 @@ public class MaxAggregationBuilder extends ValuesSourceAggregationBuilder.LeafOn
@Override
protected MaxAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new MaxAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -33,10 +33,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class MaxAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, MaxAggregatorFactory> {
class MaxAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
MaxAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -107,9 +107,9 @@ public class MedianAbsoluteDeviationAggregationBuilder extends LeafOnly<ValuesSo
}
@Override
protected ValuesSourceAggregatorFactory<ValuesSource.Numeric, ?> innerBuild(SearchContext context,
protected ValuesSourceAggregatorFactory<ValuesSource.Numeric> innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource.Numeric> config,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder)
throws IOException {

View File

@ -32,15 +32,14 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
public class MedianAbsoluteDeviationAggregatorFactory extends
ValuesSourceAggregatorFactory<ValuesSource.Numeric, MedianAbsoluteDeviationAggregatorFactory> {
public class MedianAbsoluteDeviationAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double compression;
MedianAbsoluteDeviationAggregatorFactory(String name,
ValuesSourceConfig<ValuesSource.Numeric> config,
SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData,
double compression) throws IOException {

View File

@ -79,7 +79,7 @@ public class MinAggregationBuilder extends ValuesSourceAggregationBuilder.LeafOn
@Override
protected MinAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new MinAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -33,10 +33,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class MinAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, MinAggregatorFactory> {
class MinAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
MinAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -240,8 +240,8 @@ public class PercentileRanksAggregationBuilder extends LeafOnly<ValuesSource.Num
}
@Override
protected ValuesSourceAggregatorFactory<Numeric, ?> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<Numeric> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
switch (method) {
case TDIGEST:
return new TDigestPercentileRanksAggregatorFactory(name, config, values, compression, keyed, context, parent,

View File

@ -263,8 +263,8 @@ public class PercentilesAggregationBuilder extends LeafOnly<ValuesSource.Numeric
}
@Override
protected ValuesSourceAggregatorFactory<Numeric, ?> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
protected ValuesSourceAggregatorFactory<Numeric> innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
switch (method) {
case TDIGEST:
return new TDigestPercentilesAggregatorFactory(name, config, percents, compression, keyed, context, parent,

View File

@ -193,7 +193,7 @@ public class ScriptedMetricAggregationBuilder extends AbstractAggregationBuilder
}
@Override
protected ScriptedMetricAggregatorFactory doBuild(SearchContext context, AggregatorFactory<?> parent,
protected ScriptedMetricAggregatorFactory doBuild(SearchContext context, AggregatorFactory parent,
Builder subfactoriesBuilder) throws IOException {
if (combineScript == null) {

View File

@ -36,7 +36,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
class ScriptedMetricAggregatorFactory extends AggregatorFactory<ScriptedMetricAggregatorFactory> {
class ScriptedMetricAggregatorFactory extends AggregatorFactory {
private final ScriptedMetricAggContexts.MapScript.Factory mapScript;
private final Map<String, Object> mapScriptParams;
@ -53,7 +53,7 @@ class ScriptedMetricAggregatorFactory extends AggregatorFactory<ScriptedMetricAg
ScriptedMetricAggContexts.InitScript.Factory initScript, Map<String, Object> initScriptParams,
ScriptedMetricAggContexts.CombineScript.Factory combineScript,
Map<String, Object> combineScriptParams, Script reduceScript, Map<String, Object> aggParams,
SearchLookup lookup, SearchContext context, AggregatorFactory<?> parent,
SearchLookup lookup, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactories, Map<String, Object> metaData) throws IOException {
super(name, context, parent, subFactories, metaData);
this.mapScript = mapScript;

View File

@ -80,7 +80,7 @@ public class StatsAggregationBuilder extends ValuesSourceAggregationBuilder.Leaf
@Override
protected StatsAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new StatsAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -33,10 +33,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class StatsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, StatsAggregatorFactory> {
class StatsAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
StatsAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -79,7 +79,7 @@ public class SumAggregationBuilder extends ValuesSourceAggregationBuilder.LeafOn
@Override
protected SumAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<Numeric> config,
AggregatorFactory<?> parent, Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {
return new SumAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -33,10 +33,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class SumAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, SumAggregatorFactory> {
class SumAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
SumAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -34,14 +34,14 @@ import java.util.List;
import java.util.Map;
class TDigestPercentileRanksAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, TDigestPercentileRanksAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double[] percents;
private final double compression;
private final boolean keyed;
TDigestPercentileRanksAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double[] percents,
double compression, boolean keyed, SearchContext context, AggregatorFactory<?> parent,
double compression, boolean keyed, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.percents = percents;

View File

@ -34,14 +34,14 @@ import java.util.List;
import java.util.Map;
class TDigestPercentilesAggregatorFactory
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric, TDigestPercentilesAggregatorFactory> {
extends ValuesSourceAggregatorFactory<ValuesSource.Numeric> {
private final double[] percents;
private final double compression;
private final boolean keyed;
TDigestPercentilesAggregatorFactory(String name, ValuesSourceConfig<Numeric> config, double[] percents,
double compression, boolean keyed, SearchContext context, AggregatorFactory<?> parent,
double compression, boolean keyed, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
this.percents = percents;

View File

@ -577,7 +577,7 @@ public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHit
}
@Override
protected TopHitsAggregatorFactory doBuild(SearchContext context, AggregatorFactory<?> parent, Builder subfactoriesBuilder)
protected TopHitsAggregatorFactory doBuild(SearchContext context, AggregatorFactory parent, Builder subfactoriesBuilder)
throws IOException {
long innerResultWindow = from() + size();
int maxInnerResultWindow = context.mapperService().getIndexSettings().getMaxInnerResultWindow();

View File

@ -38,7 +38,7 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
class TopHitsAggregatorFactory extends AggregatorFactory<TopHitsAggregatorFactory> {
class TopHitsAggregatorFactory extends AggregatorFactory {
private final int from;
private final int size;
@ -56,7 +56,7 @@ class TopHitsAggregatorFactory extends AggregatorFactory<TopHitsAggregatorFactor
TopHitsAggregatorFactory(String name, int from, int size, boolean explain, boolean version, boolean seqNoAndPrimaryTerm,
boolean trackScores, Optional<SortAndFormats> sort, HighlightBuilder highlightBuilder, StoredFieldsContext storedFieldsContext,
List<FieldAndFormat> docValueFields, List<ScriptFieldsContext.ScriptField> scriptFields, FetchSourceContext fetchSourceContext,
SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactories, Map<String, Object> metaData)
SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactories, Map<String, Object> metaData)
throws IOException {
super(name, context, parent, subFactories, metaData);
this.from = from;

View File

@ -84,7 +84,7 @@ public class ValueCountAggregationBuilder extends ValuesSourceAggregationBuilder
@Override
protected ValueCountAggregatorFactory innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource> config,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException {
return new ValueCountAggregatorFactory(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -32,10 +32,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class ValueCountAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource, ValueCountAggregatorFactory> {
class ValueCountAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
ValueCountAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, SearchContext context,
AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metaData) throws IOException {
super(name, config, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -98,10 +98,10 @@ public class WeightedAvgAggregationBuilder extends MultiValuesSourceAggregationB
}
@Override
protected MultiValuesSourceAggregatorFactory<Numeric, ?> innerBuild(SearchContext context,
protected MultiValuesSourceAggregatorFactory<Numeric> innerBuild(SearchContext context,
Map<String, ValuesSourceConfig<Numeric>> configs,
DocValueFormat format,
AggregatorFactory<?> parent,
AggregatorFactory parent,
Builder subFactoriesBuilder) throws IOException {
return new WeightedAvgAggregatorFactory(name, configs, format, context, parent, subFactoriesBuilder, metaData);
}

View File

@ -34,10 +34,10 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
class WeightedAvgAggregatorFactory extends MultiValuesSourceAggregatorFactory<Numeric, WeightedAvgAggregatorFactory> {
class WeightedAvgAggregatorFactory extends MultiValuesSourceAggregatorFactory<Numeric> {
WeightedAvgAggregatorFactory(String name, Map<String, ValuesSourceConfig<Numeric>> configs,
DocValueFormat format, SearchContext context, AggregatorFactory<?> parent,
DocValueFormat format, SearchContext context, AggregatorFactory parent,
AggregatorFactories.Builder subFactoriesBuilder,
Map<String, Object> metaData) throws IOException {
super(name, configs, format, context, parent, subFactoriesBuilder, metaData);

View File

@ -84,7 +84,7 @@ public abstract class AbstractPipelineAggregationBuilder<PAB extends AbstractPip
* configured)
*/
@Override
public final void validate(AggregatorFactory<?> parent, Collection<AggregationBuilder> factories,
public final void validate(AggregatorFactory parent, Collection<AggregationBuilder> factories,
Collection<PipelineAggregationBuilder> pipelineAggregatorFactories) {
doValidate(parent, factories, pipelineAggregatorFactories);
}
@ -102,14 +102,14 @@ public abstract class AbstractPipelineAggregationBuilder<PAB extends AbstractPip
return aggregator;
}
public void doValidate(AggregatorFactory<?> parent, Collection<AggregationBuilder> factories,
public void doValidate(AggregatorFactory parent, Collection<AggregationBuilder> factories,
Collection<PipelineAggregationBuilder> pipelineAggregatorFactories) {
}
/**
* Validates pipeline aggregations that need sequentially ordered data.
*/
public static void validateSequentiallyOrderedParentAggs(AggregatorFactory<?> parent, String type, String name) {
public static void validateSequentiallyOrderedParentAggs(AggregatorFactory parent, String type, String name) {
if ((parent instanceof HistogramAggregatorFactory || parent instanceof DateHistogramAggregatorFactory
|| parent instanceof AutoDateHistogramAggregatorFactory) == false) {
throw new IllegalStateException(

View File

@ -107,7 +107,7 @@ public abstract class BucketMetricsPipelineAggregationBuilder<AF extends BucketM
protected abstract PipelineAggregator createInternal(Map<String, Object> metaData);
@Override
public void doValidate(AggregatorFactory<?> parent, Collection<AggregationBuilder> aggBuilders,
public void doValidate(AggregatorFactory parent, Collection<AggregationBuilder> aggBuilders,
Collection<PipelineAggregationBuilder> pipelineAggregatorFactories) {
if (bucketsPaths.length != 1) {
throw new IllegalStateException(PipelineAggregator.Parser.BUCKETS_PATH.getPreferredName()

View File

@ -144,7 +144,7 @@ public class BucketSortPipelineAggregationBuilder extends AbstractPipelineAggreg
}
@Override
public void doValidate(AggregatorFactory<?> parent, Collection<AggregationBuilder> aggFactories,
public void doValidate(AggregatorFactory parent, Collection<AggregationBuilder> aggFactories,
Collection<PipelineAggregationBuilder> pipelineAggregatoractories) {
if (sorts.isEmpty() && size == null && from == 0) {
throw new IllegalStateException("[" + name + "] is configured to perform nothing. Please set either of "

View File

@ -93,7 +93,7 @@ public class CumulativeSumPipelineAggregationBuilder extends AbstractPipelineAgg
}
@Override
public void doValidate(AggregatorFactory<?> parent, Collection<AggregationBuilder> aggFactories,
public void doValidate(AggregatorFactory parent, Collection<AggregationBuilder> aggFactories,
Collection<PipelineAggregationBuilder> pipelineAggregatorFactories) {
if (bucketsPaths.length != 1) {
throw new IllegalStateException(BUCKETS_PATH.getPreferredName()

View File

@ -152,7 +152,7 @@ public class DerivativePipelineAggregationBuilder extends AbstractPipelineAggreg
}
@Override
public void doValidate(AggregatorFactory<?> parent, Collection<AggregationBuilder> aggFactories,
public void doValidate(AggregatorFactory parent, Collection<AggregationBuilder> aggFactories,
Collection<PipelineAggregationBuilder> pipelineAggregatoractories) {
if (bucketsPaths.length != 1) {
throw new IllegalStateException(PipelineAggregator.Parser.BUCKETS_PATH.getPreferredName()

Some files were not shown because too many files have changed in this diff Show More