Java源码示例:org.elasticsearch.search.aggregations.NonCollectingAggregator

示例1
@Override
protected Aggregator createUnmapped(
        SearchContext searchContext,
        Aggregator parent,
        List<PipelineAggregator> pipelineAggregators,
        Map<String,
        Object> metaData) throws IOException {
    final InternalAggregation aggregation = new InternalPathHierarchy(name, new ArrayList<>(), order, minDocCount,
            bucketCountThresholds.getRequiredSize(), bucketCountThresholds.getShardSize(), 0, separator, pipelineAggregators, metaData);
    return new NonCollectingAggregator(name, searchContext, parent, factories, pipelineAggregators, metaData) {
        {
            // even in the case of an unmapped aggregator, validate the
            // order
            InternalOrder.validate(order, this);
        }

        @Override
        public InternalAggregation buildEmptyAggregation() { return aggregation; }
    };
}
 
示例2
@Override
protected Aggregator createUnmapped(
        SearchContext searchContext,
        Aggregator parent,
        List<PipelineAggregator> pipelineAggregators,
        Map<String,
        Object> metaData) throws IOException {
    final InternalAggregation aggregation = new InternalDateHierarchy(name, new ArrayList<>(), order, minDocCount,
            bucketCountThresholds.getRequiredSize(), bucketCountThresholds.getShardSize(), 0, pipelineAggregators, metaData);
    return new NonCollectingAggregator(name, searchContext, parent, factories, pipelineAggregators, metaData) {
        {
            // even in the case of an unmapped aggregator, validate the
            // order
            InternalOrder.validate(order, this);
        }

        @Override
        public InternalAggregation buildEmptyAggregation() { return aggregation; }
    };
}
 
示例3
@Override
protected Aggregator createUnmapped(AggregationContext aggregationContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators,
        Map<String, Object> metaData) throws IOException {
    return new NonCollectingAggregator(name, aggregationContext, parent, pipelineAggregators, metaData) {

        @Override
        public InternalAggregation buildEmptyAggregation() {
            return new InternalChildren(name, 0, buildEmptySubAggregations(), pipelineAggregators(), metaData());
        }

    };
}
 
示例4
@Override
protected Aggregator createUnmapped(AggregationContext aggregationContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators,
        Map<String, Object> metaData) throws IOException {
    final InternalAggregation aggregation = new InternalGeoHashGrid(name, requiredSize,
            Collections.<InternalGeoHashGrid.Bucket> emptyList(), pipelineAggregators, metaData);
    return new NonCollectingAggregator(name, aggregationContext, parent, pipelineAggregators, metaData) {
        public InternalAggregation buildEmptyAggregation() {
            return aggregation;
        }
    };
}
 
示例5
@Override
protected Aggregator createUnmapped(
        SearchContext searchContext,
        Aggregator parent,
        List<PipelineAggregator> pipelineAggregators,
        Map<String,
                Object> metaData) throws IOException {
    final InternalAggregation aggregation = new InternalGeoShape(name, new ArrayList<>(), output_format,
            bucketCountThresholds.getRequiredSize(), bucketCountThresholds.getShardSize(),
            pipelineAggregators, metaData);
    return new NonCollectingAggregator(name, searchContext, parent, factories, pipelineAggregators, metaData) {
        @Override
        public InternalAggregation buildEmptyAggregation() { return aggregation; }
    };
}
 
示例6
@Override
protected Aggregator createUnmapped(
        SearchContext searchContext,
        Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData
) throws IOException {
    final InternalAggregation aggregation = new InternalGeoPointClustering(name, radius, ratio, requiredSize,
            Collections.<InternalGeoPointClustering.Bucket> emptyList(), pipelineAggregators, metaData);
    return new NonCollectingAggregator(name, searchContext, parent, pipelineAggregators, metaData) {
        @Override
        public InternalAggregation buildEmptyAggregation() {
            return aggregation;
        }
    };
}