Added support for _count and _key as bucketsPaths
This commit is contained in:
parent
19cdfe256e
commit
3375c02b42
|
@ -157,7 +157,7 @@ public class AggregatorFactories {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AggregatorFactories build() {
|
public AggregatorFactories build() {
|
||||||
if (factories.isEmpty()) {
|
if (factories.isEmpty() && reducerFactories.isEmpty()) {
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
}
|
}
|
||||||
List<ReducerFactory> orderedReducers = resolveReducerOrder(this.reducerFactories, this.factories);
|
List<ReducerFactory> orderedReducers = resolveReducerOrder(this.reducerFactories, this.factories);
|
||||||
|
@ -212,7 +212,7 @@ public class AggregatorFactories {
|
||||||
String[] bucketsPaths = factory.getBucketsPaths();
|
String[] bucketsPaths = factory.getBucketsPaths();
|
||||||
for (String bucketsPath : bucketsPaths) {
|
for (String bucketsPath : bucketsPaths) {
|
||||||
ReducerFactory matchingFactory = reducerFactoriesMap.get(bucketsPath);
|
ReducerFactory matchingFactory = reducerFactoriesMap.get(bucketsPath);
|
||||||
if (aggFactoryNames.contains(bucketsPath)) {
|
if (bucketsPath.equals("_count") || bucketsPath.equals("_key") || aggFactoryNames.contains(bucketsPath)) {
|
||||||
continue;
|
continue;
|
||||||
} else if (matchingFactory != null) {
|
} else if (matchingFactory != null) {
|
||||||
resolveReducerOrder(aggFactoryNames, reducerFactoriesMap, orderedReducers, unmarkedFactories, temporarilyMarked,
|
resolveReducerOrder(aggFactoryNames, reducerFactoriesMap, orderedReducers, unmarkedFactories, temporarilyMarked,
|
||||||
|
|
Loading…
Reference in New Issue