|
@@ -49,7 +49,6 @@ import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
import java.util.Set;
|
|
|
-import java.util.function.ToLongFunction;
|
|
|
|
|
|
public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHitsAggregationBuilder> {
|
|
|
public static final String NAME = "top_hits";
|
|
@@ -823,18 +822,4 @@ public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHit
|
|
|
public TransportVersion getMinimalSupportedVersion() {
|
|
|
return TransportVersions.ZERO;
|
|
|
}
|
|
|
-
|
|
|
- @Override
|
|
|
- public boolean supportsParallelCollection(ToLongFunction<String> fieldCardinalityResolver) {
|
|
|
- if (sorts != null) {
|
|
|
- // the implicit sorting is by _score, which supports parallel collection
|
|
|
- for (SortBuilder<?> sortBuilder : sorts) {
|
|
|
- if (sortBuilder.supportsParallelCollection() == false) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return super.supportsParallelCollection(fieldCardinalityResolver);
|
|
|
- }
|
|
|
}
|